parser stuff

This commit is contained in:
rhiannon morris 2022-05-09 18:31:30 +02:00
parent 5b1dab24f2
commit a26eba7d7f
5 changed files with 37 additions and 11 deletions

View file

@ -127,10 +127,14 @@ tests = "lexer" :- [
acceptsWith' "Π" [K Pi],
acceptsWith' "Σ" [K Sigma],
acceptsWith' "W" [K W],
acceptsWith' "" [K TYPE],
acceptsWith' "WAAA" [Name "WAAA"]
],
"universes" :- [
acceptsWith' "★10" [TYPE 10],
rejects' ""
],
"numbers" :- [
acceptsWith' "0" [N Zero],
acceptsWith' "1" [N One],

View file

@ -128,10 +128,17 @@ tests = "parser" :- [
trejects = rejectsNote tgrm " (term)"
erejects = rejectsNote egrm " (elim)"
in [
eparses "a" (F "a"),
eparses "x" (BV 2),
trejects "a",
tparses "[a]" (FT "a"),
tparses "[x]" (BVT 2)
"universes" :- [
tparses "★0" (TYPE 0),
tparses "★1000" (TYPE 1000)
],
"variables" :- [
eparses "a" (F "a"),
eparses "x" (BV 2),
trejects "a",
tparses "[a]" (FT "a"),
tparses "[x]" (BVT 2)
]
]
]