mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-10 05:29:30 -06:00
21 lines
404 B
CFEngine3
21 lines
404 B
CFEngine3
-- Lisp as used in the Alvey grammar
|
|
|
|
entrypoints Prog, Exp ;
|
|
|
|
Pro. Prog ::= [Exp] ;
|
|
|
|
App. Exp ::= "(" [Exp] ")" ;
|
|
At. Exp ::= Id ;
|
|
IdPlus. Exp ::= IdPl ;
|
|
IdStr. Exp ::= String ;
|
|
Plus. Exp ::= "+" ;
|
|
Minus. Exp ::= "-" ;
|
|
Num. Exp ::= Integer ;
|
|
|
|
token IdPl ('+' letter (letter | digit | '-' | '_')*) ;
|
|
token Id (letter (letter | digit | '-' | '_')*) ;
|
|
|
|
terminator Exp "" ;
|
|
|
|
comment ";;" ;
|