Skip to content
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

Fix keyword lexing. Resolves #900 #901

Merged
merged 3 commits into from
Apr 27, 2015

Conversation

Dunbaratu
Copy link
Member

I don't know why TinyPG doesn't take the longest possible regex match and instead picks a shorter token when available, but at any rate I fixed it by using the regex special term "\b" to indicate a word boundary, putting it around all the keywords like 'not'.

So, for example, laforge won't be taken as the keyword for because it's now defined as \bfor\b.

@erendrake
Copy link
Member

Should we be changing this in TinyPG? is this just a stopgap?

@Dunbaratu
Copy link
Member Author

I don't want to touch tinyPG code if I don't have to. This is too complex a feature to quickly fix. It would be a rabbit hole I'd be stuck in a long time to try to work out the logic of what its lexxer is doing. I think this is fine.

@erendrake erendrake merged commit bd63a8f into KSP-KOS:develop Apr 27, 2015
@Dunbaratu Dunbaratu deleted the fix_keyword_lexing branch December 27, 2015 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants