Re: can i rewrite yyparse() based on ACTION and GOTO tables extracted from XML output?

2021-11-06 Thread Akim Demaille
Hi Levin, > Le 28 oct. 2021 à 08:24, elite liu a écrit : > > Dear Akim, > >I am writing a utility that convert a table-driven dfa into > condition/if-else form, for example: > [...] I have always wondered if code won't be more efficient than tables. Since compiler and cpu have learned

Re: can i rewrite yyparse() based on ACTION and GOTO tables extracted from XML output?

2021-11-06 Thread Christian Schoenebeck
On Samstag, 6. November 2021 09:44:55 CET Akim Demaille wrote: > Hi Levin, > > > Le 28 oct. 2021 à 08:24, elite liu a écrit : > > > > Dear Akim, > > > >I am writing a utility that convert a table-driven dfa into > > > > condition/if-else form, for example: > > [...] > > I have always

Re: can i rewrite yyparse() based on ACTION and GOTO tables extracted from XML output?

2021-11-06 Thread David M. Warme
Christian, Levin, Akim and all, Keep in mind that most of the CPU time is usually spent on lexer side. So it would make sense to optimize that first. However that's one of the issues where you quickly realize that a split parser/lexer design is in the way. If they were tied together, you could