Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specifications of the grammar for the lisp-style lambda calculus #181

Open
Niknymusing opened this issue Jul 26, 2024 · 0 comments
Open

Comments

@Niknymusing
Copy link

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
;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant