23 Nov
2018
23 Nov
'18
1:58 p.m.
On 11/22/2018 8:38 PM, Mark Webb-Johnson wrote:
I am trying to move the hand-crafted dbc parser (which is pretty crappy) to a full featured parser based on yacc/lex. But I’m concerned this will be complex to build (requiring yacc and lex on the build systems). Given that esp idf already uses this (for Kconfig), it should be ok.
I have committed a stub for this (into components/dbc). It compiles for me with two warnings:
/components/dbc/yacclex/dbc_tokeniser.c:1630:17: warning: 'yyunput' defined but not used [-Wunused-function] static void yyunput (int c, register char * yy_bp ) ^ components/dbc/yacclex/dbc_tokeniser.c:1675:16: warning: 'input' defined but not used [-Wunused-function] static int input (void) ^Those warnings are acceptable, and will be resolved when the full implementation comes.
If your lex is flex (pretty safe assumption) you can quiet the warnings by adding:
#define YY_NO_INPUT
#define YY_NO_UNPUT
after your includes (or as -D arguments).
I used to work with (and still) see the original authors from time to time.
Craig