Re: YY_USER_INIT for YACC

2010-04-12 Thread August Karlstrom
Joel E. Denny wrote: On Sun, 11 Apr 2010, August Karlstrom wrote: Does anyone know if YACC has a macro corresponding to LEX's YY_USER_INIT Flex has YY_USER_INIT, but Lex does not. Bison has %initial-action, but Yacc does not. OK, thank you Joel. A

YY_USER_INIT for YACC

2010-04-11 Thread August Karlstrom
Hi, Does anyone know if YACC has a macro corresponding to LEX's YY_USER_INIT, or do I have to call the parser init function explicitly from the main function (which in this case is defined in a separate source file)? Regards, August ___ help-bi

Re: Name clash with token type BEGIN

2009-12-29 Thread August Karlstrom
Joel E. Denny wrote: [...] I agree. Of course, we're probably a few decades too late to change the default Flex behavior, which is inherited from Lex and specified by POSIX. However, it would be nice if Flex provided an option to avoid namespace pollution. (If there's something already, I mi

Re: Name clash with token type BEGIN

2009-12-29 Thread August Karlstrom
Joel E. Denny wrote: I'm guessing your parser.h is included in a scanner generated by Flex, which defines the macro BEGIN. Yes, that's the case. Do you know if there is there a way around this or do I have to add a prefix to the token (or all tokens for sake of consistency)? Obviously, the

Name clash with token type BEGIN

2009-12-29 Thread August Karlstrom
Hi, According to section 1.2 in the Bison manual "A terminal symbol that stands for a particular keyword in the language should be named after that keyword converted to upper case". When I follow this convention however, I get a syntax error and a warning in parser.h where the token type for th