issues
search
oowekyala
/
intellij-javacc
JavaCC and JJTree grammar support for the IntelliJ Platform
https://plugins.jetbrains.com/plugin/11431-javacc
MIT License
44
stars
6
forks
source link
TODO: Inspection ideas
#3
Open
oowekyala
opened
5 years ago
oowekyala
commented
5 years ago
Inspection ideas
[x] Unnecessary #void annotation
[x] Unnecessary inline regex (in token specs)
[x] Unnamed inline regex (in productions)
[x] Unnecessary parentheses
[ ] Unnecessary parentheses in regular expressions
[x] Unused production (solve transitively)
[x] Lookahead is not at a choice point
[ ] Use bracketed expansion instead of ()? (when there's another set of parentheses inside)
[x] Expansion within e.g. ()? can be matched by the empty string
[x] Parser class was not defined (the name must match between the PARSER_BEGIN and the class
[x] Regex reference can be replaced by string
[x] String can be replaced by regex reference
[x] Only apply if the regex reference is exactly just the string and vice versa
[ ] Collapsible regex productions (consecutive (no comment in between), same regex kind, same lexical states)
[x] Empty parser actions
[x] Consecutive parser actions
[x] Suspicious node descriptor expr (when it's parsable as an expansion unit, but parsed as a java expression)
Injection
[ ] Unnecessary token variable (used only to get the last token, exactly once)
Control flow analysis
[ ] Missing return statement
[ ] Expansion sequence can/ should be factored out (also for parser actions)
[ ] Lookahead issues (needs global CFA)
[x] Detect left-recursion?
Inspection ideas
Injection
Control flow analysis