Re: How to read an understand the bison report file ?

2012-06-27 Thread Vincent Zweije
On Wed, Jun 27, 2012 at 02:26:32PM +0300, Timothy Madden wrote: > I would hate to find that I have to push all whitespace/comments > into the content (semantic value) of the lexer tokens, so the > grammar does not get to see it. That is however precisely how I would try to do it. For the practic

Re: %union with STL

2009-05-27 Thread Vincent Zweije
On Tue, May 26, 2009 at 10:57:01PM +0200, Hans Aberg wrote: || On 26 May 2009, at 22:38, Luca wrote: || || >> Checking what the compiler accepts is a good way to produce non- || >> standard source code || > using a pointer inside a union is a good way to produce non-standard || > source code?

Re: %union with STL

2009-05-26 Thread Vincent Zweije
On Sun, May 24, 2009 at 06:36:28PM +0200, Hans Aberg wrote: || On 22 May 2009, at 20:11, Paritosh Aggarwal wrote: || > %{ || > #include || > #include "heading.h" || > || > using namespace std; || > || > int yyerror(char *s); || > int yylex(void); || > %} || > || > %union || > { || >

Re: %union errors

2008-12-08 Thread Vincent Zweije
On Fri, Dec 05, 2008 at 07:02:15PM -0600, Benny Hardage wrote: || I'm receiving the following errors when I compile: || || In file included from compiler.l:17: You seem to be including your generated parser source into your generated scanner source. Is that right? || parser.y:27: error: ISO C

Re: %prefix with C++ namespaces

2007-10-02 Thread Vincent Zweije
Sebastian Pipping wrote: Joel E. Denny wrote: I figured the namespace name is meant to be relative to the global namespace, so a leading "::" is implicit if not specified. I'm not sure if this is true. Could it be that without "::" it's relative to the namespace the call was made from instead o

RE: Flex: token value more than what regexp matches

2005-07-08 Thread Vincent Zweije
bison parser gets around to printing your token (one token later), flex has restored the '(' character (and overwritten the ')' character). To fix, save the contents of the string instead of only the pointer to it. Vincent Zweije Development -- WCC Services - Advanced Matching Technol

RE: Grammar definition problem.

2005-03-28 Thread Vincent Zweije
>> x: letter extension >> >> extension: /* Empty */ >> >> extension: extension letter >> >> extension: extension digit And just for sports: X -> letter X -> X letter X -> X digit Ciao. Vincent. ___ Help-bison@gnu.org http://lists.gnu.org/ma

RE: Grammar definition problem.

2005-03-21 Thread Vincent Zweije
Atul wrote: > X -> letter { letter | digit }. > here letter and digit are terminals and X is the non terminal symbol. > how do I put the OR part of the rule inconsideration of the > fact that that scentence has to start with the "letter" and > later have any number of of digit? Use a nontermina