[antlr-interest] parsing problem

thomaskrebs Thomas_Krebs at gmx.de
Tue Dec 23 01:12:14 PST 2003


Hi,

I have a problem parsing the following syntax:
The format is a kind of serialized objects which are dumped like this:
Each object name is prefixed with one or more dots where the number of
dots describe the context in which the object is used. E.g.:

.PAD "103th thermal"
..4_WEB_ROUND_THERMAL_45
...DIAMETER 103
...TIE_LEG_WIDTH 12
...THERMAL_CLEARANCE 12
..TIMESTAMP "1998/07/10 at 20:03:20"
..PAD_OPTIONS  USER_GENERATED_NAME
..OFFSET (0, 0)

That means I have an object "PAD" (of name "103th thermal") with
members 4_WEB_ROUND_THERMAL_45, TIMESTAMP, PAD_OPTIONS and OFFSET.
4_WEB_ROUND_THERMAL_45 itself is an object with the members DIAMETER,
TIE_LEG_WIDTH and THERMAL_CLEARANCE.
My problem now is that identical members can appear in objects and
their members. So I have to take into account the 'context' where they
appear. That means that I have to evaluate the (number of) dots to
be able to decide if an entry is a member of the current object or
a member of the super object.
Can somebody give me a hint how to do that?


 

Yahoo! Groups Links

To visit your group on the web, go to:
 http://groups.yahoo.com/group/antlr-interest/

To unsubscribe from this group, send an email to:
 antlr-interest-unsubscribe at yahoogroups.com

Your use of Yahoo! Groups is subject to:
 http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list