diff options
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/lexing.boot | 2 | ||||
-rw-r--r-- | src/interp/spad-parser.boot | 15 |
2 files changed, 15 insertions, 2 deletions
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. |