PPT - 318KB - FGED.org Archive

Download Report

Transcript PPT - 318KB - FGED.org Archive

MAGE-TAB in SMD-Land
Cate Beauheim, Cathy Ball, Don Maier
One Validating Parser
Graphical Interface to create and load into SMD
Requirements
Avoid the problem of multiple incompatible formats that
has plagued MAGE-ML.
 A single, reference MAGE-TAB parser/validator that can
be used in both Java and Perl programming environments.
Easily revise the parser along when the MAGE-TAB
specification is revised.
Design
Formal grammar specification to generate the parser.
NO HAND-WAVING ALLOWED
Formal UML-specified object model used to generate classes
that represent the MAGE information that the parser may
discover.
Connect the generated parser to the generated MAGE-TAB
objects by calls to a hand-coded “apply” method that invokes the
generated constructors and setters for MAGE-TAB objects.
While all this is in Java, Perl programs get access via
Java::Inline.
QuickTime™ and a
TIFF (LZW) decompressor
are needed to see this picture.
Features
Logic specific to MAGE-TAB isolated in a formal grammar, a
UML-specified object model, and an “apply” method that links
the grammar and objects.
Lexer/parser automatically generated from a formal grammar
for MAGE-TAB using ANTLR.
MAGE-TAB information represented by objects automatically
generated from UML by AndroMDA.
Either Perl or Java can invoke a parse and access the
information generated as MAGE-TAB object attributes.
Validation stamping avoids unneeded re-parsing.
Java-based implementation runs on any platform that
supports Java 1.5.0 or newer.