Re: Lex/Yacc: Multiple parsers in one file

Oliver Bandel <>
3 Apr 2006 01:39:19 -0400

          From comp.compilers

Related articles
Lex/Yacc: Multiple parsers in one file (Christoph B.) (2006-03-29)
Re: Lex/Yacc: Multiple parsers in one file (Joshua Shinavier) (2006-04-01)
Re: Lex/Yacc: Multiple parsers in one file (Oliver Bandel) (2006-04-03)
Re: Lex/Yacc: Multiple parsers in one file (Paul Ogilvie) (2006-04-08)
| List of all articles for this month |

From: Oliver Bandel <>
Newsgroups: comp.compilers
Date: 3 Apr 2006 01:39:19 -0400
Organization: Individual Network Berlin e.V.
References: 06-03-096
Keywords: parse,
Posted-Date: 03 Apr 2006 01:39:19 EDT

Christoph B. wrote:
> Thanks for supporting me on my C/C++ problem, finally I got it fixed and
> my parser is working pretty fine now. Unfortunately the next problem is
> to be solved. I need to merge the input of two different files (or file
> types), that need different parsers. They do not need to be parsed
> simultaneously but because these files are related quite closely to each
> other, I would prefer to put the parsers together in one.
> Does anyone know where to find a simple example on how to use mulitple
> parsers in one file? Or maybe someone can give me instructions or a
> short example?
> Again, I believe I should mention that I am really a newbie on lex/yacc
> and that I am quite new to coding C++ as well.

As you are new to C++ as well, why not looking at OCaml as your
programming language? It offers you a lot of useful datastructures, a
*really* high level programming language, and ocamllex and ocamlyacc
can be used in the way you want to. :)


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.