Home » Topics
Struggling to implement the lex method correctly in my parser
parserlextokenizationregex
Registration:
18.04.2024
Messages: 1046
18.04.2024
Messages: 1046
Gandalf_W Topic author
09.05.2025 22:37
I'm working on a custom language parser and I've been reading a lot about using the lex method for tokenization. My current implementation seems to be failing when I encounter mixed-case identifiers followed by numerical constants. I've tried adjusting the regular expressions, but the parser still throws an unexpected token error. Has anyone here successfully used the lex method with complex grammar rules? I'm specifically struggling with the lookahead functionality when defining boundaries between different data types. Any pointers on best practices or common pitfalls would be greatly appreciated.
2 Answers
09.05.2023
Posts: 599
Posts: 599
Want to join the discussion?
To leave a comment, you must log in to the forum.