diff options
author | dos-reis <gdr@axiomatics.org> | 2012-02-24 20:06:13 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2012-02-24 20:06:13 +0000 |
commit | 230e2d3f27c556cf2c61127ea8f525dc17c5aa9a (patch) | |
tree | 7f1811b3c961fbc74de32b767d71f4d1e9ff3cc5 /src/interp/spad-parser.boot | |
parent | fc369b11e2e8d73340650d3b82a0278f92b23656 (diff) | |
download | open-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.boot | 15 |
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. |