Re: Extra code in y.tab.h

2011-06-08 Thread Panayiotis Karabassis
ed! - -- Best regards, Panayiotis Karabassis -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJN7+u/AAoJEN7RcJcJCZJiuxcIAMDhJil8AnNraFLBpg8NDAaq 7Cl1Vcve+Qtqaeb2i0U6p9A3bpMhn33/wJmLJBEuLBAXncBeDfNCLOe

Re: Extra code in y.tab.h

2011-06-08 Thread Panayiotis Karabassis
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/26/2011 02:06 AM, Hans Aberg wrote: > > On 23 May 2011, at 09:40, Panayiotis Karabassis wrote: > >> What is the recommended way to get extra declarations in y.tab.h (in my >> case Parser.h) for a C++ parser? > > Have y

Re: What do you use bison for?

2011-06-08 Thread Panayiotis Karabassis
it's done though, these facilities are really helping me make quick progress. Anyway I've almost finished the stage of intermediate code generation (quadruples). Only code optimizations and translation to assembly left, and I'll have a working compiler! :-) - -- Best regards,

Extra code in y.tab.h

2011-05-23 Thread Panayiotis Karabassis
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi! What is the recommended way to get extra declarations in y.tab.h (in my case Parser.h) for a C++ parser? Currently I have wrapped y.tab.h in my own header file and use that, but it does not seem very elegant. - -- Best regards, Panayiotis

Re: Resolving shift/reduce conflict in Bison grammar

2010-07-31 Thread Panayiotis Karabassis
Hi! Use the -v (verbose) flag on bison to generate the xxx.output file that contains more information about the parser automaton (including where the conflicts appear). Then please post it here. You may also want to read the debugging section from: info bison Regards, Panayiotis On 07/

Re: Bison Help needed

2010-07-28 Thread Panayiotis Karabassis
On 07/29/2010 12:38 AM, Arnabendu Roy wrote: Hi Team, Could you please help me. I am new to Bison, As per the documentation, I have created the rpcalc.y and generated a parser file with the help of Bison. Now, Can I use Visual C++ to generate the object code. I am not sure if Visual C++ (Vi

Re: Unexpected error due to EOF

2010-07-22 Thread Panayiotis Karabassis
On 07/22/2010 01:55 PM, Akim Demaille wrote: Le 21 juil. 2010 à 23:15, Panayiotis Karabassis a écrit : Hi! Well, it turns out it was a missing YYSTYPE definition from the parser file. Thus defaulting to int and having yystate accidentally overwritten on updating yylval. A difficult bug

Re: Unexpected error due to EOF

2010-07-21 Thread Panayiotis Karabassis
Well, it turns out it was a missing YYSTYPE definition from the parser file. Thus defaulting to int and having yystate accidentally overwritten on updating yylval. A difficult bug. Regards, Panayiotis On 07/21/2010 09:48 PM, Panayiotis Karabassis wrote: Hi! I am getting an unexpected ( by

Re: Call a non-start production

2010-07-18 Thread Panayiotis Karabassis
art symbol once and for all for the generated parser. But again thank you very much for your response. Regards, Panayiotis On 07/18/2010 07:47 PM, Hans Aberg wrote: On 18 Jul 2010, at 15:38, Panayiotis Karabassis wrote: In my parser I have several productions. The start production is name

Call a non-start production

2010-07-18 Thread Panayiotis Karabassis
In my parser I have several productions. The start production is named "program". Further down I have a production named "expression" etc. For testing purposes I would like to parse a string using "expression" as the start production. Is this possible? My parser is a C++ parser. Many thanks!