Closed jgjl closed 2 years ago
I found the issue. The ANTLR spec uses elseif
instead of elif
as specified in the P4 Lang spec: 6.2. Preprocessing
Another pattern that the parser cannot handle seems to be multi-line preprocessor code:
#define TEST(param1) \
state ctrl_##param1 { \
}
Hi,
this preprocessor code (to try, just paste into any P4 file):
crashes the plugin with this message:
I had a look at the ANTLR grammar already, but did not immediately see anything related to this issue. I will keep looking, but if anyone has an idea: input is welcome!