aboutsummaryrefslogtreecommitdiff
path: root/src/interp/spad-parser.boot
diff options
context:
space:
mode:
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.