Hello.
My grammar can have 2 statements: real_number + "SEC" or int_number + "CLK".
real_number forms are 1, 1E0, 1E+0, 1E0, 1.0, 1.0E0, 1.0E+0, and 1.0E0.
Grammar handles statements "1.0 sec" and "1 clk".
But "1 sec" (should be valid) causes a syntax error (expected: clk).
How to solve this problem?
[Language("test")]
public class TryGrammar : Grammar
{
public TryGrammar() : base(false)
{
var real_number = new NumberLiteral("real_number");
var int_number = new NumberLiteral("int_number", NumberOptions.IntOnly);
var sec_stmt = new NonTerminal("sec_stmt");
var clk_stmt = new NonTerminal("clk_stmt");
var stmt = new NonTerminal("expr");
sec_stmt.Rule = real_number + "SEC";
clk_stmt.Rule = int_number + "CLK";
stmt.Rule = sec_stmt  clk_stmt;
// ok: 1.0 sec
// ok: 1 clk
// error: 1 sec
this.Root = stmt;
}
}
