This class can be called using SourceGenerator by commandline.
Generates Java code that contains empty method bodies for the
implementation of a given Syntax. For every rule there will
be a method with the name of the nonterminal on the left side
and one argument for each symbol on the right side. All arguments
are of type Object.
The created implementation derives ReflectSemantic.
File in = new File("MySyntax.grammar);
String basename = "MySemantic";
Writer out = new FileWriter(basename+".java");
new SemanticSkeletonGenerator(in, basename, "my.pkg.name", out);
// the Java source "my/pkg/name/MySemantic.java" will be generated
See Also: fri.patterns.interpreter.parsergenerator.semantics.ReflectSemantic See Also: fri.patterns.interpreter.parsergenerator.util.SourceGenerator author: (c) 2002, Fritz Ritzberger |