Re: Undeclared value type for nonterminals when using multiple value types

2009-10-12 Thread Laurence Finston
I always just pick one (`int', but it doesn't really matter). You don't have to set `$$' to a value in a rule. Laurence Finston Original-Nachricht > Datum: Mon, 12 Oct 2009 15:05:15 -0400 > Von: Rodrigo Dominguez > An: help-bison@gnu.org > Betreff: Undeclared value type for

Re: Undeclared value type for nonterminals when using multiple value types

2009-10-12 Thread John Levine
>What is the default data type for nonterminals when using multiple data types > (%union)? In other words can I have nonterminals with undefined data >types (no %type<..>) when using %union? There's no default. So long as you don't attempt to use the values, you'll be OK. If you do try to use o

LaTeX \frac parsing

2009-10-12 Thread Alin-Florin Rus-Rebreanu
Hi, I'm trying to parse an expression made up of various symbols and the \frac{}{} operator from LaTeX, but my grammar fails miserably since I'm new with bison. Flex -- "\\"[Ff]rac { return FUNC; } "^" { return POW; } "{" { return OP; } "}

Undeclared value type for nonterminals when using multiple value types

2009-10-12 Thread Rodrigo Dominguez
Hi, What is the default data type for nonterminals when using multiple data types (%union)? In other words, can I have nonterminals with undefined data types (no %type<..>) when using %union? I have seen some grammars use this, however, I don't see anything on the manual referring to this scen