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

Ensure that every inline parser literal has its corresponding lexer rule #133

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

renatahodovan
Copy link
Owner

By following ANTLR's practice, every inline parser rule literal is converted into a lexer rule. Either by finding an appropriate existing lexer rule or by artificially creating one and assigning its reference to the literal usage.

@coveralls
Copy link

coveralls commented Sep 24, 2023

Coverage Status

coverage: 88.354% (+0.04%) from 88.316% when pulling 1980d9e on imp-lit into e376875 on master.

Copy link
Collaborator

@akosthekiss akosthekiss left a comment

Choose a reason for hiding this comment

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

Minor issues

# This file may not be copied, modified, or distributed except
# according to those terms.

# This custom unparser is used by ImplicitLiterel.g4
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo: ImplicitLiterel.g4 -> ImplicitLiteral.g4

graph.add_edge(frm=parent_id, to=graph.add_node(LiteralNode(src=src)))
else:
# Ensure that every inline literal in parser rules has its lexer rule
# found or implicitely created.
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo: implicitely -> implicitly

By following ANTLR's practice, every inline parser rule literal is converted
into a lexer rule. Either by finding an approrpiate existing lexer rule or
by artificially creating one and assigning its reference to the literal usage.
Copy link
Collaborator

@akosthekiss akosthekiss left a comment

Choose a reason for hiding this comment

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

lgtm

@akosthekiss akosthekiss merged commit 210e846 into master Sep 25, 2023
46 checks passed
@akosthekiss akosthekiss deleted the imp-lit branch September 25, 2023 09:27
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.

3 participants