Skip to content

Commit 6ca9bb7

Browse files
committed
allow quantifiers \forall and \exists in addition to \A and \E
Signed-off-by: Damien Doligez <[email protected]>
1 parent e9b8bb5 commit 6ca9bb7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/alexer.mll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ and token = parse
9393
{ [ ST (`Num (int_of_string num), lab, String.length dots) ] }
9494

9595
| (","|"."|"_"|"("|")"|"["|"]"|"{"|"}"|"<<"|">>"|"]_"|">>_"|"=="|"!"
96-
|"@"|":"|"::"|";"|"->"|"<-"|"|->"|"\\A"|"\\AA"|"\\E"|"\\EE"|'_' as p)
96+
|"@"|":"|"::"|";"|"->"|"<-"|"|->"|"\\A"|"\\AA"|"\\E"|"\\EE"|'_'
97+
|"\\forall"|"\\exists" as p)
9798
{ [ PUNCT p ] }
9899

99100
(* numbers *)

src/expr/e_parser.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,8 @@ and complex_expr b = lazy begin
549549
locate begin
550550
choice [ punct "\\A" <!> Forall ;
551551
punct "\\E" <!> Exists ;
552+
punct "\\forall" <!> Forall ;
553+
punct "\\exists" <!> Exists ;
552554
]
553555
<**> (quantifier_boundeds b)
554556
<**> (colon_expr b)

test/parser/parser_tests.ml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,6 @@ let expect_failure (test : syntax_test) : bool =
9595
"Conjlist with RECURSIVE in LET/IN";
9696
"Disjlist with RECURSIVE in LET/IN";
9797

98-
(* https://github.com/tlaplus/tlapm/issues/160 *)
99-
"Verbose Bounded Quantification";
100-
10198
(* https://github.com/tlaplus/tlapm/issues/161 *)
10299
"Infix Minus as Parameter";
103100
"Prefix Operator References";

0 commit comments

Comments
 (0)