|Lookahead vs. Scanner Feedback email@example.com (1992-01-03)|
|Handling the typedef problem with a modifiable grammar firstname.lastname@example.org (1992-01-09)|
|Handling the typedef problem with a modifiable grammar email@example.com (Stephen J Bevan) (1992-01-13)|
|Programming language syntax design (was Re: ... typedef problem) landauer@morocco.Eng.Sun.COM (1992-01-14)|
|Parsing C typedefs firstname.lastname@example.org (1992-01-15)|
|Re: Programming language syntax design (was Re: ... typedef problem) email@example.com (1992-01-17)|
|Re: Programming language syntax design (was Re: ... typedef problem) firstname.lastname@example.org (1992-01-20)|
|From:||email@example.com (Boris Burshteyn)|
|Date:||Thu, 9 Jan 92 10:33:28 -0800|
This message regards typedef names recognition problem. It can be solved
in the modifiable gramars approach. Modifiable grammars allow to
add/delete rules from the basic set of rules while scanning the source
text. When reducing statement
typedef int foo;
a new rule
int : foo; // 1
will be introduced together with the new terminal 'foo'. Also, the basic
set of rules should contain a rule looking something like
declaration : int lis_of_identifiers ';' ; // 2
list_of_identifiers : identifier // 3
| list_of_identifiers ',' identifier // 4
Then, the text
will be reduced by the sequence of rules 1, 3, 2. The example presented
does not address issues of scope, i.e. what happens when typedefs are
redefined in the inner scope and then become visible again upon exiting
the scope. This relates to the way new rules are added/deleted to/from
the basic set. I have submitted to SIGPLAN NOTICES a description of a
metalanguage for the USSA system, based on this approach. The
metalanguage is powerful enoupgh to handle various scenarious of rules
modification, so that solutions to visibility and scope problems may be
There are also papers printed in SIGPLAN NOTICES, regarding this approach:
Henning Christiansen. "A Survey of Adaptable Grammars," Sigplan Notices,
V.25 N.11, 35-44, 1990.
Boris Burshteyn. "On the Modification of the Formal Grammar at Parse
Time," Sigplan notices, V.25 N.5, 117-123, 1990.
Boris Burshteyn. "Generation and Recognition of Formal Languages by
Modifiable Grammars," Sigplan Notices, V.25 N.12, 45-53, 1990.
Thanks, Boris Burshteyn - a man who can spell 'automaton'.
Return to the
Search the comp.compilers archives again.