>> - Is a conversion possible without the specification of a specific data type >> in >> a directive like "%token"? > > I'm not sure to understand what you mean. If '0' is expected > to have a value, then you should declare it
I added also the rule '. { return yy::my_parser::make_SINGLE_CHARACTER(yytext, loc); }' and the specification '%token <std::string> SINGLE_CHARACTER "uncategorised_character"' to my source file settings in the meantime. Unfortunately, I stumble on the message "lexer.l:36: warning, rule cannot be matched". https://sourceforge.net/p/flex/bugs/161/ >> - The character list can become long in my use case here. > > That's weird. Maybe should have a single token type 'character', > and store the character value in its semantic value. I am also trying to use a similar data type ... ;-) >> I would like to avoid >> the repetition of similar actions behind them. It would be more "convenient" >> to >> choose a different default action for selected rules, wouldn't it? > > One usually does not need that, as this kind of job is typically > left to the scanner/lexer, not to the parser. I am also thinking about a design approach with a scannerless parser like the way it is provided by the class library "Spirit". http://stackoverflow.com/questions/2224373/scannerless-parser-generators Regards, Markus _______________________________________________ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison