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

Crash when a concrete production has a child with no concrete productions #792

Open
krame505 opened this issue Aug 30, 2023 · 0 comments
Open

Comments

@krame505
Copy link
Member

If a concrete production references a nonterminal in it its signature that does not have any productions, this results in a rather unhelpful error message

Generating parser silver:compiler:composed:Default:svParse.
silver:compiler:modification:lambda_fn/Lambda.sv:49.1 [parser silver_compiler_composed_Default_svParse]: Undefined reference to silver_compiler_modification_lambda_fn_LambdaRHS
silver:compiler:modification:lambda_fn/Lambda.sv:49.1 [parser silver_compiler_composed_Default_svParse]: Undefined reference to silver_compiler_modification_lambda_fn_LambdaRHS

followed by a crash. I think that we are eliminating nonterminals with no concrete productions from the syntax AST, and this leads to undefined references in the grammar given to Copper. Instead we probably need some sort of reachability analysis on the syntax AST? Or just want to flag this as an error before trying to generate a parser?

Thought this had been fixed before, but I guess not?

@github-project-automation github-project-automation bot moved this to To do - uncategorized in Hackathon Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To do
Development

No branches or pull requests

1 participant