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

fixed issue 109: In memory grammar #110

Merged
merged 1 commit into from
Jul 31, 2024
Merged

Conversation

xuanbachle
Copy link
Contributor

Referring to issue 109: #109 and also other related issues such as 104: #104.

The problem is with the in memory parser in which: (1) the function build_in_memory_grammar incorrectly initializes/writes the parser with lrk when the option is_rnglr is True. (2) the SDK incorrectly initializes the lexer as ContextFree when the option lexer_is_context_sensitive is True.

Therefore, the fix is to negate the conditions if the if conditions so that the lexer and the parser are created with the right kinds, e.g., LRK parser and ContextFree lexer.

A test case is attached for this bug fix.

Copy link
Member

@woutersl woutersl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you for your contribution!

@woutersl woutersl merged commit 7e2223b into cenotelie:master Jul 31, 2024
3 of 5 checks passed
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