Open ebiken opened 3 years ago
No, it's not intentional! The grammar has to be updated to cover various preprocessors.
Thank you for quick comment. Unfortunately I have no experience in this area so would appreciate if you can fix it when you have time. (Or let me know some pointers I should read and I could study & try to fix it while expecting to take a few months)
Hi, directives like #if and #endif are not recognized too. Probably will require similar grammar.
In P4, there are cases some valiables are defined without value to be used just for decisions (e.g.
#ifndef
).For example: https://github.com/p4lang/p4c/blob/master/p4include/core.p4#L19
will cause error :
no viable alternative at input '_CORE_P4_\n#define'P4 Extension
Is this intentional? If not, I think it would be better not to show error since this is a valid P4 syntax.