-
Notifications
You must be signed in to change notification settings - Fork 50
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
Linear list of tokens #19
Comments
Closed
I ended up rewriting the lexer from scratch myself. I could share the code if anyone's interested. |
@LoganDark : I'm always interested by Lexer/Parser :D |
Can you publish it in a repository ? with LICENSE etc ? |
thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, LexLua returns a large list full of tokens, each token potentially containing more lists of tokens, for example LeadingWhite full of more tokens that have to be plucked out manually and all sorts of weird things like that. Additionally, the order of LeadingWhite cannot be relied on by index (not even reversed), as I figured out earlier (see issue #18). Also, comments are preserved incorrectly in LeadingWhite (#20).
I'm looking to get a list containing tokens in the order they are encountered. That means by looping through the list and adding up the
Data
of each token, I'll be able to reconstruct the original input string passed to LexLua exactly.Is there a ready-made function to create that list for me? If not, how would I create such a function?
The text was updated successfully, but these errors were encountered: