csly: Unexpected Mode Result

Info

  • Version: 3.5.0-alpha6
  • OS: Windows 10

Lexer Enum

[Sugar("\"")]
[Push("defaultString")]
StartQuote,
[Sugar("\"")]
[Mode("defaultString")]
[Pop]
EndQuote,
[UpTo("\"")]
[Mode("defaultString")]
StringValue,
[Sugar(";")]
End,
[AlphaNumDashId]
Identifier,
[Sugar("=")]
Assign

Parser Rule

String Rule: STRING: StartQuote StringValue* EndQuote Statement: statement: Identifier Assign STRING End Program: program: statement*

Content

test = "3 3";

Output Result

Parser Error: unexpected EOF ('3 3 (line 0, column 8)'). Expecting StringValue, EndQuote, . Tokens:

Identifier [test] @line 0, column 0 on channel 0
Assign [=] @line 0, column 5 on channel 0
StartQuote ["] @line 0, column 7 on channel 0
StringValue [3 3] @line 0, column 8 on channel 0
EndQuote ["] @line 0, column 11 on channel 0
End [;] @line 0, column 12 on channel 0
<<EOS>>

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (18 by maintainers)

Commits related to this issue

Most upvoted comments

it is working now thanks a lots

Created pull request for reproducible case #496

 [Production("statement : Identifier Assign STRING End")]
 [Production("statement : '$'[d] Identifier Assign STRING End")]
 public string Statement(Token<Issue495Token> id, Token<Issue495Token> assign, string value,Token<Issue495Token> end)

this will create same error as my repo does