Skip to main content

module demo::lang::Lisra::Syntax

rascal-0.40.17

Usage

import demo::lang::Lisra::Syntax;

syntax Whitespace

layout Whitespace      = [\t-\n\r\ ]*;

syntax IntegerLiteral

lexical IntegerLiteral = [0-9]+ !>> [0-9];

syntax AtomExp

lexical AtomExp        = (![0-9()\t-\n\r\ ])+ !>>  ![0-9()\t-\n\r\ ];

syntax LispExp

start syntax LispExp            // TODO: remove constructor names (needed for compiler)
= int_lit: IntegerLiteral
| atom_exp: AtomExp
| par_exp: "(" LispExp* ")"
;