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

Top-level groups cause generated node issue #37

Open
johnedquinn opened this issue Apr 16, 2023 · 0 comments
Open

Top-level groups cause generated node issue #37

johnedquinn opened this issue Apr 16, 2023 · 0 comments

Comments

@johnedquinn
Copy link
Owner

In below, since the root is expr, and since one of expr's variants, symbol, is a group, it cause the root to be a generated node. Causing issues, since we can't visit a generated node. Needs research. Likely in the AstConverter.

kanonic: {
  name: ion;
  root: expr;
  package: "io.johnedquinn.ion.generated";
};

COLON: ":";
PAREN_LEFT: "\(";
PAREN_RIGHT: "\)";
SYMBOL_QUOTED: "'((\')|[^'])*'";
SYMBOL: "[a-zA-Z]+";
NUMBER: "[0-9]+";
LITERAL_STRING: "\"((\")|[^\"])*\"";

expr
	: annotation? expr --> annotated_expr
	| NUMBER --> number
	| PAREN_LEFT expr+ PAREN_RIGHT --> sexp
	| ( SYMBOL | SYMBOL_QUOTED ) --> symbol
	| LITERAL_STRING --> string
	;
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

No branches or pull requests

1 participant