Section 10.1.7.2 Complete Symbols question

2023-06-02 Thread lostbits
Bison.pdf v3.8.1 In 10.1.7.2 Complete Symbols pg. 180 it says: "... it generates named constructors..." With the following examples for the generated code: symbol_type make_token (const value_type& value, const location_type& location) symbol_type make_token (const location_type& l

Re: Matching opening and closing bracket question

2023-04-12 Thread Simon Richter
Hi Maury, On Wed, Apr 12, 2023 at 06:38:35PM -0400, Maury Markowitz wrote: > I am parsing a grammar that allows bracketing using (), [] and <>. It would > simplify my code if I could do… > open_bracket: ‘(‘ | ‘[‘ | ‘<‘ ; > close_bracket: ‘)‘ | ‘]‘ | ‘>’ ; > bracketed_expression : open_bracket

Matching opening and closing bracket question

2023-04-12 Thread Maury Markowitz
Very noob question… I am parsing a grammar that allows bracketing using (), [] and <>. It would simplify my code if I could do… open_bracket: ‘(‘ | ‘[‘ | ‘<‘ ; close_bracket: ‘)‘ | ‘]‘ | ‘>’ ; bracketed_expression : open_bracket expression close_bracket ; But this did not work

Section 3.1.1 User's Manual Question on $code require

2022-06-18 Thread slipbits
I've included my understanding of a few sections in the Bison User's Manual. What I am confused about is whether the declarations in %code require { declarations } are included in both the header file, if %header is given, and the source file (basename.). The text in the User's Manual, pg. 50 s

Parser implementation question

2022-03-02 Thread Frolov Daniil
Hello! I've not found anything about my theme on the internet so maybe I can ask you for a help. I have a question about implementation for the next feature in my LALR(1) parser on bison. I'm writing interpreter, so I have to parse correct the following code using scopes in my ow

Re: Question about token stack

2020-08-31 Thread Ervin Hegedüs
Hi Akim, On Tue, Sep 01, 2020 at 07:38:57AM +0200, Akim Demaille wrote: > > Le 30 août 2020 à 20:21, Hegedüs Ervin a écrit : > > > > oh my... thanks, now it's clear. > > > > Here is the result: > > > > Starting parse > > [...] > > Entering state 1 > > Stack now 0 1 > > Reading a token > > Next

Re: Question about token stack

2020-08-31 Thread Akim Demaille
Hi Ervin, > Le 30 août 2020 à 20:21, Hegedüs Ervin a écrit : > > oh my... thanks, now it's clear. > > Here is the result: > > Starting parse > [...] > Entering state 1 > Stack now 0 1 > Reading a token > Next token is token T_CONFIG_DIRECTIVE_ARGUMENT () > Parse error: syntax error in file bad

Re: Question about token stack

2020-08-30 Thread Hegedüs Ervin
Hi Akim, thanks again, On Sun, Aug 30, 2020 at 06:19:09PM +0200, Akim Demaille wrote: > > Le 30 août 2020 à 18:06, Ervin Hegedüs a écrit : > > > > the documentation shows: > > > > https://www.gnu.org/software/bison/manual/html_node/Enabling-Traces.html > > > > the option -t (POSIX Yacc compli

Re: Question about token stack

2020-08-30 Thread Akim Demaille
> Le 30 août 2020 à 18:06, Ervin Hegedüs a écrit : > > the documentation shows: > > https://www.gnu.org/software/bison/manual/html_node/Enabling-Traces.html > > the option -t (POSIX Yacc compliant) > > the option --debug (Bison extension) Have a look at Bison's examples (e.g. https://gith

Re: Question about token stack

2020-08-30 Thread Ervin Hegedüs
Hi Akim On Sun, Aug 30, 2020 at 05:36:49PM +0200, Akim Demaille wrote: > > Le 30 août 2020 à 17:17, Ervin Hegedüs a écrit : > > > > in my parser code I got: > > > > #ifdef YYDEBUG > > yydebug = 1; > > #endif > > > > and I compiled the code: > > bison -d myparser.y > > flex -d mylexer.l > > gc

Re: Question about token stack

2020-08-30 Thread Akim Demaille
> Le 30 août 2020 à 17:17, Ervin Hegedüs a écrit : > > in my parser code I got: > > #ifdef YYDEBUG > yydebug = 1; > #endif > > and I compiled the code: > bison -d myparser.y > flex -d mylexer.l > gcc ... > > the output is: > > --accepting rule at line 52 ("ConfKey2") > --accepting rule at

Re: Question about token stack

2020-08-30 Thread Ervin Hegedüs
Hi Akim, thanks again. On Sun, Aug 30, 2020 at 05:04:50PM +0200, Akim Demaille wrote: > > > > Le 30 août 2020 à 16:36, Ervin Hegedüs a écrit : > > > > %destructor { printf("free() called\n"); free ($$); } <*> > > > > but it never called, and valgrind still shows that the block is > > still r

Re: Question about token stack

2020-08-30 Thread Akim Demaille
> Le 30 août 2020 à 16:36, Ervin Hegedüs a écrit : > > I just put: > > %destructor { printf("free() called\n"); free ($$); } <*> > > but it never called, and valgrind still shows that the block is > still reachable. You should add debug traces and study them. Pay special attention to the e

Re: Question about token stack

2020-08-30 Thread Akim Demaille
Hi Ervin, > Le 30 août 2020 à 11:44, Ervin Hegedüs a écrit : > > Hi all, > > and in parser: > > https://github.com/airween/flextest/blob/master/myparser.y#L52 > > config_directive_line: > T_CONFIG_DIRECTIVE T_CONFIG_DIRECTIVE_ARGUMENT { printf("'%s' '%s'\n", > $1, $2); free($1); free($2

Re: Question about token stack

2020-08-30 Thread Ervin Hegedüs
Hi Akim many thanks for your answer. On Sun, Aug 30, 2020 at 03:43:54PM +0200, Akim Demaille wrote: > Hi Ervin, > > > Le 30 août 2020 à 11:44, Ervin Hegedüs a écrit : > > > > How can I avoid this situation? Is that any "best-practice"? How > > can I access to pointers in stack to free them whe

Question about token stack

2020-08-30 Thread Ervin Hegedüs
Hi all, I could finish the handling of include files - both for explicit listing and using metacharacters (eg. config*.conf). You can check that here: https://github.com/airween/flextest (Note, this is just an example project...) I still have a question - as you can see, I've crea

Re: Very basic question about Flex

2019-02-27 Thread workbe...@gmx.at
Found my thinking error... On 27.02.19 15:48, workbe...@gmx.at wrote: Hi again, i tried the first example and when i set .|\n { /* do nothing */ } [_a-zA-Z]+\( { printf("function_name: %s", yytext); } He still matches 324_functionname( =(. I thought it's because of the default route but th

Re: Very basic question about Flex

2019-02-27 Thread workbe...@gmx.at
Hi again, i tried the first example and when i set .|\n { /* do nothing */ } [_a-zA-Z]+\( { printf("function_name: %s", yytext); } He still matches 324_functionname( =(. I thought it's because of the default route but that seems not to be the issue, what am i missing here ? best regards!

Re: Very basic question about Flex

2019-02-22 Thread workbe...@gmx.at
Thanks for you help. Now i've typed in one of the first examples and it throws me an strange error: > flex01.l:99: premature EOF The code looks like this: %{ #include #include #include enum {     LOOKUP = 0,     BOOL,     INT,     FLOAT,     STRING,     VEC2,     VEC3,     VEC4 }; int sta

RE: Very basic question about Flex

2019-02-22 Thread Jannick
On Fri, 22 Feb 2019 17:02:57 +0100, workbe...@gmx.at wrote: > $gcc lex.yy.c -o test -Wall Comparing to your earlier compile statement, you dropped '-lfl' which caused the linking error. To remedy the situation add to the top of the flex file %option noyywrap %option noinput nounput Then the e

Re: Very basic question about Flex

2019-02-22 Thread workbe...@gmx.at
actly what it is expected to do, since the line .|\n { ECHO; /* normal default anyway */ } makes it print any character (inkl. '\n') not in [a-zA-Z] to stdout. Now my question is when i enter one of the verbs it's working normaly like expected, but when i enter for example 234somewo

RE: Very basic question about Flex

2019-02-22 Thread Jannick
, since the line > .|\n { ECHO; /* normal default anyway */ } makes it print any character (inkl. '\n') not in [a-zA-Z] to stdout. > Now my question is when i enter one of the verbs it's working normaly like > expected, but when i enter for example 234someword i also get the

Re: Very basic question about Flex

2019-02-22 Thread John P. Hartmann
Congratulations on reading the manual. You clearly think that flex matches a line at a time. Not so. Perhaps read the books to the end first? On 2/22/19 15:00, workbe...@gmx.at wrote: Now my question is when i enter one of the verbs it's working normaly like expected, but when i ente

Re: Very basic question about Flex

2019-02-22 Thread Simon Richter
Hi, On 22.02.19 15:00, workbe...@gmx.at wrote: > [a-zA-Z]+ { printf("%s is not a verb", yytext); } > > .|\n { ECHO; /* normal default anyway */ } > Now my question is when i enter one of the verbs it's working normaly > like expected, but when i enter for exam

Very basic question about Flex

2019-02-22 Thread workbe...@gmx.at
| has | have | had | go { printf("%s is a verb\n", yytext); } [a-zA-Z]+ { printf("%s is not a verb", yytext); } .|\n { ECHO; /* normal default anyway */ } %% int main(int argc, char **argv) {     yylex(); } Now my question is when i enter one of the verbs it's working norm

Re: [Question]:Question about bison adding GPL copyright to the parser files generated by bison and yacc.c

2019-01-26 Thread Hans Åberg
> On 26 Jan 2019, at 23:54, Christian Schoenebeck > wrote: > > On Samstag, 26. Januar 2019 22:29:08 CET Hans Åberg wrote: >>> No, that's not what the exception sais. The exception applies (and hence >>> the freedom to distribute a Bison generated parser under any arbitrary, >>> different licens

Re: [Question]:Question about bison adding GPL copyright to the parser files generated by bison and yacc.c

2019-01-26 Thread Christian Schoenebeck
On Samstag, 26. Januar 2019 22:29:08 CET Hans Åberg wrote: > > No, that's not what the exception sais. The exception applies (and hence > > the freedom to distribute a Bison generated parser under any arbitrary, > > different license than GPL) only if the generated parser is not itself a > > parser

Re: [Question]:Question about bison adding GPL copyright to the parser files generated by bison and yacc.c

2019-01-26 Thread Hans Åberg
> On 26 Jan 2019, at 23:36, John P. Hartmann wrote: > > I'm glad we two at least agree here. Then it follows that the copyright > notice should not be copied into the output file. It is, if memory serves, a > trivial change to the skeleton files to make that happen. It can be copied to the

Re: [Question]:Question about bison adding GPL copyright to the parser files generated by bison and yacc.c

2019-01-26 Thread Hans Åberg
> On 26 Jan 2019, at 21:48, Christian Schoenebeck > wrote: > > On Samstag, 26. Januar 2019 14:31:06 CET Hans Åberg wrote: >>> On 21 Jan 2019, at 17:24, bird bravo wrote: >>> I noticed that when I use bison and the parser skeleton(yacc.c) to >>> >>> generate a parser file... there will be a c

Re: [Question]:Question about bison adding GPL copyright to the parser files generated by bison and yacc.c

2019-01-26 Thread Hans Åberg
> On 26 Jan 2019, at 21:48, Christian Schoenebeck > wrote: > > On Samstag, 26. Januar 2019 14:31:06 CET Hans Åberg wrote: >>> On 21 Jan 2019, at 17:24, bird bravo wrote: >>> I noticed that when I use bison and the parser skeleton(yacc.c) to >>> >>> generate a parser file... there will be a

Re: [Question]:Question about bison adding GPL copyright to the parser files generated by bison and yacc.c

2019-01-26 Thread Christian Schoenebeck
On Samstag, 26. Januar 2019 14:31:06 CET Hans Åberg wrote: > > On 21 Jan 2019, at 17:24, bird bravo wrote: > >I noticed that when I use bison and the parser skeleton(yacc.c) to > > > > generate a parser file... there will be a copyright notice to claim the > > file is a GPLV3 and an exception

Re: [Question]:Question about bison adding GPL copyright to the parser files generated by bison and yacc.c

2019-01-26 Thread Hans Åberg
> On 21 Jan 2019, at 17:24, bird bravo wrote: > >I noticed that when I use bison and the parser skeleton(yacc.c) to > generate a parser file... there will be a copyright notice to claim the > file is a GPLV3 and an exception declaration... I wanna know is that OK to > use and distribute the

Re: [Question]:Question about bison adding GPL copyright to the parser files generated by bison and yacc.c

2019-01-22 Thread Christian Schoenebeck
On Dienstag, 22. Januar 2019 00:24:50 CET bird bravo wrote: > Dear bison maintainer: If you want an official response you might rather ask on the developers list. I am just a Bison user like you. > I noticed that when I use bison and the parser skeleton(yacc.c) to > generate a parser file...

[Question]:Question about bison adding GPL copyright to the parser files generated by bison and yacc.c

2019-01-21 Thread bird bravo
Dear bison maintainer: I noticed that when I use bison and the parser skeleton(yacc.c) to generate a parser file... there will be a copyright notice to claim the file is a GPLV3 and an exception declaration... I wanna know is that OK to use and distribute the parser file as I wish.. Forgive a

Re: Bison 3.0.4 manual section 3.7.6 question

2018-08-18 Thread Akim Demaille
Hi! > Le 15 févr. 2016 à 01:31, Gary L Peskin a écrit : > > In the Bison 3.0.4 manual in section 3.7.6 on destructors, the example > shows: > > %union { char *string; } > %token STRING1 STRING2 > %type string1 string2 > %union { char character; } > %token CHR > %type chr > %token T

Bison 3.0.4 manual section 3.7.6 question

2016-02-14 Thread Gary L Peskin
In the Bison 3.0.4 manual in section 3.7.6 on destructors, the example shows: %union { char *string; } %token STRING1 STRING2 %type string1 string2 %union { char character; } %token CHR %type chr %token TAGLESS %destructor { } %destructor { free ($$); } <*> %destructor

Re: [Question] - Is it a good idea to parse groff with Bison?

2015-11-07 Thread John Levine
>Do you believe that its a good idea to use Bison for this?. Probably not. Groff syntax is really simple, and the nesting is kludgy enough that I'd suggest doing it by hand rather than trying to force it into bison. You'll also probably find that parsing groff is about 5% of the work, and figuri

Re: [Question] - Is it a good idea to parse groff with Bison?

2015-11-06 Thread Roberto Jesus Dip
gt; >> Hey Chris, >> >> Thanks so much for your answer. >> >> Indeed, the Stackoverflow question is mine :). Is a bad behavior to post >> in multiple forums / lists?. >> >> Regarding the topic, I have seen the groff source code, and although some &g

Re: [Question] - Is it a good idea to parse groff with Bison?

2015-11-06 Thread Chris verBurg
arsing and watch the world burn. But, check with the groff guys. :) -Chris On Fri, Nov 6, 2015 at 2:56 AM, Roberto Jesus Dip wrote: > Hey Chris, > > Thanks so much for your answer. > > Indeed, the Stackoverflow question is mine :). Is a bad behavior to post > in multiple forum

Re: [Question] - Is it a good idea to parse groff with Bison?

2015-11-06 Thread Roberto Jesus Dip
Hey Chris, Thanks so much for your answer. Indeed, the Stackoverflow question is mine :). Is a bad behavior to post in multiple forums / lists?. Regarding the topic, I have seen the groff source code, and although some pre-processors like `eqn` and `pic` are using bison, groff itself and 95% of

Re: [Question] - Is it a good idea to parse groff with Bison?

2015-11-05 Thread Chris verBurg
Whoa, this looks just like a question posted in Stackoverflow a few hours ago! :) A cursory googling gives me evidence that groff itself uses bison, which would make jison a good match for parsing it, yes. -Chris On Thu, Nov 5, 2015 at 3:24 PM, Roberto Jesus Dip wrote: > Hello every

[Question] - Is it a good idea to parse groff with Bison?

2015-11-05 Thread Roberto Jesus Dip
Hello everyone, As part of a pet project, I'm trying to parse groff using Jison ( essentially a clone of Bison, but in JavaScript ). The idea behind this is to be able to parse groff to HTML in the browser, and make a live editor of man pages ( similar to http://dillinger.io/ ). Do you believe

Re: QUESTION: alias

2015-01-05 Thread Akim Demaille
> Le 25 oct. 2014 à 22:41, sean nakasone a écrit : > > Hi, In the bison source code, the symbol structure has an alias attribute > which is a *symbol. Is this alias used solely for associating a token type > name to a literal string constant? > > i.e. > %token arrow "=>" Yes. > Is the alia

Re: QUESTION: trying to speed up "make install"

2015-01-04 Thread Sean Nakasone
thanks for your reply. make install is too slow for me since i was running it after many incremental changes. i've since been using make src/bison.exe; cp src/bison.exe /usr/local/bin which is working well for my incremental changes. Sent from my iPhone > On Jan 4, 2015, at 9:58 AM, A

Re: QUESTION: trying to speed up "make install"

2015-01-04 Thread Akim Demaille
> Le 3 nov. 2014 à 05:56, sean nakasone a écrit : > > Hi, everytime I run "make install", it does this... > > installing ast.gmo as /usr/local/share/locale/ast/LC_MESSAGES/bison-runtime.mo > installing da.gmo as /usr/local/share/locale/da/LC_MESSAGES/bison-runtime.mo > installing de.gmo as /usr

Re: QUESTION: obstack, size of new chunk?

2015-01-04 Thread Hans Aberg
On 3 Jan 2015, at 21:15, Sean Nakasone wrote: > > Hi, lib/obstack.c has a function, _obstack_newchunk(). > > there's a formula used to calculate a variable new_size > > new_size = (obj_size + length) + (obj_size >> 3) + h->alignment_mask + 100; > > i understand obj_size + length, but what's t

QUESTION: obstack, size of new chunk?

2015-01-03 Thread Sean Nakasone
Hi, lib/obstack.c has a function, _obstack_newchunk(). there's a formula used to calculate a variable new_size new_size = (obj_size + length) + (obj_size >> 3) + h->alignment_mask + 100; i understand obj_size + length, but what's the other stuff for? thanks, Sean Sent from my iPhone

Re: QUESTION: what does LR(0) mean? and what's behind the name LR0.c ?

2014-12-31 Thread Akim Demaille
> Le 6 oct. 2014 à 19:37, John Levine a écrit : > > In article <1412583978.11745.yahoomailba...@web126104.mail.ne1.yahoo.com> you > write: >> Hi, I'm going through the bison code, and I'm curious as to the name of the >> source code file LR0.c . >> >> Seems like this file creates the states.

QUESTION: what technique used in pack_tables() ?

2014-12-27 Thread sean nakasone
Hi Folks, anyone know what technique is used in pack_tables() ? This is in tables.c. Is the goal to find the order of something that uses the least amount of space? There's a comment "Use the greatest possible negative infinites". What does this mean? __

Re: QUESTION: what is \c, \pre, \post in ielr.c ?

2014-11-26 Thread Evan Lavelle
On 26/11/2014 07:11, sean nakasone wrote: Hi, in ielr.c , there's comments that refer to things like: \post, \pre, \c . Doxygen: http://www.stack.nl/~dimitri/doxygen/index.html http://www.stack.nl/~dimitri/doxygen/manual/commands.html#cmdpre http://www.stack.nl/~dimitri/doxygen/manual/command

QUESTION: what is \c, \pre, \post in ielr.c ?

2014-11-25 Thread sean nakasone
Hi, in ielr.c , there's comments that refer to things like: \post, \pre, \c . What do these mean? Here's an example: /** * \pre: * - \c ritem_sees_lookahead_set was computed by * \c ielr_compute_ritem_sees_lookahead_set. * \post: * - Each of \c *edgesp and \c *edge_countsp is a new

QUESTION: trying to speed up "make install"

2014-11-02 Thread sean nakasone
Hi, everytime I run "make install", it does this... installing ast.gmo as /usr/local/share/locale/ast/LC_MESSAGES/bison-runtime.mo installing da.gmo as /usr/local/share/locale/da/LC_MESSAGES/bison-runtime.mo installing de.gmo as /usr/local/share/locale/de/LC_MESSAGES/bison-runtime.mo installing el

QUESTION: alias

2014-10-25 Thread sean nakasone
Hi, In the bison source code, the symbol structure has an alias attribute which is a *symbol. Is this alias used solely for associating a token type name to a literal string constant? i.e. %token arrow "=>" Is the alias used in other situations? Thanks, Sean _

Re: QUESTION: what does LR(0) mean? and what's behind the name LR0.c ?

2014-10-06 Thread John Levine
In article <1412583978.11745.yahoomailba...@web126104.mail.ne1.yahoo.com> you write: >Hi, I'm going through the bison code, and I'm curious as to the name of the >source code file LR0.c . > >Seems like this file creates the states. After they are created, the first >state is at state 0. You mi

QUESTION: what does LR(0) mean? and what's behind the name LR0.c ?

2014-10-06 Thread sean nakasone
Hi, I'm going through the bison code, and I'm curious as to the name of the source code file LR0.c . Seems like this file creates the states. After they are created, the first state is at state 0. Is this why it's called LR0.c ? Could it have been named something like generate-states.c ? I

Re: QUESTION: is bison recursive?

2014-07-28 Thread Sean Nakasone
thanks Valentin, i wasnt aware of the -p option. Sent from my iPhone > On Jul 27, 2014, at 11:29 PM, Valentin Tolmer > wrote: > > Hello, > > From a make -p (to display implicit rules), I get > %.c: %.y >$(YACC.y) $< >mv -f y.tab.c $@ > > In most systems, yacc is aliased to b

Re: QUESTION: is bison recursive?

2014-07-28 Thread Valentin Tolmer
Hello, From a make -p (to display implicit rules), I get %.c: %.y $(YACC.y) $< mv -f y.tab.c $@ In most systems, yacc is aliased to bison when installed. Cheers, On Mon, Jul 28, 2014 at 9:12 AM, Tadej Borovšak wrote: > Dne 27.07.2014 (ned) ob 20:29 +0200 je Hans Aberg napisa

Re: QUESTION: is bison recursive?

2014-07-28 Thread sean nakasone
I found the implicit rule in the Makefile. I believe it's calling a bison in the tests subfolder. Thanks for your help Tadej and Hans On Sun, 7/27/14, Tadej Borovšak wrote: Subject: Re: QUESTION: is bison recursive? To: help-bison@gnu.org

Re: QUESTION: is bison recursive?

2014-07-28 Thread Tadej Borovšak
Dne 27.07.2014 (ned) ob 20:29 +0200 je Hans Aberg napisal(a): > On 27 Jul 2014, at 02:35, sean nakasone wrote: > > > Anyone know if bison is recursive? Meaning, does the bison build call > > bison? > > Yes, the file src/parse-gram.y is used to make the Bison parser. > > > The reason I'm askin

Re: QUESTION: is bison recursive?

2014-07-27 Thread Hans Aberg
On 27 Jul 2014, at 02:35, sean nakasone wrote: > Anyone know if bison is recursive? Meaning, does the bison build call bison? Yes, the file src/parse-gram.y is used to make the Bison parser. > The reason I'm asking is because I'm going through the bison 3.0 makefile and > I don't see where bi

QUESTION: is bison recursive?

2014-07-27 Thread sean nakasone
Anyone know if bison is recursive? Meaning, does the bison build call bison? The reason I'm asking is because I'm going through the bison 3.0 makefile and I don't see where bison is actually being called. Sean ___ help-bison@gnu.org https://lists.g

FW: Hello, a question on Bison build.

2013-12-26 Thread Fang Liu
t from the people(user)'s host's real dir. And it rsync later to other ppl's pc, Then this path would not work for them. My question is that, is it possible to specify a relatif path while compile/install Bison,(for example relatif to Bison binary or other working dir). Or in r

Re: Question about bison license

2011-05-10 Thread Alfonso Urdaneta
On 5/4/11 2:26 PM, Andrey Kouninski (kounina) wrote: Please elaborate what is the license on this file because is different than the tarballs from bison? Is there any exception ally for this file? It is to allow you to use bison generated parsers in closed source projects. This is different

Re: yyerror strlen question

2010-01-17 Thread Joel E. Denny
On Mon, 18 Jan 2010, tys lefering wrote: > > As I posted earlier today, we have plans to provide an alternative to > > yyerror. One feature we've discussed is the ability to iterate the > > expected tokens and construct the error message yourself. That would > > allow you to place whatever limit

Re: yyerror strlen question

2010-01-17 Thread tys lefering
On Sun, January 17, 2010 22:37, Joel E. Denny wrote: >> and resulting longest string is like this: >> YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or >> %s")); >> is this correct ? > > For now, but 5 is an arbitrary limit, and I know of no guarantee that > Bison won't evolv

Re: yyerror strlen question

2010-01-17 Thread Joel E. Denny
On Sun, 17 Jan 2010, tys lefering wrote: > using YYERROR_VERBOSE in a bison grammar to get a verbose > error message at yyerror() it is not mentioned how large > the error message string may be in the manual or source > http://www.gnu.org/software/bison/manual/bison.html#Error-Reporting As far as

yyerror strlen question

2010-01-17 Thread tys lefering
Hi, using YYERROR_VERBOSE in a bison grammar to get a verbose error message at yyerror() it is not mentioned how large the error message string may be in the manual or source http://www.gnu.org/software/bison/manual/bison.html#Error-Reporting reading in the generated yacc y.tab.c the string looks t

Re: Question about using Bison

2009-12-08 Thread Philip Herron
t;> I've faced with a problem with starting and compilation of the code, >> written >> in Bison notation. >> My question is the following: what additional utiles I might have and how >> I >> must apply them to compile the code?.. >> >> I'll be

Re: Question about using Bison

2009-12-08 Thread Luca
tation. My question is the following: what additional utiles I might have and how I must apply them to compile the code?.. I'll be very grateful if you help me. Look forward to hearing from you soon. All the best, Anna Ilinkova ___ help-bis

Question about using Bison

2009-12-08 Thread Anna Ilinkova
Good afternoon! Sorry, I would like you to help me with a problem. I'm working on the computer with Windows XP Professional. Besides MS Visual Studio 2005 is installed. I've faced with a problem with starting and compilation of the code, written in Bison notation. My question is the

Re: Question: bison 2.4.1 breaks binutils/ld/deffilep.y, with fix

2009-04-29 Thread Akim Demaille
g defined twice, that's a MacOS change. The suggestion by H-P from the binutils list was to #undef STACKSIZE between the system includes and the (bison generated) definition. Thanks for all your input, I think the next question now is whether the binutils crew wants to see a fix like

Re: Question: bison 2.4.1 breaks binutils/ld/deffilep.y, with fix

2009-04-28 Thread Alan Modra
1: warning: this is the location of the > > > > previous definition > Thanks for all your input, I think the next question now is whether the > binutils crew wants to see a fix like this coming. This should fix the problem. We add _K for quite a few tokens in ldgram.y

Re: Question: bison 2.4.1 breaks binutils/ld/deffilep.y, with fix

2009-04-28 Thread Joel E. Denny
On Tue, 28 Apr 2009, Danny Backx wrote: > Now the result (below) appears to be that the MacOS problem in the > binutils/ld only appears when combined with bison 2.4.1. > I don't see the issue on my x86 linux PC (I moved bison to 2.4.1 but the > binutils build wouldn't break). > > /bin/sh /Users/c

Re: Question: bison 2.4.1 breaks binutils/ld/deffilep.y, with fix

2009-04-28 Thread Joel E. Denny
On Tue, 28 Apr 2009, Joel E. Denny wrote: > On Tue, 28 Apr 2009, Danny Backx wrote: > > > This started for me as a report from Ismail that the cegcc build broke > > on his Mac. I asked about this on the binutils list, got a reply from > > H-P that Ismail went on to verify. > > > > Now the result

Re: Question: bison 2.4.1 breaks binutils/ld/deffilep.y, with fix

2009-04-28 Thread Joel E. Denny
On Tue, 28 Apr 2009, Danny Backx wrote: > This started for me as a report from Ismail that the cegcc build broke > on his Mac. I asked about this on the binutils list, got a reply from > H-P that Ismail went on to verify. > > Now the result (below) appears to be that the MacOS problem in the > bi

Re: Question: bison 2.4.1 breaks binutils/ld/deffilep.y, with fix

2009-04-28 Thread Danny Backx
ol is. > > I'd say the backward incompatibility here is really in MacOS. Bison's > backward incompatibility just converted the important warning into an > error. My compliments for reading this so thoroughly ! (not kidding !) You're right, the original issue was th

Question: bison 2.4.1 breaks binutils/ld/deffilep.y, with fix

2009-04-28 Thread Danny Backx
Hi, This started for me as a report from Ismail that the cegcc build broke on his Mac. I asked about this on the binutils list, got a reply from H-P that Ismail went on to verify. Now the result (below) appears to be that the MacOS problem in the binutils/ld only appears when combined with bison

Question for types in bison

2009-01-28 Thread david sander
Hello i have a problem with types of non-terminals in bison The testing of the types doesn't run as it have to do in the following example expr: expr '+' expr{if ($1 && $3) {$$= $1+$3 ;} /* beides int*/ else if($1 && $3) {$$= $1+$3 ;} /* beides float*/

Re: i have a question about yylex() in parse.y

2008-11-21 Thread Akim Demaille
Le 21 nov. 08 à 13:50, 山东 a écrit : bash 1.05 yylex()in parse.y is maked with flex? i don't see lex.l in the directory bash\. This mailing list is about getting help with Bison, not with packages using Bison. ___ help-bison@gnu.org http://lists.

i have a question about yylex() in parse.y

2008-11-21 Thread 山东
bash 1.05 yylex()in parse.y is maked with flex? i don't see lex.l in the directory bash\. ___ help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Re: Question about GLR parsing with bison 2.3

2008-06-03 Thread Derek M Jones
Pierre PICARD wrote: I have a problem using bison 2.3, I read the documentation, but I did not found what I was searching for. Here is my problem : I'am writing a GLR parser, and I would like to do a semantic check in a semantic action that would have the following behavior if the check fails

Question about GLR parsing with bison 2.3

2008-06-02 Thread Pierre PICARD
I have a problem using bison 2.3, I read the documentation, but I did not found what I was searching for. Here is my problem : I'am writing a GLR parser, and I would like to do a semantic check in a semantic action that would have the following behavior if the check fails : - while a deterministi

Re: initial-action question

2008-02-12 Thread lfinsto1
Aaron Jackson wrote: > Thanks for the response. You're welcome. > On Feb 11, 2008, at 5:03 AM, [EMAIL PROTECTED] wrote: > >> To the best of my knowledge, you would need to modify the skeleton file. [...] > I wanted to avoid this since I want my .y code to be portable. It would be. You'd just

Re: initial-action question

2008-02-11 Thread Joel E. Denny
On Mon, 11 Feb 2008, Aaron Jackson wrote: > I would like to declare some variables that are local to yyparse. > If I use %parse-param{variables_t variables;}, > where variables_t is a structure containing x,y,z, I get what I want, but > since I don't need x,y,z after yyparse returns, this seems l

Re: initial-action question

2008-02-11 Thread Aaron Jackson
Thanks for the response. On Feb 11, 2008, at 5:03 AM, [EMAIL PROTECTED] wrote: I would like to declare some variables that are local to yyparse. To the best of my knowledge, you would need to modify the skeleton file. When I wanted to do this, I determined that it was not possible otherwi

Re: initial-action question

2008-02-11 Thread Hans Aberg
On 11 Feb 2008, at 09:17, Aaron Jackson wrote: I would like to declare some variables that are local to yyparse. I am building a linked list of structures, and I need to make sure I have values for all the structure members before I add a new node to the list. Since I wrote the parser to

Re: initial-action question

2008-02-11 Thread lfinsto1
> I would like to declare some variables that are local to yyparse. To the best of my knowledge, you would need to modify the skeleton file. When I wanted to do this, I determined that it was not possible otherwise. I may be wrong, but I don't think this has changed with more recent versions. >

initial-action question

2008-02-11 Thread Aaron Jackson
I would like to declare some variables that are local to yyparse. I am building a linked list of structures, and I need to make sure I have values for all the structure members before I add a new node to the list. Since I wrote the parser to be a pure parser, global variables, are not an

Re: Question/Feature Request - #include

2007-03-15 Thread Hans Aberg
On 15 Mar 2007, at 16:34, Matt Cupp wrote: I was wondering if there is currently a way to include other files in a Bison source file at run time? Like C/C++'s #include preprocessor directive. If not is this something I could add to feature requests? (You probably mean compile time - "run tim

Question/Feature Request - #include

2007-03-15 Thread Matt Cupp
Hi, I was wondering if there is currently a way to include other files in a Bison source file at run time? Like C/C++'s #include preprocessor directive. If not is this something I could add to feature requests? Thanks, Matt Cupp ___ help-bison@gnu.

Re: A simple Question about Bison.

2006-12-25 Thread Hans Aberg
http://directory.fsf.org/GNU/bison.html http://www.gnu.org/software/bison/bison.html http://en.wikipedia.org/wiki/GNU_bison Hans Aberg On 25 Dec 2006, at 11:27, Jewel wrote: Though i have used flex but i havnt got a clue about what bison exactly do so I have a simple question

A simple Question about Bison.

2006-12-25 Thread Jewel
Though i have used flex but i havnt got a clue about what bison exactly do so I have a simple question. What does exactly bison do? please any one can answer or explain in simple words.(A paragraph or two). any help would be Appriciated. Thanks. -- View this message in context: http

Licencing question

2006-09-14 Thread altala vista
Hi, I want to use Bison to generate a parser. This parser will be part of an application. Should this application be GNU GPL like Bison or it can be BSD or a commercial application? Tanks a lot. Vista! _ Buy what you want when

Re: question

2005-08-15 Thread David Ja
Hi, I see now. Thank you guys all very much. You have been extremely helpful. I'll tried it some more. Thanks again. Best, David On 8/15/05, Sylvain Schmitz <[EMAIL PROTECTED]> wrote: > > David Ja wrote: > > All I wanted to do was to > > take advantage of bison's parser which generates the D

Re: question

2005-08-15 Thread Sylvain Schmitz
David Ja wrote: All I wanted to do was to take advantage of bison's parser which generates the DFA, which in turn, allows me to step through the DFA in sequence generating a sample string that fits the grammar input. Are you clear with the fact that the DFA generated by bison is not a DFA fo

Re: question

2005-08-15 Thread Hans Aberg
On 15 Aug 2005, at 05:20, David Ja wrote: Thank you guys very much. I noticed my mistakes as well. Forgetting to allocate memory is quite embrassing. Thank you very much again for helping me. I guess in a sense it is a pretty-printing function. The point however is not the print anythin

Re: question

2005-08-14 Thread David Ja
Hi, Thank you guys very much. I noticed my mistakes as well. Forgetting to allocate memory is quite embrassing. Thank you very much again for helping me. I guess in a sense it is a pretty-printing function. The point however is not the print anything. I want to generate a bunch of strings bas

Re: question

2005-08-14 Thread Hans Aberg
On 14 Aug 2005, at 06:15, David Ja wrote: I been trying to adapted bison to my own purpose but after a month of trying I can't seem to figure out a way to make it work. All I wanted to do was to take advantage of bison's parser which generates the DFA, Bison does not generate a DFA, but

Re: question

2005-08-14 Thread Kelly Leahy
I don't see you allocating memory for myoutput anywhere. Perhaps you could declare myoutput as char[512] or something like that to begin with. Otherwise, in your myoutput == NULL branch of the IF statement, you need to allocate memory, rather than just doing strcpy. Kelly --- David Ja <[EMAIL P

question

2005-08-14 Thread David Ja
Hi, My name is David Ja, an undergraduate student at university of pennsylvania. I am attempting to start a minor research project myself. I been trying to adapted bison to my own purpose but after a month of trying I can't seem to figure out a way to make it work. All I wanted to do was to ta

  1   2   >