Talk:Parse EBNF: Difference between revisions
Content added Content deleted
(→ANTLR parser EBNF or ISO standard EBNF?: ISO is standard) |
No edit summary |
||
Line 37: | Line 37: | ||
== PicoLisp grammar is PicoLisp not EBNF == |
== PicoLisp grammar is PicoLisp not EBNF == |
||
PicoLisp seems to parse PicoLisp rather than EBNF. This makes for a shorter program, but, if allowed, then the task description should state something like ''"parse an EBNF-like input grammer expressed as code for your programming language"'' to be fair. --[[User:Paddy3118|Paddy3118]] 05:05, 13 May 2011 (UTC) |
PicoLisp seems to parse PicoLisp rather than EBNF. This makes for a shorter program, but, if allowed, then the task description should state something like ''"parse an EBNF-like input grammer expressed as code for your programming language"'' to be fair. --[[User:Paddy3118|Paddy3118]] 05:05, 13 May 2011 (UTC) |
||
: Well, but that's trivial. A one-line to convert the text form:<lang PicoLisp>(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>--[[User:Abu|Abu]] 07:20, 17 May 2011 (UTC) |
|||
== ANTLR parser EBNF or ISO standard EBNF? == |
== ANTLR parser EBNF or ISO standard EBNF? == |