You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following grammar contains three rules. Each of these rules should match inputs "a" or "b", optionally followed by spaces.
rule1 explicitly matches the trailing whitespace with zeroOrMore(sp()). This rule matches the input "a".
rule2 implicitly matches the trailing whitespace by overriding fromStringLiteral(String) and adding zeroOrMore(sp()). That is: "x" matches this string; "x " matches sequence("x", zeroOrMore(sp())). This rule does NOT match the input "a". This is incorrect.
rule3 is the same as rule2 but also matches cr(). This slight change causes the rule to match the input "a".
Note: it seems that the actual change in rule3 is not important: If at least one non-String argument is present, the rule does match the input "a".
The issue seems to be that if all arguments of firstOf() are string literals, the overloaded fromStringLiteral(String) is ignored.
The following grammar contains three rules. Each of these rules should match inputs "a" or "b", optionally followed by spaces.
rule1 explicitly matches the trailing whitespace with zeroOrMore(sp()). This rule matches the input "a".
rule2 implicitly matches the trailing whitespace by overriding fromStringLiteral(String) and adding zeroOrMore(sp()). That is: "x" matches this string; "x " matches sequence("x", zeroOrMore(sp())). This rule does NOT match the input "a". This is incorrect.
rule3 is the same as rule2 but also matches cr(). This slight change causes the rule to match the input "a".
Note: it seems that the actual change in rule3 is not important: If at least one non-String argument is present, the rule does match the input "a".
The issue seems to be that if all arguments of firstOf() are string literals, the overloaded fromStringLiteral(String) is ignored.
The text was updated successfully, but these errors were encountered: