factor/extra/peg/ebnf
Chris Double 65fabeec11 remove => action and replace it with [[ code ]] in EBNF
Previously the action had to be a factor word and could only appear at the end of a rule:

  : aword ( ast -- ast ) drop V{ 1 2 } ;
  <EBNF foo = "a" "b" => aword EBNF>

Now actions can appear anywhere after an element, and can be any factor code between [[ ... ]] delimiters:

  <EBNF foo = "a" "b" [[ drop V{ 1 2 } ]] EBNF>
  <EBNF foo = "a" [[ drop 1 ]] "b" [[ drop 2 ]] EBNF>

Unfortunately since this means the ebnf>quot code uses the equivalent of eval, it no longer compiles nicely since it can't be inferred. The generated parsers however do compile.
2008-03-20 02:16:30 +13:00
..
authors.txt Start of EBNF parser 2007-11-27 18:13:36 +13:00
ebnf-tests.factor remove => action and replace it with [[ code ]] in EBNF 2008-03-20 02:16:30 +13:00
ebnf.factor remove => action and replace it with [[ code ]] in EBNF 2008-03-20 02:16:30 +13:00
summary.txt Start of EBNF parser 2007-11-27 18:13:36 +13:00
tags.txt Add tags to peg, peg.ebnf and peg.pl0 2007-12-20 17:11:37 +13:00