aboutsummaryrefslogtreecommitdiff
path: root/src/interp/spad-parser.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2012-02-24 20:06:13 +0000
committerdos-reis <gdr@axiomatics.org>2012-02-24 20:06:13 +0000
commit230e2d3f27c556cf2c61127ea8f525dc17c5aa9a (patch)
tree7f1811b3c961fbc74de32b767d71f4d1e9ff3cc5 /src/interp/spad-parser.boot
parentfc369b11e2e8d73340650d3b82a0278f92b23656 (diff)
downloadopen-axiom-230e2d3f27c556cf2c61127ea8f525dc17c5aa9a.tar.gz
* interp/lexing.boot: "assume" is now also a keyword for the compiler.
* interp/spad-parser.boot (parseCategory): Accept exported properties. (parseFormula): New.
Diffstat (limited to 'src/interp/spad-parser.boot')
-rw-r--r--src/interp/spad-parser.boot15
1 files changed, 14 insertions, 1 deletions
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.