Skip to content

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

Description

@Niknymusing

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
;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions