Better late than never :-)

Patrick

On Thu, 25 October 2001, John Larmouth wrote:

> 
> I am not a BNF expert, so just a layman's question:  Can the problems
> you are having be mended by simply changing the BNF in the ASN.1, or
> would a mend affect the actual notation being defined?
> 
> If the former, do you have (or could you produce) a complete set of
> proposed changes to the BNF that would correct the problem?
> 
> If the latter, I am afraid you are about twenty years too late!
> 
> John L
> 
> Patrick Henry wrote:
> > 
> > On Thu, 18 October 2001, Olivier Dubuisson wrote:
> > 
> > >
> > > Andrew Sutton wrote:
> > > >
> > > > hi,
> > > >
> > > > i've gotten bored so i've been working on an ASN.1 compiler based on the 97
> > > > specifications. actually, it was going pretty well until i realized that i
> > > > had mistyped the SymbolsImported productions. anyway, i ran into a problem
> > > > and had some feedback or could propose an alternative syntax...
> > > >
> > > > it seems that the way that the SymbolsFromModuleList is constructed, you can
> > > > run into a number of shift/reduce conflicts. if AssignedIdentifier attached
> > > > to the GlobalModuleReference is a DefinedValue it conflicts with the first
> > > > Symbol in the next SymbolList for multiple imports - if the first symbol is
> > > > an abstract value (as opposed to type). if i'm just looking at this all
> > > > wrong, let me know (like if its changed in a future version).
> > > >
> > > > otherwise, here's an alternative syntax that i'd propose (and implement)
> > > >
> > > > Exports ::=
> > > >         EXPORTS "(" SymbolList ")" ";" |
> > > >         empty
> > >
> > > I guess you meant "IMPORTS" here.
> > >
> > > > and
> > > >
> > > > SymbolsFromModule ::=
> > > >         "(" SymbolList ")" FROM GlobalModuleReference
> > >
> > > I don't understand what kind of problems you have with the SymbolList.
> > > It seems to me that your lexer doesn't provide the right lexical items to
> > > your parser.
> > >
> > 
> > Not exactly. The problem is that the 'valuereference' lexeme is used ambiguously 
>in two contexts, both the SymbolList production and the DefinedValue production 
>(which is part of AssignedIdentifier and hence GlobalModuleReference). There is no 
>way to resolve the conflict in a straight recursive descent parser without resorting 
>to the kind of fishing that Paul described in a prior message, q.v.
> > 
> > As for bottom-up parsing, my compliments to Christian for his brilliant display of 
>LALR(1) grammar transformations; but I have serious doubts about the sanity of such 
>an approach.
> > 
> > Any comments? To what extent has lex/yacc been used in ASN.1 compiler design?
> > 
> > Regards,
> > 
> > Patrick Henry
> > 
> -- 
>    Prof John Larmouth
>    Larmouth T&PDS Ltd
>    (Training and Protocol Development Services)
>    1 Blueberry Road                     
>    Bowdon                               [EMAIL PROTECTED]
>    Cheshire WA14 3LS                    Tel: +44 161 928 1605
>    England                Fax: +44 161 928 8069


Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com

Reply via email to