help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multiple Parsers in the Same Program


From: Patrick Bellasi
Subject: Multiple Parsers in the Same Program
Date: Sat, 4 Sep 2004 10:33:57 +0000
User-agent: KMail/1.6.2

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi *!
        I need to build a multi-parser... (using the %name-prefix="PREFIX" 
directive).
Precisely I've only ONE scanner that has to serve two different parser.

Anyone can suggest to me a skeleton for that pourpose, I need TWO different 
parser functions that invoke THE SAME scanner. For instance:
first_parse() and second_parse() that use yylex()

Is it correct to wrap yylex() inside each parser definition with the 
corresponding scanner functions? That is:

first_lex() {
        return yylex();
}

and

second_lex() {
        return yylex();
}




Thanks in advance,
        Patrick
- --



<---------------------------------------------------------------------------------------------------------->
                                                  DERKLING
                                    LRU 338214 (http://counter.li.org)

  #include <best/regards.h>


<---------------------------------------------------------------------------------------------------------->
   Patrick Bellasi <derkling_at_users.sourceforge.net>
   Student (Politecnico di Milano)
       Comp.Sci & Soft.Eng

   Contacts:
    - Room +39 02 23952621
    - Home +39 0342 621043 (week-ends)
    - ICQ   344672588
    - MSN   address@hidden

   Privacy:
    - PGP   0x72ABC1EE (www.keyserver.net)
      pub  1024D/72ABC1EE 2003-12-04 Patrick Bellasi (PGP key for poste.it)
<address@hidden>
      Primary key fingerprint: 3958 7B5F 36EC D1F8 C752  9589 C3B7 FD49 72AB
C1EE
<---------------------------------------------------------------------------------------------------------->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBOZoeeGk3pQ7APA8RApi/AJ9YyqlAblpkDLwBgfdNUZ9PwQiSSQCePsNa
TtgAEenf4v7idt1tWQNGqac=
=rCtL
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]