Re: [help-bison]How to stock information?

2005-07-20 Thread Hans Aberg
On 20 Jul 2005, at 23:06, alfonso wrote: This reminds me of a gripe I had when learning to use Bison (not that I'm an exper or anything, but I know enough to use it) - the calculator example in the docs is so trivial that it is completely worthless, and the existing language grammars such a

Re: [help-bison]How to stock information?

2005-07-20 Thread alfonso
On Wed, 20 Jul 2005 10:34:25 +0200, Hans Aberg wrote > You have to build a grammar. This is difficult at firts. The Bison > manual has a calculator example. The book by Aho, Sethi, Ullman, > "Compilers" (the "dragon book") has an example of using Lex and > Yacc. Look in grammar-like BNF notat

Re: [help-bison]How to stock information?

2005-07-20 Thread Hans Aberg
On 20 Jul 2005, at 07:49, soledady wrote: can i construct a top-down grammar? It isn't the grammar that is top-down or not -- it is the parse tree that one build. The Bison generated parser builds it bottom-up, because Bison uses LALR(1). The other method is LL(k). In Bison, one sometime

Re: [help-bison]How to stock information?

2005-07-20 Thread soledady
thanks fo your help... Le mercredi 20 juillet 2005 à 10:34 +0200, Hans Aberg a écrit : > On 20 Jul 2005, at 07:49, soledady wrote: > > > > can i construct a top-down grammar? > > It isn't the grammar that is top-down or not -- it is the parse tree > that one build. The Bison generated parser b

Re: [help-bison]How to stock information?

2005-07-19 Thread soledady
Le mercredi 20 juillet 2005 à 01:42 +0200, Hans Aberg a écrit : thanks you very much for the quick answer! > > when I execute bison It builds a syntaxical tree (doesn't it?) > > Not really. Bison supplies the constructs so that you can build a > syntax trees in the parser, bottom up, if you s

Re: [help-bison]How to stock information?

2005-07-19 Thread Hans Aberg
On 19 Jul 2005, at 17:39, soledady wrote: if you receive for twice time this message i'm sorry i made a mistake It it did come twice; I reply to the second address. [Please keep the cc to Help-Bison in replies, so that others can help.] Hello, i'm using Bison for compute a mathematic too

[help-bison]How to stock information?

2005-07-19 Thread soledady
if you receive for twice time this message i'm sorry i made a mistake Hello, i'm using Bison for compute a mathematic tool to resolve this kind of thing: u(n)=u(n-1)+3*u(n-2);u{0}=1;u{1}=2; the example is very simple and this tools can do more things So the subject: when I execute bison It bui

[help-bison]How to stock information?

2005-07-19 Thread DEBUF Xavier
Hello, i'm using Bison for compute a mathematic tool to resolve this kind of thing: u(n)=u(n-1)+3*u(n-2);u{0}=1;u{1}=2; the example is very simple and this tools can do more things So the subject: when I execute bison It builds a syntaxical tree (doesn't it?) how recover number (they could cha