Anonymous user
Parse EBNF: Difference between revisions
Parse EBNF from string format
m (→{{header|PicoLisp}}: Flag problem) |
(Parse EBNF from string format) |
||
Line 12:
=={{header|PicoLisp}}==
<lang PicoLisp>(de EBNF
(for E EBNF
(use (@S @E)
(unless (and (match '(@S : @E ;) (str E)) (not (cdr @S)))
(quit "Invalid EBNF" E) )
(put (car @S) 'ebnf @E) ) )</lang>
<lang PicoLisp>(de matchEbnf (Pat)
(cond
|