Couldn't find a file with the specifications of the grammar lisp-style lambda calculus used with Stitch? Ideally I'm looking for a .g4 grammar file that could be used with the antlr parser. I guess it's not exactly the same as this for lisp?
grammar lisp;
lisp_
: s_expression+ EOF
;
s_expression
: ATOMIC_SYMBOL
| '(' s_expression '.' s_expression ')'
| list
;
list
: '(' s_expression+ ')'
;
ATOMIC_SYMBOL
: LETTER ATOM_PART?
;
fragment ATOM_PART
: (LETTER | NUMBER) ATOM_PART
;
fragment LETTER
: [a-z]
;
fragment NUMBER
: [1-9]
;
WS
: [ \r\n\t]+ -> skip
;
Couldn't find a file with the specifications of the grammar lisp-style lambda calculus used with Stitch? Ideally I'm looking for a .g4 grammar file that could be used with the antlr parser. I guess it's not exactly the same as this for lisp?
grammar lisp;
lisp_
: s_expression+ EOF
;
s_expression
: ATOMIC_SYMBOL
| '(' s_expression '.' s_expression ')'
| list
;
list
: '(' s_expression+ ')'
;
ATOMIC_SYMBOL
: LETTER ATOM_PART?
;
fragment ATOM_PART
: (LETTER | NUMBER) ATOM_PART
;
fragment LETTER
: [a-z]
;
fragment NUMBER
: [1-9]
;
WS
: [ \r\n\t]+ -> skip
;