Add EBNF: word
parent
7a414869de
commit
88e93446b2
|
@ -108,11 +108,13 @@ DEFER: 'rhs'
|
|||
3array seq [ first2 <ebnf-rule> ] action ;
|
||||
|
||||
: 'ebnf' ( -- parser )
|
||||
'rule' sp ";" token sp hide list-of [ <ebnf> ] action ;
|
||||
'rule' sp "." token sp hide list-of [ <ebnf> ] action ;
|
||||
|
||||
: ebnf>quot ( string -- quot )
|
||||
'ebnf' parse [
|
||||
parse-result-ast ebnf-compile
|
||||
] [
|
||||
f
|
||||
] if* ;
|
||||
] if* ;
|
||||
|
||||
: EBNF: ";" parse-tokens "" join ebnf>quot call ; parsing
|
Loading…
Reference in New Issue