-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected Mode Result #495
Comments
Hello @bdke, first question is :have you tried a stable release like 3.4.0 ? An alpha release is... well an alpha release, not fully ok by nature 😉 |
I will look at it nevertheless but please report if still KO on 3.4.0 |
Same result |
complete repo is here in case of me misunderstood the WIKI |
Hello, if I understand well your parser you want to capture all that is between quotes as a string. So what don't you simply use the String generic token ? Right I now there is an issue with 3.4.0. 3.4.1-alpha1 is an alpha but quite stable, 3.4.1 stable release will be published soon. On branch dev (ie 3.4.1-alpha1) parse is ok. I am publishing 3.4.1 so you can test. See branch https://github.com/b3b00/csly/tree/bugix/%23495 for my unit test. |
version 3.4.1 is now available. Please test with it and tell if OK. |
i want Python's f string so i approached the |
seems it is still having the same result |
@bdke could you elaborate on "having the same result" ? the same result as with 3.5.0-akpha6 or as with 3.4.0 ? |
my repo has the same result with |
Ok, do so now is weekend for me and I will have ver little time to look at it before monday. But I will definitly look at it as soon as I can |
thx a lots |
If you have time to make a pull request to csly containing a reproducing test case it would greatly help. You could add it beside my unit test standing your PR brunch FROM the bugfix/495 branch. |
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 |
@bdke , i've found a potential explanation. Usings modes, upto tokens and explicit tokens like $ in your rule [Production("statement : '$'[d] Identifier Assign STRING End")] This causes modes to mess and lexer is not being able to scan correctly what's bryween quotes in your lexer. I still have to find a way to fix it. In the mean Time you should be able to circumvent it using a tokens defined in the lexer enum as a sugar token. In facture it seems already defined as DollarSign. |
@bdke , issue fixed 😄 . version 3.4.2 is available to test. Thanks for reporting. I will look at modes more accuratly to maybe find other hidden issues. Close the issue if you're happy with the new version. |
it is working now |
@bdke , I've tried to implements ftrings in IndentedWhile parser. here is what it looks like : Lexer : (
Parser :
Doiing so I've found an issue with modes and indents. So i've published v 3.4.3 |
Info
Lexer Enum
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:
The text was updated successfully, but these errors were encountered: