Kakadu/Falka — Issue #1: Sending tokens from stream to FsYacc
Author: Kakadu
Created: 2012-02-17 13:36:41+00:00
State: open
Labels: conceptual problem

Hi! take a look at this grammar:

A ::= "if" "(" Expression ")" "then" Expression
Expression ::= "(" Number ")" | Number
Number ::= "0" | .... | "9"

and we want to convert rule `Expression` to FsYacc.
New realization we'll not parse string `"if (0) then 1"` because at the moment when `")"` is on the top of stream `FsYacc` we'll not be stopped by EOF because token `")"` is used in parser-function `Expression`. To parse this line we should have a good grammar like this:

A ::= "if" Expression "then" Expression
Expression ::= "(" Number ")" | Number
Number ::= "0" | .... | "9"

Maybe if FsYacc will be a GLR parser this problem will not be a problem at all...