Re: indentations instead of endtag in a grammar

2010-02-19 Thread Andreas Wagner
Hi Conrad, that is cool thx. But where is the yy_extra_type defined (redefinition of yy_extra)? Could you spost it? that would be fantastic :D Regards ___ help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Re: indentations instead of endtag in a grammar

2010-02-18 Thread Andreas Wagner
I have just one small question left. Is it possible to get the *.y file as well? If not its ok because its your code. I just want to understand the behaviour between flex and bison with line indentations. Regards 2010/2/18 Andreas Wagner > Hi Conrad, > > very much thx for your answer and the l

Re: indentations instead of endtag in a grammar

2010-02-18 Thread Andreas Wagner
Hi Conrad, very much thx for your answer and the link to the parathon.l file. I think this could help me a lot. Im not trying to parse Phyton-code. I have a language which is "python-like" cause of the line indentations. Regards 2010/2/17 Conrad Irwin > > > On 02/17/2010 02:22 PM, Andreas Wagn

Re: indentations instead of endtag in a grammar

2010-02-18 Thread Conrad Irwin
On 02/17/2010 02:22 PM, Andreas Wagner wrote: > Thx for your fast answers. I will take a look. > @ Istvan is it possible that u send me the *.l & *.y files for python > (if u have them)? > Or post a link. Always when i search for python and .y or bison i just > find links to PyBison or PLY but no

Re: indentations instead of endtag in a grammar

2010-02-17 Thread tys lefering
> @ Istvan is it possible that u send me the *.l & *.y files for python > Or post a link. Always when i search for python and .y or bison i just > find links to PyBison or PLY but no bison and lex file for Python. The python grammar is in the python source tree in directory Grammar, file Grammar.

Re: indentations instead of endtag in a grammar

2010-02-17 Thread Andreas Wagner
Thx for your fast answers. I will take a look. @ Istvan is it possible that u send me the *.l & *.y files for python (if u have them)? Or post a link. Always when i search for python and .y or bison i just find links to PyBison or PLY but no bison and lex file for Python. 2010/2/17, Hans Aberg : >

Re: indentations instead of endtag in a grammar

2010-02-17 Thread Hans Aberg
On 17 Feb 2010, at 14:12, Andreas Wagner wrote: The source code that I have to parse loks more like: if(signal): variable_a := do_something else: variable_b := do_something_other variable_c := signal_x; How can i tell Bison that that it has to look for the indentations? Has anyone maybe a

Re: indentations instead of endtag in a grammar

2010-02-17 Thread Istvan Sandor
Hi, > How can i tell Bison that that it has to look for the indentations? Has > anyone maybe an example that he/she can send me ? it would be very helpful, > because i havent seen such an example. Whitespace is usually handled by the lexer, in this case you need an indication of the amount of le

Re: indentations instead of endtag in a grammar

2010-02-17 Thread Andreas Wagner
Hi folks, im new to Flex and Bison. I have never worked before with these tools. But now i have to write a parser that parses some code. My Problem is to write rules for statements which have no "end-tags" like. I know how to write the grammar for following statements: If (...) ... end or if (..