Talk:Parse EBNF: Difference between revisions

From Rosetta Code
Content added Content deleted
(→‎Output form: new section)
Line 22: Line 22:


:: I think it should be plain text form, like http://en.wikipedia.org/wiki/EBNF --[[User:Oenone|Oenone]] 08:24, 12 May 2011 (UTC)
:: I think it should be plain text form, like http://en.wikipedia.org/wiki/EBNF --[[User:Oenone|Oenone]] 08:24, 12 May 2011 (UTC)

== Output form ==

What should the output of the parser be? The rules as supplied don't give any information about result, so ''strictly'' it can only be a recognizer… –[[User:Dkf|Donal Fellows]] 14:33, 12 May 2011 (UTC)

Revision as of 14:33, 12 May 2011

I guess I started this as a draft task because I haven't implemented it myself yet.
There is no reason to keep it a draft too long if we get a few fresh implementations here. Tinku99 05:28, 12 June 2010 (UTC)tinku99

Interesting. I usually create a task after having an implementation as it helps with the task description etc. --Paddy3118 10:31, 12 June 2010 (UTC)

The task wording is somewhat sloppy. A parser could be for a (EBNF) grammar, not (plural) grammars. For grammars there can be a parser generator. The existing examples in fact build a parser for a particular grammar, and they don't use EBNF at all. May be task should be renamed as "Simple calculator parser"?Avmich 20:30, 22 April 2011 (UTC)

EBNF parser or parser for the given EBNF grammar?

Is the task to write a parser that takes an EBNF grammar as input? That's how the task description sounds for me, but all implementation examples don't do this.. Or is the task to write a parser for the given EBNF grammar? Then the description should be clarified and the title changed. None of the examples parses the EBNF grammar. --Oenone 11:48, 10 May 2011 (UTC)

Yes, the parser should take an EBNF grammar as input. The two examples (PicoLisp and Tcl) are wrong. I would keep the title "EBNF parser". --Kernigh 14:34, 11 May 2011 (UTC)
If it needs to be an EBNF parser then we have a task description with no working language implementation after 11 months. Do we need a rule that tasks should have at least one correct implementation or at least some indication from the task creator, Tinku, that an implementation is correct after a reasonal amount of time - say - a week or two? Looking at this task, it seems to have been abandoned by Tinku without them OK'ing any of the implementations. --Paddy3118 16:44, 11 May 2011 (UTC)
OK, this makes sense. In which format is the grammar supposed to be? Does it have to be plain text form, or could it also be e.g. in s-expressions, which would be the natural choice in case of PicoLisp.
The task description links to at least two different EBNF formats. So I cannot know which format to use. I guess that all the solutions will use different formats? --Kernigh 01:02, 12 May 2011 (UTC)
I think it should be plain text form, like http://en.wikipedia.org/wiki/EBNF --Oenone 08:24, 12 May 2011 (UTC)

Output form

What should the output of the parser be? The rules as supplied don't give any information about result, so strictly it can only be a recognizer… –Donal Fellows 14:33, 12 May 2011 (UTC)