|Grammars, Ambiguous, ASN.1 email@example.com (1999-06-19)|
|Re: Grammars, Ambiguous, ASN.1 firstname.lastname@example.org (Dmitri Katchalov) (1999-06-27)|
|Re: Grammars, Ambiguous, ASN.1 email@example.com (Rajappa Iyer) (1999-06-27)|
|Re: Grammars, Ambiguous, ASN.1 firstname.lastname@example.org (Robin Edgar Hansen) (1999-06-27)|
|Re: Grammars, Ambiguous, ASN.1 Christian.Rinderknecht@int-evry.fr (Christian Rinderknecht) (1999-06-29)|
|Re: Grammars, Ambiguous, ASN.1 Christian.Rinderknecht@int-evry.fr (Christian Rinderknecht) (1999-07-01)|
|Re: Grammars, Ambiguous, ASN.1 email@example.com (1999-07-05)|
|Re: Grammars, Ambiguous, ASN.1 firstname.lastname@example.org (Geoff Elgey) (1999-07-10)|
|From:||Rajappa Iyer <email@example.com>|
|Date:||27 Jun 1999 00:01:33 -0400|
firstname.lastname@example.org (Steve Elkins) writes:
> 3. What other advice do the readers of this newsgroup have to offer
Bear in mind that the ASN.1 grammar is ambiguous and cannot be parsed
completely with LALR(1). It needs lexical tie-ins for disambiguation.
Also, while writing a compiler from scratch is a lot of fun (I've done
it in Perl, using Yapp a Perl-only Yacc replacement), it is a lot of
work. I'd suggest starting with the freely available ASN.1 compiler
SNACC. Last I looked, it generated C and C++ encoders and decoders
and could be extended for other languages as well.
Also, macros are horrendously hard, if not downright impossible, to
implement with Yacc and friends since macros can change the grammar
midstream. If you must have the SNMP macros, it is far better to
hard-code them---this is what SNACC does... a sensible approach IMHO.
Snacc may be found at:
Rajappa Iyer <email@example.com> #include <std_disclaimer.h>
We're too busy mopping the floor to turn off the faucet.
Return to the
Search the comp.compilers archives again.