32 lines
823 B
Plaintext
32 lines
823 B
Plaintext
|
There is nothing to see here. Go and look at the file called "metagrammar".
|
||
|
|
||
|
: $$ = new lime();
|
||
|
grammar pragma toklist stop : $$->pragma($2, $3);
|
||
|
grammar rewrite stop : $2->update($$);
|
||
|
to grammar
|
||
|
: {$$=array();}
|
||
|
toklist sym : $$[] = $2;
|
||
|
toklist lit : $$[] = $2;
|
||
|
to toklist
|
||
|
sym '=' rhs : $$ = new lime_rewrite($1); $$->add_rhs($3);
|
||
|
rewrite '|' rhs : $$->add_rhs($3);
|
||
|
to rewrite
|
||
|
list : $$ = new lime_rhs($1, '');
|
||
|
list action : $$ = new lime_rhs($1, $2);
|
||
|
to rhs
|
||
|
action : $$ = new lime_action($1, NULL);
|
||
|
action lambda : $$ = new lime_action($1, $2);
|
||
|
sym : $$ = new lime_glyph($1, NULL);
|
||
|
sym lambda : $$ = new lime_glyph($1, $2);
|
||
|
lit : $$ = new lime_glyph($1, NULL);
|
||
|
to slot
|
||
|
: $$ = new lime_rhs();
|
||
|
rhs slot : $$->add($2);
|
||
|
to rhs
|
||
|
'{' code '}' : $$ = $2;
|
||
|
to action
|
||
|
:
|
||
|
code php : $$.=$2;
|
||
|
code '{' code '}' : $$.='{'.$3.'}';
|
||
|
to code
|