| Edit | Rename | Changes | History | Upload | Download | Back to Top |
See also st-www.cs.uiuc.edu/users/droberts/tgen2.2.1/tgen.html.
See also the vw5i version T-Gen Parser Generator vw5i
From the README:
SUMMARY T-gen Version 2.2.1. (this version ported to vw3.0 by Don Roberts) droberts@cs.uiuc.edu These (gzip'd) vw3.0 T-Gen parcels Don Roberts sent me in January of 1999.
T-gen is a general-purpose object-oriented tool for the automatic generation of string-to-object translators. It is written in Smalltalk and lives in the Smalltalk programming environment. T-gen supports the generation of both top-down (LL) and bottom-up (LR) parsers, which will automatically generate derivation trees, abstract syntax trees, or arbitrary Smalltalk objects. The simple specification syntax and graphical user interface are intended to enhance the learning, comprehension, and usefulness of T-gen.
Being unable to get Don Robert's attention, I'm posting his updated T-Gen parcels here.
A minor bug in the vw3.0 parcels ... a T-Gen grammar requires the class GrammarTreeBuilder, not AbstractTreeBuilder.... here's the fix
GrammarSpecParser methodsFor: 'private'
treeBuilderClass
^GrammarTreeBuilder
Another minor bug in the vw3.0 parcels..
RetractableReadStream methodsFor: 'private'
pastEnd
^Character endOfInput
After applying the above code changes, evaluate
TranslatorGenerator initialize
Another minor bug in the vw3.0 parcels..
In method LL1Parser >> parseWithTreeBuilder:
change
productionStack top
to
productionStack first
where it occurs in the middle of the method
These vw3.0 parcels load into a vw5i.2 image and work with the follow caveat.
A vw5i.2 image loses the source when re-parcelling a generated initialize method of a tgen scanner or parser. The initialize method sets the prodTable to be an array of literals. The literal used for representing the endOfInput is $x where x is the (Character value: 4), an unprintable character. The XML format code reader in vw5i.2 does not tolerate non-printable characters in the input.
LEGAL INFORMATION The authors make NO WARRANTY or representation, either express or implied, with respect to this software, its quality, accuracy, merchantability, or fitness for a particular purpose. This software is provided "AS IS", and you, its user, assume the entire risk as to its quality and accuracy. This software is copyright (c) 1992, 1994 by Justin O. Graver. All rights reserved, except as specified below. Permission is hereby granted to use, copy, modify, and distribute this software (or portions thereof) for any purpose, without fee, subject to these conditions: (1) If any part of the source code for this software is distributed, then this notice must be included, unaltered; and any additions, deletions, or changes to the original files must be clearly indicated in accompanying documentation. (2) Permission for use of this software is granted only if the user accepts full responsibility for any undesirable consequences; the authors accept NO LIABILITY for damages of any kind. Permission is NOT granted for the use of any author's name in advertising or publicity relating to this software or products derived from it. We specifically permit and encourage the use of this software as the basis of commercial products, provided that all warranty or liability claims are assumed by the product vendor. Developed under the direction of Justin Graver. Authors include: Justin Graver, Virat Hanvivatpong, and David Wilson.
| Edit | Rename | Changes | History | Upload | Download | Back to Top |