lime.bootstrap 823 B

12345678910111213141516171819202122232425262728293031
  1. There is nothing to see here. Go and look at the file called "metagrammar".
  2. : $$ = new lime();
  3. grammar pragma toklist stop : $$->pragma($2, $3);
  4. grammar rewrite stop : $2->update($$);
  5. to grammar
  6. : {$$=array();}
  7. toklist sym : $$[] = $2;
  8. toklist lit : $$[] = $2;
  9. to toklist
  10. sym '=' rhs : $$ = new lime_rewrite($1); $$->add_rhs($3);
  11. rewrite '|' rhs : $$->add_rhs($3);
  12. to rewrite
  13. list : $$ = new lime_rhs($1, '');
  14. list action : $$ = new lime_rhs($1, $2);
  15. to rhs
  16. action : $$ = new lime_action($1, NULL);
  17. action lambda : $$ = new lime_action($1, $2);
  18. sym : $$ = new lime_glyph($1, NULL);
  19. sym lambda : $$ = new lime_glyph($1, $2);
  20. lit : $$ = new lime_glyph($1, NULL);
  21. to slot
  22. : $$ = new lime_rhs();
  23. rhs slot : $$->add($2);
  24. to rhs
  25. '{' code '}' : $$ = $2;
  26. to action
  27. :
  28. code php : $$.=$2;
  29. code '{' code '}' : $$.='{'.$3.'}';
  30. to code