summaryrefslogtreecommitdiff
path: root/examples/big/MAP/Lisp.cf
blob: e0fd0de88f77b19bf54ea081efda24a52f93ebf9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
-- 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 ";;" ;