aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog6
-rw-r--r--src/interp/lexing.boot2
-rw-r--r--src/interp/spad-parser.boot15
3 files changed, 21 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d7af41d8..9ecebbd6 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2012-02-24 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * interp/lexing.boot: "assume" is now also a keyword for the compiler.
+ * interp/spad-parser.boot (parseCategory): Accept exported properties.
+ (parseFormula): New.
+
2012-02-23 Gabriel Dos Reis <gdr@cs.tamu.edu>
* interp/nruncomp.boot (genDeltaEntry): Replace applyFun with %apply.
diff --git a/src/interp/lexing.boot b/src/interp/lexing.boot
index e63a13cb..4cb4f9cc 100644
--- a/src/interp/lexing.boot
+++ b/src/interp/lexing.boot
@@ -333,7 +333,7 @@ getGliph(tok,gliphs) ==
return tokenInstall(s,'GLIPH,tok,$nonblank)
Keywords == [
- "or", "and", "isnt", "is", "where", "forall", "exist", "try",
+ "or", "and", "isnt", "is", "where", "forall", "exist", "try", "assume",
"has", "with", "add", "case", "in", "by", "pretend", "mod", "finally",
"exquo", "div", "quo", "else", "rem", "then", "suchthat", "catch", "throw",
"if", "iterate", "break", "from", "exit", "leave", "return",
diff --git a/src/interp/spad-parser.boot b/src/interp/spad-parser.boot
index 2fb320e5..197bd921 100644
--- a/src/interp/spad-parser.boot
+++ b/src/interp/spad-parser.boot
@@ -1,4 +1,4 @@
--- Copyright (C) 2007-2011, Gabriel Dos Reis.
+-- Copyright (C) 2007-2012, Gabriel Dos Reis.
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
@@ -376,6 +376,11 @@ parseCategory() ==
pushReduction('unnamedCategory,nil)
compulsorySyntax matchAdvanceSpecial char ")"
pushReduction('parseCategory,["CATEGORY",popStack2(),:popStack1()])
+ matchAdvanceKeyword "assume" =>
+ compulsorySyntax parseName()
+ compulsorySyntax matchAdvanceGlyph "=="
+ compulsorySyntax parseFormula()
+ pushReduction('assumption,['ATTRIBUTE,['%Rule,popStack2(),popStack1()]])
g := lineNumber $spadLine
parseApplication() or parseOperatorFunctionName() =>
matchAdvanceGlyph ":" =>
@@ -426,6 +431,14 @@ parseQuantifiedVariableList() ==
compulsorySyntax matchAdvanceSpecial char ")"
nil
+parseFormula() ==
+ parseQuantifier() =>
+ compulsorySyntax parseQuantifiedVariableList()
+ compulsorySyntax matchAdvanceGlyph "."
+ compulsorySyntax parseExpression()
+ pushReduction('parseFormula,[popStack3(),popStack2(),popStack1()])
+ parseExpression()
+
++ quantified types. At the moment, these are used only in
++ pattern-mathing cases.
++ -- gdr, 2009-06-14.