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
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?
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
|| > {
|| >
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
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
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
>> 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
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