[Ovmsdev] yacc/lex on component/dbc
mark at webb-johnson.net
Fri Nov 23 12:38:37 HKT 2018
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.
On my mac it worked fine
On Linux, I had to install bison and setup a /usr/bin/yacc wrapper
I haven’t tried at all on windows
Could you guys check, and let me know if you see any issues? In particular, on windows. If no issues, I’ll proceed and finish up the grammar and implementation.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OvmsDev