Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/org.eclipse.gymnast.generator.doc.user/.project22
-rw-r--r--doc/org.eclipse.gymnast.generator.doc.user/META-INF/MANIFEST.MF6
-rw-r--r--doc/org.eclipse.gymnast.generator.doc.user/build.properties4
-rw-r--r--doc/org.eclipse.gymnast.generator.doc.user/html/book.css108
-rw-r--r--doc/org.eclipse.gymnast.generator.doc.user/html/howto.html229
-rw-r--r--doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/ASTNode.PNGbin14986 -> 0 bytes
-rw-r--r--doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/ASTUtil.PNGbin8608 -> 0 bytes
-rw-r--r--doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/ClassDecl.PNGbin19164 -> 0 bytes
-rw-r--r--doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/EcoreGenPluginStructure.PNGbin15218 -> 0 bytes
-rw-r--r--doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/EmfEditorForGymnast.PNGbin4724 -> 0 bytes
-rw-r--r--doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/EmfEditorForGymnast2.PNGbin13211 -> 0 bytes
-rw-r--r--doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/Emfatic1.PNGbin26306 -> 0 bytes
-rw-r--r--doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/Emfatic2.PNGbin21204 -> 0 bytes
-rw-r--r--doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/Emfatic3.PNGbin11157 -> 0 bytes
-rw-r--r--doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/EmfaticEcoreTypeHierarchy.PNGbin16724 -> 0 bytes
-rw-r--r--doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/GrammarInfo.PNGbin17865 -> 0 bytes
-rw-r--r--doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/HowToUseGymnast1.PNGbin3492 -> 0 bytes
-rw-r--r--doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/HowToUseGymnast2.PNGbin7123 -> 0 bytes
-rw-r--r--doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/ParseTreeView.PNGbin20706 -> 0 bytes
-rw-r--r--doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/antlrOption.PNGbin10713 -> 0 bytes
-rw-r--r--doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/generatedGrammarFile.PNGbin10273 -> 0 bytes
-rw-r--r--doc/org.eclipse.gymnast.generator.doc.user/html/toc.html25
-rw-r--r--doc/org.eclipse.gymnast.generator.doc.user/plugin.xml13
-rw-r--r--doc/org.eclipse.gymnast.generator.doc.user/toc.xml8
-rw-r--r--examples/org.eclipse.gymnast.examples.game/.classpath7
-rw-r--r--examples/org.eclipse.gymnast.examples.game/.cvsignore1
-rw-r--r--examples/org.eclipse.gymnast.examples.game/.project28
-rw-r--r--examples/org.eclipse.gymnast.examples.game/META-INF/MANIFEST.MF23
-rw-r--r--examples/org.eclipse.gymnast.examples.game/build.properties6
-rw-r--r--examples/org.eclipse.gymnast.examples.game/icons/gymnast.gifbin881 -> 0 bytes
-rw-r--r--examples/org.eclipse.gymnast.examples.game/plugin.xml34
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/GamePlugin.java71
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/GameLexer.g26
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/GameLexer.jj17
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/GameLexer.lpg237
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/game.ast23
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/Command.java27
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/CommandList.java71
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/Direction.java34
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/GameASTNode.java78
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/GameASTNodeVisitor.java248
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/GameTokenNode.java51
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/Move.java107
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/OptReps.java70
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/Shoot.java95
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/Game.g116
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameLexer.java378
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameLexer.smap208
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameParser.java297
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameParser.smap173
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameParserDriver.java90
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameParserTokenTypes.java18
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameParserTokenTypes.txt12
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameCodeScanner.java28
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameEditor.java28
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameEditorActionContributor.java18
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameOutlineBuilder.java63
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameOutlineConfiguration.java27
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GamePlayAction.java106
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameSourceViewerConfiguration.java46
-rw-r--r--examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameTextHover.java60
-rw-r--r--features/org.eclipse.emf.emfatic.all.runtime-feature/.project17
-rw-r--r--features/org.eclipse.emf.emfatic.all.runtime-feature/build.properties1
-rw-r--r--features/org.eclipse.emf.emfatic.all.runtime-feature/feature.xml23
-rw-r--r--features/org.eclipse.emf.emfatic.all.sdk-feature/.project17
-rw-r--r--features/org.eclipse.emf.emfatic.all.sdk-feature/build.properties1
-rw-r--r--features/org.eclipse.emf.emfatic.all.sdk-feature/feature.xml23
-rw-r--r--features/org.eclipse.emf.emfatic.sdk-feature/.project17
-rw-r--r--features/org.eclipse.emf.emfatic.sdk-feature/build.properties1
-rw-r--r--features/org.eclipse.emf.emfatic.sdk-feature/feature.xml23
-rw-r--r--features/org.eclipse.gymnast.generator-feature/.project17
-rw-r--r--features/org.eclipse.gymnast.generator-feature/build.properties1
-rw-r--r--features/org.eclipse.gymnast.generator-feature/feature.xml93
-rw-r--r--features/org.eclipse.gymnast.runtime-feature/.project17
-rw-r--r--features/org.eclipse.gymnast.runtime-feature/build.properties1
-rw-r--r--features/org.eclipse.gymnast.runtime-feature/feature.xml53
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/.classpath7
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/.cvsignore1
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/.project28
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/META-INF/MANIFEST.MF22
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/build.properties8
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/plugin.properties33
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/plugin.xml8
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/schema/astGenerators.exsd102
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/schema/parserGenerators.exsd102
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/GymnastCorePlugin.java68
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/AltRule.java106
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/AltRuleBody.java103
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/AltRuleDecl.java118
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/AltRuleKind.java45
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/AltSeq.java106
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Alts.java83
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Atom.java50
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/AttrList.java83
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Attrs.java106
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/CompUnit.java91
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Expr.java37
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Grammar.java83
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/GymnastASTNode.java91
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/GymnastASTNodeVisitor.java882
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/GymnastTokenNode.java63
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/HeaderSection.java119
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Id.java50
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/ListMark.java42
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/ListRule.java106
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/ListRuleBody.java142
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/ListRuleDecl.java119
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/OptSubSeq.java118
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Option.java118
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/OptionList.java83
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/OptionValue.java42
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/OptionsSection.java119
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Rule.java37
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Seq.java83
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/SeqRule.java106
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/SeqRuleDecl.java119
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/SimpleExpr.java118
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/TokenRule.java106
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/TokenRuleDecl.java119
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/ASTUtil.java101
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/Generator.java99
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/GeneratorContext.java285
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/GeneratorUtil.java257
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/GrammarInfo.java213
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/IGrammarInfo.java28
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/LiteralCollector.java45
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/RuleRefCollector.java153
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/Util.java85
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/Gymnast.g326
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/GymnastLexer.g57
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/GymnastLexer.java855
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/GymnastLexer.jj47
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/GymnastParser.java1328
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/GymnastParserTokenTypes.java50
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/GymnastParserTokenTypes.txt34
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/ParserDriver.java90
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/gymnast.ast77
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/registry/ASTGenerator.java20
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/registry/ASTGeneratorDescriptor.java38
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/registry/GeneratorRegistry.java133
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/registry/ParserGenerator.java39
-rw-r--r--plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/registry/ParserGeneratorDescriptor.java37
-rw-r--r--plugins/org.eclipse.gymnast.generator.ui/.classpath7
-rw-r--r--plugins/org.eclipse.gymnast.generator.ui/.cvsignore1
-rw-r--r--plugins/org.eclipse.gymnast.generator.ui/.project28
-rw-r--r--plugins/org.eclipse.gymnast.generator.ui/META-INF/MANIFEST.MF28
-rw-r--r--plugins/org.eclipse.gymnast.generator.ui/build.properties7
-rw-r--r--plugins/org.eclipse.gymnast.generator.ui/icons/obj16/gymnast.gifbin881 -> 0 bytes
-rw-r--r--plugins/org.eclipse.gymnast.generator.ui/plugin.properties33
-rw-r--r--plugins/org.eclipse.gymnast.generator.ui/plugin.xml33
-rw-r--r--plugins/org.eclipse.gymnast.generator.ui/src/org/eclipse/gymnast/generator/ui/GymnastUIPlugin.java68
-rw-r--r--plugins/org.eclipse.gymnast.generator.ui/src/org/eclipse/gymnast/generator/ui/actions/GenerateAST.java100
-rw-r--r--plugins/org.eclipse.gymnast.generator.ui/src/org/eclipse/gymnast/generator/ui/editor/GymnastEditor.java31
-rw-r--r--plugins/org.eclipse.gymnast.generator.ui/src/org/eclipse/gymnast/generator/ui/editor/GymnastEditorActionContributor.java22
-rw-r--r--plugins/org.eclipse.gymnast.generator.ui/src/org/eclipse/gymnast/generator/ui/editor/GymnastSourceViewerConfiguration.java40
-rw-r--r--plugins/org.eclipse.gymnast.generator.ui/src/org/eclipse/gymnast/generator/ui/editor/syntax/GymnastCodeScanner.java36
-rw-r--r--plugins/org.eclipse.gymnast.generators.ast.primordial/.classpath7
-rw-r--r--plugins/org.eclipse.gymnast.generators.ast.primordial/.cvsignore1
-rw-r--r--plugins/org.eclipse.gymnast.generators.ast.primordial/.project28
-rw-r--r--plugins/org.eclipse.gymnast.generators.ast.primordial/META-INF/MANIFEST.MF23
-rw-r--r--plugins/org.eclipse.gymnast.generators.ast.primordial/build.properties6
-rw-r--r--plugins/org.eclipse.gymnast.generators.ast.primordial/plugin.xml28
-rw-r--r--plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/ASTCompUnitBuilder.java38
-rw-r--r--plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/ASTRuleCompUnitBuilder.java72
-rw-r--r--plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/Activator.java83
-rw-r--r--plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/BuildManager.java59
-rw-r--r--plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/JavaCompUnitBuilder.java94
-rw-r--r--plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/PrimordialASTGenerator.java26
-rw-r--r--plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/ForeachChildElement.java100
-rw-r--r--plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/ForeachKeywordLiteral.java80
-rw-r--r--plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/ForeachRule.java84
-rw-r--r--plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/GymnastContextType.java131
-rw-r--r--plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/GymnastTemplateContext.java254
-rw-r--r--plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/JavaCompUnitTemplateContext.java106
-rw-r--r--plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/JavaMethodTemplateContext.java92
-rw-r--r--plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/JavaRuleCompUnitTemplateContext.java165
-rw-r--r--plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/ui/GymnastTemplatePreferencePage.java51
-rw-r--r--plugins/org.eclipse.gymnast.generators.ast.primordial/templates/javaGen.xml470
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore.ui/.classpath7
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore.ui/.project28
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore.ui/META-INF/MANIFEST.MF16
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore.ui/build.properties9
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore.ui/icons/obj16/gymnast.gifbin881 -> 0 bytes
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore.ui/lexers/GenericAntlrv2Lexer.g71
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore.ui/lexers/GenericJavaCCLexer.jj75
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore.ui/plugin.xml55
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore.ui/src/org/eclipse/gymnast/generators/ecore/ui/Activator.java126
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore.ui/src/org/eclipse/gymnast/generators/ecore/ui/actions/CheckWellformedness.java41
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore.ui/src/org/eclipse/gymnast/generators/ecore/ui/actions/GenAntlrv2Lexer.java26
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore.ui/src/org/eclipse/gymnast/generators/ecore/ui/actions/GenEcoreFromGymnastGrammar.java58
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore.ui/src/org/eclipse/gymnast/generators/ecore/ui/actions/GenJavaCCLexer.java24
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore.ui/src/org/eclipse/gymnast/generators/ecore/ui/actions/GenLexer.java63
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore.ui/src/org/eclipse/gymnast/generators/ecore/ui/actions/GenerateGenModel.java225
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore.ui/templates/model/Class.javajet5
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore.ui/templates/model/Class/basicGetGenFeature.TODO.override.javajetinc2
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore.ui/templates/model/Class/declaredFieldGenFeature.insert.javajetinc15
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore.ui/templates/model/Class/getGenFeature.TODO.override.javajetinc19
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore.ui/templates/model/Class/insert.javajetinc50
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/.classpath8
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/.project28
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/META-INF/MANIFEST.MF19
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/build.properties5
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/src/org/eclipse/gymnast/generators/ecore/Activator.java50
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/src/org/eclipse/gymnast/generators/ecore/convert/EcoreGeneratorFromGymnastGrammar.java177
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/src/org/eclipse/gymnast/generators/ecore/convert/EcorizeOperation.java231
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/src/org/eclipse/gymnast/generators/ecore/convert/GenUnparseInhaleAndMMForSeqRules.java785
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/src/org/eclipse/gymnast/generators/ecore/convert/Grammar2Ecore.java311
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/src/org/eclipse/gymnast/generators/ecore/convert/MyEcoreUtil.java338
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/src/org/eclipse/gymnast/generators/ecore/convert/ShorthandJava.java13
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/src/org/eclipse/gymnast/generators/ecore/cst/AltRuleAltsKind.java5
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/src/org/eclipse/gymnast/generators/ecore/cst/AltRuleCS.java379
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/src/org/eclipse/gymnast/generators/ecore/cst/GymnastCollector.java112
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/src/org/eclipse/gymnast/generators/ecore/cst/ListRuleCS.java209
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/src/org/eclipse/gymnast/generators/ecore/cst/RootCS.java812
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/src/org/eclipse/gymnast/generators/ecore/cst/RuleCS.java46
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/src/org/eclipse/gymnast/generators/ecore/cst/SeqExprCS.java171
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/src/org/eclipse/gymnast/generators/ecore/cst/SeqExprKind.java24
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/src/org/eclipse/gymnast/generators/ecore/cst/SeqRuleCS.java124
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/src/org/eclipse/gymnast/generators/ecore/cst/TokenRuleAltsKind.java7
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/src/org/eclipse/gymnast/generators/ecore/cst/TokenRuleCS.java214
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/src/org/eclipse/gymnast/generators/ecore/errors/Grammar2EcoreInvalidInput.java152
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/src/org/eclipse/gymnast/generators/ecore/errors/Grammar2EcoreParseWarning.java14
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/src/org/eclipse/gymnast/generators/ecore/walker/AltRuleKind.java7
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/src/org/eclipse/gymnast/generators/ecore/walker/GymnastSwitch.java71
-rw-r--r--plugins/org.eclipse.gymnast.generators.ecore/src/org/eclipse/gymnast/generators/ecore/walker/GymnastWalker.java320
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl.ui/.classpath7
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl.ui/.project34
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl.ui/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl.ui/META-INF/MANIFEST.MF14
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl.ui/build.properties5
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl.ui/icons/obj16/gymnast.gifbin881 -> 0 bytes
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl.ui/plugin.xml22
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl.ui/src/org/eclipse/gymnast/generators/embeddeddsl/ui/Activator.java50
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl.ui/src/org/eclipse/gymnast/generators/embeddeddsl/ui/actions/GenerateEDSLFromGenModel.java83
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl.ui/src/org/eclipse/gymnast/generators/embeddeddsl/ui/actions/UtilMarkers.java77
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl/.classpath7
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl/.project34
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl/META-INF/MANIFEST.MF15
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl/build.properties4
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl/src/org/eclipse/gymnast/generators/embeddeddsl/EDSLGenerator.java88
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl/src/org/eclipse/gymnast/generators/embeddeddsl/GymnastGeneratorUtil.java85
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl/src/org/eclipse/gymnast/generators/embeddeddsl/MyEcoreUtil.java337
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl/src/org/eclipse/gymnast/generators/embeddeddsl/activator/Activator.java62
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl/src/org/eclipse/gymnast/generators/embeddeddsl/templates/BeingBuilt.java254
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl/src/org/eclipse/gymnast/generators/embeddeddsl/templates/BooleanModder.java168
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl/src/org/eclipse/gymnast/generators/embeddeddsl/templates/EnumModder.java97
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl/src/org/eclipse/gymnast/generators/embeddeddsl/templates/ExprBuilder.java141
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl/src/org/eclipse/gymnast/generators/embeddeddsl/templates/LiftedRef.java76
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl/src/org/eclipse/gymnast/generators/embeddeddsl/templates/ManySF.java34
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl/src/org/eclipse/gymnast/generators/embeddeddsl/templates/Modder.java196
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl/src/org/eclipse/gymnast/generators/embeddeddsl/templates/NonLiftedRef.java30
-rw-r--r--plugins/org.eclipse.gymnast.generators.embeddeddsl/src/org/eclipse/gymnast/generators/embeddeddsl/templates/PrimitiveSF.java122
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.antlr/.classpath7
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.antlr/.cvsignore1
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.antlr/.jetproperties4
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.antlr/.project34
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.antlr/META-INF/MANIFEST.MF18
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.antlr/build.properties7
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.antlr/plugin.xml11
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.antlr/src/org/eclipse/gymnast/generators/parser/antlr/Activator.java61
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.antlr/src/org/eclipse/gymnast/generators/parser/antlr/AntlrDriver.java103
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.antlr/src/org/eclipse/gymnast/generators/parser/antlr/AntlrGrammarWriter.java413
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.antlr/src/org/eclipse/gymnast/generators/parser/antlr/AntlrParserGenerator.java97
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.antlr/src/org/eclipse/gymnast/generators/parser/antlr/ErrorHandlers.txt24
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.antlr/src/org/eclipse/gymnast/generators/parser/antlr/templates/ParserDriverTemplate.java67
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.antlr/templates/parserDriver.javajet90
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.antlr/templates/parserDriver.skeleton12
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.javacc/.classpath7
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.javacc/.cvsignore1
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.javacc/.jetproperties4
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.javacc/.project34
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.javacc/META-INF/MANIFEST.MF17
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.javacc/build.properties6
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.javacc/plugin.xml11
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.javacc/src/org/eclipse/gymnast/generators/parser/javacc/Activator.java61
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.javacc/src/org/eclipse/gymnast/generators/parser/javacc/JavaCCGrammarWriter.java353
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.javacc/src/org/eclipse/gymnast/generators/parser/javacc/JavaCCParserGenerator.java170
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.javacc/src/org/eclipse/gymnast/generators/parser/javacc/templates/ExtSimpleCharStreamTemplate.java39
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.javacc/src/org/eclipse/gymnast/generators/parser/javacc/templates/ExtTokenManagerTemplate.java48
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.javacc/src/org/eclipse/gymnast/generators/parser/javacc/templates/ExtTokenTemplate.java39
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.javacc/src/org/eclipse/gymnast/generators/parser/javacc/templates/JavaCCParserTemplate.java54
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.javacc/src/org/eclipse/gymnast/generators/parser/javacc/templates/ParserDriverTemplate.java67
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.javacc/templates/extSimpleCharStream.javajet45
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.javacc/templates/extSimpleCharStream.skeleton12
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.javacc/templates/extToken.javajet18
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.javacc/templates/extToken.skeleton12
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.javacc/templates/extTokenManager.javajet33
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.javacc/templates/extTokenManager.skeleton12
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.javacc/templates/parser.javaccjet26
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.javacc/templates/parser.skeleton12
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.javacc/templates/parserDriver.javajet63
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.javacc/templates/parserDriver.skeleton12
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.lpg/.classpath7
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.lpg/.cvsignore1
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.lpg/.jetproperties4
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.lpg/.project34
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.lpg/META-INF/MANIFEST.MF16
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.lpg/build.properties6
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.lpg/plugin.xml11
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.lpg/src/org/eclipse/gymnast/generators/parser/lpg/Activator.java50
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.lpg/src/org/eclipse/gymnast/generators/parser/lpg/LPGParserGenerator.java165
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.lpg/src/org/eclipse/gymnast/generators/parser/lpg/ProcessOutputReader.java61
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.lpg/src/org/eclipse/gymnast/generators/parser/lpg/resources/KWLexerMap.g77
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.lpg/src/org/eclipse/gymnast/generators/parser/lpg/resources/KeywordTemplateB.g118
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.lpg/src/org/eclipse/gymnast/generators/parser/lpg/resources/LPGFiles.java22
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.lpg/src/org/eclipse/gymnast/generators/parser/lpg/resources/LexerTemplateB.g188
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.lpg/src/org/eclipse/gymnast/generators/parser/lpg/resources/dtParserTemplateB.g242
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.lpg/src/org/eclipse/gymnast/generators/parser/lpg/templates/KWLexerTemplate.java83
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.lpg/src/org/eclipse/gymnast/generators/parser/lpg/templates/LexerTemplate.java51
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.lpg/src/org/eclipse/gymnast/generators/parser/lpg/templates/ParserTemplate.java45
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.lpg/templates/KWLexer.lpgjet64
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.lpg/templates/KWLexer.skeleton21
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.lpg/templates/Lexer.lpgjet233
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.lpg/templates/Lexer.skeleton12
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.lpg/templates/Parser.lpgjet220
-rw-r--r--plugins/org.eclipse.gymnast.generators.parser.lpg/templates/Parser.skeleton12
-rw-r--r--plugins/org.eclipse.gymnast.prettyprinting/.classpath7
-rw-r--r--plugins/org.eclipse.gymnast.prettyprinting/.project28
-rw-r--r--plugins/org.eclipse.gymnast.prettyprinting/META-INF/MANIFEST.MF10
-rw-r--r--plugins/org.eclipse.gymnast.prettyprinting/build.properties4
-rw-r--r--plugins/org.eclipse.gymnast.prettyprinting/sample text flow commands.txt48
-rw-r--r--plugins/org.eclipse.gymnast.prettyprinting/src/org/eclipse/gymnast/prettyprinting/Box.java68
-rw-r--r--plugins/org.eclipse.gymnast.prettyprinting/src/org/eclipse/gymnast/prettyprinting/BoxLanguage.java370
-rw-r--r--plugins/org.eclipse.gymnast.prettyprinting/src/org/eclipse/gymnast/prettyprinting/BoxStack.java121
-rw-r--r--plugins/org.eclipse.gymnast.prettyprinting/src/org/eclipse/gymnast/prettyprinting/PrettyPrintable.java8
-rw-r--r--plugins/org.eclipse.gymnast.prettyprinting/src/org/eclipse/gymnast/prettyprinting/StringBox.java239
-rw-r--r--plugins/org.eclipse.gymnast.prettyprinting/src/org/gymnast/prettyprinting/activator/Activator.java50
-rw-r--r--plugins/org.eclipse.gymnast.prettyprinting/text flow commands.txt39
329 files changed, 0 insertions, 27086 deletions
diff --git a/doc/org.eclipse.gymnast.generator.doc.user/.project b/doc/org.eclipse.gymnast.generator.doc.user/.project
deleted file mode 100644
index a52588a..0000000
--- a/doc/org.eclipse.gymnast.generator.doc.user/.project
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.gymnast.generator.doc.user</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/doc/org.eclipse.gymnast.generator.doc.user/META-INF/MANIFEST.MF b/doc/org.eclipse.gymnast.generator.doc.user/META-INF/MANIFEST.MF
deleted file mode 100644
index ed3f2c5..0000000
--- a/doc/org.eclipse.gymnast.generator.doc.user/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,6 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Gymnast Generator Online Documentation (Incubation)
-Bundle-SymbolicName: org.eclipse.gymnast.generator.doc.user; singleton:=true
-Bundle-Version: 0.3.0.qualifier
-Bundle-Vendor: Eclipse.org
diff --git a/doc/org.eclipse.gymnast.generator.doc.user/build.properties b/doc/org.eclipse.gymnast.generator.doc.user/build.properties
deleted file mode 100644
index 3c05d07..0000000
--- a/doc/org.eclipse.gymnast.generator.doc.user/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-bin.includes = plugin.xml,\
- META-INF/,\
- html/,\
- *.xml
diff --git a/doc/org.eclipse.gymnast.generator.doc.user/html/book.css b/doc/org.eclipse.gymnast.generator.doc.user/html/book.css
deleted file mode 100644
index 84c1c77..0000000
--- a/doc/org.eclipse.gymnast.generator.doc.user/html/book.css
+++ /dev/null
@@ -1,108 +0,0 @@
-P.Code {
- display: block;
- text-align: left;
- text-indent: 0.00pt;
- margin-top: 0.000000pt;
- margin-bottom: 0.000000pt;
- margin-right: 0.000000pt;
- margin-left: 15pt;
- font-size: 10.000000pt;
- font-weight: medium;
- font-style: Regular;
- color: #4444CC;
- text-decoration: none;
- vertical-align: baseline;
- text-transform: none;
- font-family: "Courier New";
-}
-H6.CaptionFigColumn {
- display: block;
- text-align: left;
- text-indent: 0.000000pt;
- margin-top: 3.000000pt;
- margin-bottom: 11.000000pt;
- margin-right: 0.000000pt;
- margin-left: 0.000000pt;
- font-size: 9.000000pt;
- font-weight: medium;
- font-style: Italic;
- color: #000000;
- text-decoration: none;
- vertical-align: baseline;
- text-transform: none;
- font-family: "Arial";
-}
-P.Note {
- display: block;
- text-align: left;
- text-indent: 0pt;
- margin-top: 19.500000pt;
- margin-bottom: 19.500000pt;
- margin-right: 0.000000pt;
- margin-left: 30pt;
- font-size: 11.000000pt;
- font-weight: medium;
- font-style: Italic;
- color: #000000;
- text-decoration: none;
- vertical-align: baseline;
- text-transform: none;
- font-family: "Arial";
-}
-EM.UILabel {
- font-weight: Bold;
- font-style: Regular;
- text-decoration: none;
- vertical-align: baseline;
- text-transform: none;
-}
-EM.CodeName {
- font-weight: Bold;
- font-style: Regular;
- text-decoration: none;
- vertical-align: baseline;
- text-transform: none;
- font-family:"Courier New";
-}
-
-img {
- margin-bottom: 20.000000pt;
-}
-
-
-/* following font face declarations need to be removed for DBCS */
-
-body, h1, h2, h3, h4, h5, h6, p, table, td, caption, th, ul, ol, dl, li, dd, dt {font-family: Arial, Helvetica, sans-serif; color: #000000}
-pre { font-family: Courier, monospace}
-
-/* end font face declarations */
-
-/* following font size declarations should be OK for DBCS */
-body, h1, h2, h3, h4, h5, h6, p, table, td, caption, th, ul, ol, dl, li, dd, dt {font-size: 10pt; }
-pre { font-size: 10pt}
-
-/* end font size declarations */
-
-body { background: #FFFFFF}
-h1 { font-size: 18pt; margin-top: 5; margin-bottom: 1 }
-h2 { font-size: 14pt; margin-top: 25; margin-bottom: 3 }
-h3 { font-size: 11pt; margin-top: 20; margin-bottom: 3 }
-h4 { font-size: 10pt; margin-top: 20; margin-bottom: 3; font-style: italic }
-p { margin-top: 10px; margin-bottom: 10px }
-pre { margin-left: 6; font-size: 9pt }
-a:link { color: #0000FF }
-a:hover { color: #000080 }
-a:visited { text-decoration: underline }
-ul { margin-top: 0; margin-bottom: 10 }
-li { margin-top: 0; margin-bottom: 0 }
-li p { margin-top: 0; margin-bottom: 0 }
-ol { margin-top: 0; margin-bottom: 10 }
-dl { margin-top: 0; margin-bottom: 10 }
-dt { margin-top: 0; margin-bottom: 0; font-weight: bold }
-dd { margin-top: 0; margin-bottom: 0 }
-strong { font-weight: bold}
-em { font-style: italic}
-var { font-style: italic}
-div.revision { border-left-style: solid; border-left-width: thin;
- border-left-color: #7B68EE; padding-left:5 }
-th { font-weight: bold }
diff --git a/doc/org.eclipse.gymnast.generator.doc.user/html/howto.html b/doc/org.eclipse.gymnast.generator.doc.user/html/howto.html
deleted file mode 100644
index df549f7..0000000
--- a/doc/org.eclipse.gymnast.generator.doc.user/html/howto.html
+++ /dev/null
@@ -1,229 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <link rel="STYLESHEET" href="book.css" charset="ISO-8859-1" type="text/css">
- <title>How to use Gymnast Generator</title>
-</head>
-
-<body>
-<h1>How to use Gymnast Generator</h1>
-
-<h2>Overview</h2>
-<p>
-Gymnast comprises two main parts (Runtime and Generator), each of which can in
-turn be divided into Core and User Interface. This section is all about using the
-Gymnast Generator to:
-
-<ol>
- <li>create <code>.ast</code> files</li>
- <li>configure options in that file</li>
- <li>manually add a lexer file, and</li>
- <li>manually add the parser's <code>.jar</code> to the (Build path or Plugin dependencies)</li>
-</ol>
-
-so that POJO-style CST classes can be generated and compiled. IDEs generated by
-IDEalize rely on such parsing infrastructure, as discussed in Sec. 2.3 of the technical report
-<i><a href="http://www.sts.tu-harburg.de/%7Emi.garcia/SoC2007/draftreport.pdf">Generation of Eclipse-based IDEs for Custom DSLs</a></i>.
-</p>
-
-
-<p>
-Let's say we want to reproduce the steps to generate POJO CST classes for Emfatic.
-An Eclipse project should be created and an .ast and a lexer file added, to
-look as shown in Figure 1(a) (more on that lexer file later).
-
-<p></p>
-<p></p>
-
-<table border="0" cellpadding="8">
- <tr>
- <td><img src="img-ch2/HowToUseGymnast1.PNG" ></td>
- </tr>
- <caption align="bottom"><b>Figure 1(a)</b> Before Gymnast Generator</caption>
-
-</table>
-<p></p>
-
-After the generator is run (by
-rightclicking on <code>emfatic.ast</code> and choosing "Generate AST") the result looks as in Figure
-1(b).
-
-<p></p>
-<p></p>
-
-<table border="0" cellpadding="8">
- <tr>
- <td><img src="img-ch2/HowToUseGymnast2.PNG" ></td>
- </tr>
- <caption align="bottom"><b>Figure 1(b)</b> After Gymnast Generator</caption>
-
-</table>
-<p></p>
-
-
-Not shown here is the added plugin dependency to <code>org.antlr</code>, which can be
-installed as described next.
-</p>
-
-<h2>What if you target ANTLR instead of JavaCC</h2>
-
-<p>
-<b>Installing ANTLR Eclipse</b>
-Your parsing infrastructure will depend on the ANTLR parser generator framework.
-The easiest way to install a plugin with ANTLR is to get it from the update site
-on SourceForge by following these steps:
-<p/>
-<ol>
-<li>In Eclipse, go to <i>Help -> Software Updates -> Find and Install....</i></li>
-
-<li>Select <i>Search for new features to install</i> and click on Next.</li>
-<li>Press the <i>New Remote Site...</i> button and enter the following values:</li>
- <ul>
- name: ANTLR <br/>
- url: http://antlreclipse.sourceforge.net/updates
- </ul>
-
-<li>Now check the new ANTLR checkbox and click on Next. </li>
-<li>Select version 3.0.5 of the feature <i>org.antlr.ui</i> and click on Next.</li>
-<li>Accept the licensing terms and click on Next and Finish.</li>
-<li>Click on <i>Install</i> when you see a pop-up message warning about unsigned features.</li>
-<li>When prompted, click on Yes to restart the workbench.</li>
-</ol>
-
-<h2>Choosing target parser, and providing the parser-dependent lexer file</h2>
-
-<p>
-The choice of target parser is made with the option <code>parserGenerator = ". . ."</code>
-(Figure 2). Unlike ANTLR, JavaCC requires no runtime library: all the code it
-needs gets generated.
-</p>
-<p>
-The lexer file (<code>emfaticLexer.g</code> in the ANTLR example) is actually constant for all
-<code>.ast</code>s we care to write. It can be copied from <code>org.eclipse.gymnast.generator.core.parser</code>
-(the file ending in <code>.g</code> is the ANTLR one, ending in <code>.jj</code> the JavaCC one) The
-only thing that needs updating are its filename (to match the name of the DSL in
-question) and, in the case of ANTLR, the first line in the lexer file (because such
-heading also contains the name of the DSL).
-</p>
-
-<p></p>
-<p></p>
-
-<table border="0" cellpadding="8">
- <tr>
- <td><img src="img-ch2/antlrOption.PNG" ></td>
- </tr>
- <caption align="bottom"><b>Figure 2</b> How to choose a parser</caption>
-
-</table>
-<p></p>
-
-<h2>Exploring the generated artifacts</h2>
-
-The generated grammar files (for the ANTLR example the one highlighted in
-Figure 3) are not supposed to be messed up by the user, however in order to explore
-them the following Eclipse plugins prove useful:
-
-<ul>
- <li><a href="http://sourceforge.net/projects/eclipse-javacc/">for JavaCC</a>
- </li>
- <li><a href="http://antlreclipse.sourceforge.net/">for ANTLR v2 grammars</a></li>
- </li>
- <li><a href="http://www.antlr.org/works/index.html">for ANTLR v3 grammars</a></li>
- (although Gymnast Generator generates as of now only v2 grammar files)
- </li>
- <li><a href="http://sourceforge.net/projects/jgedit">JikesPG Grammar Editor</a></li>
- (it's planned for Gymnast Generator to generate JikesPG grammar files, see plugin <code>org.eclipse.gymnast.generators.parser.lpg</code>)
- </li>
-</ul>
-
-<p></p>
-<p></p>
-<table border="0" cellpadding="8">
- <tr>
- <td><img src="img-ch2/generatedGrammarFile.PNG" ></td>
- </tr>
- <caption align="bottom"><b>Figure 3</b> Generated artifacts</caption>
-</table>
-<p></p>
-
-<h2>POJO-based CSTs</h2>
-
-The generated POJO-style CST classes:
-
-<ul>
-<li>exhibit useful patterns for later processing (visiting in particular)</li>
-<li>are independent from the chosen parser generator</li>
-</ul>
-
-
-The input-output relationship and the resulting code patterns are described by
-Gymnast's author, Chris J Daly, in an Eclipse Tech Panel Exchange presentation,
-available <a href="http://www.sts.tu-harburg.de/~mi.garcia/SoC2007/GymnastSlides.pdf">here</a>.
-
-
-The parser-generator-independent CST classes generated by Gymnast Generator
-implement <code>org.eclipse.gymnast.runtime.core.ast.ASTNode</code> (Figure 4(a)).
-
-<p></p>
-<p></p>
-<table border="0" cellpadding="8">
- <tr>
- <td><img src="img-ch2/ASTNode.PNG" ></td>
- </tr>
- <caption align="bottom"><b>Figure 4(a) </b><code>ASTNode</code></caption>
-</table>
-<p></p>
-
-
-A sample
-POJO-style CST class is depicted in Figure 4(b), corresponding to the following
-grammar production:
-
-
-<table border="2" cellpadding="8">
- <tr>
- <td>
-<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:8.0pt;
-font-family:"Courier New";color:red;background:yellow'>sequence</span></b><span
-style='font-size:8.0pt;font-family:"Courier New";color:black'> classDecl : (abstractModifier)?
-</span></p>
-
-<p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;
-font-family:"Courier New";color:black'>                     classKind name=ID </span></p>
-
-<p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;
-font-family:"Courier New";color:black'>                     (typeParamsInfo=typeParamsInfo)?</span></p>
-
-<p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;
-font-family:"Courier New";color:black'>                     (</span><b><span
-style='font-size:8.0pt;font-family:"Courier New";color:navy'>&quot;extends&quot;</span></b><span
-style='font-size:8.0pt;font-family:"Courier New";color:black'> superTypes=commaListBoundExceptWild)?
-</span></p>
-
-<p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;
-font-family:"Courier New";color:black'>                     (COLON instClassName=boundExceptWildcard)?
-</span></p>
-
-<p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;
-font-family:"Courier New";color:black'>                     LCURLY classMemberDecls
-RCURLY ;</span></p>
-
-</td></tr></table>
-
-
-<p></p>
-<p></p>
-<table border="0" cellpadding="8">
- <tr>
- <td><img src="img-ch2/ClassDecl.PNG" ></td>
- </tr>
- <caption align="bottom"><b>Figure 4(b) </b><code>ClassDecl</code></caption>
-</table>
-<p></p>
-
-
-</body>
-</html> \ No newline at end of file
diff --git a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/ASTNode.PNG b/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/ASTNode.PNG
deleted file mode 100644
index 2b455ba..0000000
--- a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/ASTNode.PNG
+++ /dev/null
Binary files differ
diff --git a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/ASTUtil.PNG b/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/ASTUtil.PNG
deleted file mode 100644
index 68111b4..0000000
--- a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/ASTUtil.PNG
+++ /dev/null
Binary files differ
diff --git a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/ClassDecl.PNG b/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/ClassDecl.PNG
deleted file mode 100644
index 69e27c3..0000000
--- a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/ClassDecl.PNG
+++ /dev/null
Binary files differ
diff --git a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/EcoreGenPluginStructure.PNG b/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/EcoreGenPluginStructure.PNG
deleted file mode 100644
index f102b78..0000000
--- a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/EcoreGenPluginStructure.PNG
+++ /dev/null
Binary files differ
diff --git a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/EmfEditorForGymnast.PNG b/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/EmfEditorForGymnast.PNG
deleted file mode 100644
index 175b608..0000000
--- a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/EmfEditorForGymnast.PNG
+++ /dev/null
Binary files differ
diff --git a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/EmfEditorForGymnast2.PNG b/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/EmfEditorForGymnast2.PNG
deleted file mode 100644
index f7806bb..0000000
--- a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/EmfEditorForGymnast2.PNG
+++ /dev/null
Binary files differ
diff --git a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/Emfatic1.PNG b/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/Emfatic1.PNG
deleted file mode 100644
index 4530e30..0000000
--- a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/Emfatic1.PNG
+++ /dev/null
Binary files differ
diff --git a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/Emfatic2.PNG b/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/Emfatic2.PNG
deleted file mode 100644
index 9f785cf..0000000
--- a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/Emfatic2.PNG
+++ /dev/null
Binary files differ
diff --git a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/Emfatic3.PNG b/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/Emfatic3.PNG
deleted file mode 100644
index 0555059..0000000
--- a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/Emfatic3.PNG
+++ /dev/null
Binary files differ
diff --git a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/EmfaticEcoreTypeHierarchy.PNG b/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/EmfaticEcoreTypeHierarchy.PNG
deleted file mode 100644
index 7291368..0000000
--- a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/EmfaticEcoreTypeHierarchy.PNG
+++ /dev/null
Binary files differ
diff --git a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/GrammarInfo.PNG b/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/GrammarInfo.PNG
deleted file mode 100644
index b56ce2a..0000000
--- a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/GrammarInfo.PNG
+++ /dev/null
Binary files differ
diff --git a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/HowToUseGymnast1.PNG b/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/HowToUseGymnast1.PNG
deleted file mode 100644
index c5efd04..0000000
--- a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/HowToUseGymnast1.PNG
+++ /dev/null
Binary files differ
diff --git a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/HowToUseGymnast2.PNG b/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/HowToUseGymnast2.PNG
deleted file mode 100644
index 7ece864..0000000
--- a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/HowToUseGymnast2.PNG
+++ /dev/null
Binary files differ
diff --git a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/ParseTreeView.PNG b/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/ParseTreeView.PNG
deleted file mode 100644
index d4bc871..0000000
--- a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/ParseTreeView.PNG
+++ /dev/null
Binary files differ
diff --git a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/antlrOption.PNG b/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/antlrOption.PNG
deleted file mode 100644
index 4e65d0c..0000000
--- a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/antlrOption.PNG
+++ /dev/null
Binary files differ
diff --git a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/generatedGrammarFile.PNG b/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/generatedGrammarFile.PNG
deleted file mode 100644
index b95f619..0000000
--- a/doc/org.eclipse.gymnast.generator.doc.user/html/img-ch2/generatedGrammarFile.PNG
+++ /dev/null
Binary files differ
diff --git a/doc/org.eclipse.gymnast.generator.doc.user/html/toc.html b/doc/org.eclipse.gymnast.generator.doc.user/html/toc.html
deleted file mode 100644
index 9e4acb6..0000000
--- a/doc/org.eclipse.gymnast.generator.doc.user/html/toc.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <link rel="STYLESHEET" href="book.css" charset="ISO-8859-1" type="text/css">
- <title>Table of Contents</title>
-</head>
-
-<body>
-<h1>Table of Contents</h1>
-
-
-<ul>
-
- <li>Getting started</li>
- <ul>
- <li><a href="howto.html">How to use Gymnast Generator</a></li>
- </ul>
-
-</ul>
-
-
-</body>
-</html> \ No newline at end of file
diff --git a/doc/org.eclipse.gymnast.generator.doc.user/plugin.xml b/doc/org.eclipse.gymnast.generator.doc.user/plugin.xml
deleted file mode 100644
index 1427912..0000000
--- a/doc/org.eclipse.gymnast.generator.doc.user/plugin.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
-
- <extension
- point="org.eclipse.help.toc">
- <toc
- file="toc.xml"
- primary="true">
- </toc>
- </extension>
-
-</plugin>
diff --git a/doc/org.eclipse.gymnast.generator.doc.user/toc.xml b/doc/org.eclipse.gymnast.generator.doc.user/toc.xml
deleted file mode 100644
index a1df720..0000000
--- a/doc/org.eclipse.gymnast.generator.doc.user/toc.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-
-<toc label="EMFT Gymnast Generator">
- <topic label="Getting Started">
- <topic label="How to use Gymnast Generator" href="html/howto.html"/>
- </topic>
-</toc>
diff --git a/examples/org.eclipse.gymnast.examples.game/.classpath b/examples/org.eclipse.gymnast.examples.game/.classpath
deleted file mode 100644
index 065ac06..0000000
--- a/examples/org.eclipse.gymnast.examples.game/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.gymnast.examples.game/.cvsignore b/examples/org.eclipse.gymnast.examples.game/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/examples/org.eclipse.gymnast.examples.game/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/examples/org.eclipse.gymnast.examples.game/.project b/examples/org.eclipse.gymnast.examples.game/.project
deleted file mode 100644
index b72a685..0000000
--- a/examples/org.eclipse.gymnast.examples.game/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.gymnast.examples.game</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.gymnast.examples.game/META-INF/MANIFEST.MF b/examples/org.eclipse.gymnast.examples.game/META-INF/MANIFEST.MF
deleted file mode 100644
index 5e72164..0000000
--- a/examples/org.eclipse.gymnast.examples.game/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,23 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Gymnast Game Example Language (Incubation)
-Bundle-SymbolicName: org.eclipse.gymnast.examples.game; singleton:=true
-Bundle-Version: 0.3.0.qualifier
-Bundle-ClassPath: .
-Bundle-Activator: org.eclipse.gymnast.examples.game.GamePlugin
-Bundle-Localization: plugin
-Export-Package: org.eclipse.gymnast.examples.game,
- org.eclipse.gymnast.examples.game.lang.gen.ast,
- org.eclipse.gymnast.examples.game.lang.gen.parser,
- org.eclipse.gymnast.examples.game.ui
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.ui,
- org.eclipse.jface.text,
- org.eclipse.ui.editors,
- org.eclipse.ui.workbench.texteditor,
- org.antlr,
- org.eclipse.gymnast.runtime.core,
- org.eclipse.gymnast.runtime.ui
-Eclipse-LazyStart: true
-Bundle-Vendor: Eclipse.org
diff --git a/examples/org.eclipse.gymnast.examples.game/build.properties b/examples/org.eclipse.gymnast.examples.game/build.properties
deleted file mode 100644
index d8cfccd..0000000
--- a/examples/org.eclipse.gymnast.examples.game/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- icons/
diff --git a/examples/org.eclipse.gymnast.examples.game/icons/gymnast.gif b/examples/org.eclipse.gymnast.examples.game/icons/gymnast.gif
deleted file mode 100644
index 4771987..0000000
--- a/examples/org.eclipse.gymnast.examples.game/icons/gymnast.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.gymnast.examples.game/plugin.xml b/examples/org.eclipse.gymnast.examples.game/plugin.xml
deleted file mode 100644
index d16fc5d..0000000
--- a/examples/org.eclipse.gymnast.examples.game/plugin.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension
- point="org.eclipse.ui.editors">
- <editor
- name="GameEditor"
- icon="icons/gymnast.gif"
- extensions="game"
- class="org.eclipse.gymnast.examples.game.ui.GameEditor"
- contributorClass="org.eclipse.gymnast.examples.game.ui.GameEditorActionContributor"
- id="org.eclipse.gymnast.examples.game.ui.GameEditor">
- </editor>
- </extension>
-
- <extension
- point="org.eclipse.ui.popupMenus">
- <objectContribution
- objectClass="org.eclipse.core.resources.IFile"
- nameFilter="*.game"
- id="org.eclipse.gymnast.examples.game.ui.GamePlayAction">
- <action
- label="Play Game!"
- icon="icons/gymnast.gif"
- class="org.eclipse.gymnast.examples.game.ui.GamePlayAction"
- menubarPath="additions"
- enablesFor="1"
- id="org.eclipse.gymnast.examples.game.ui.GamePlayAction">
- </action>
- </objectContribution>
- </extension>
-
-</plugin>
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/GamePlugin.java b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/GamePlugin.java
deleted file mode 100644
index e3c2889..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/GamePlugin.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.eclipse.gymnast.examples.game;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class GamePlugin extends AbstractUIPlugin {
- //The shared instance.
- private static GamePlugin plugin;
- //Resource bundle.
- private ResourceBundle resourceBundle;
-
- /**
- * The constructor.
- */
- public GamePlugin() {
- super();
- plugin = this;
- try {
- resourceBundle = ResourceBundle.getBundle("org.eclipse.gymnast.examples.game.GamePluginResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- }
-
- /**
- * Returns the shared instance.
- */
- public static GamePlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String key) {
- ResourceBundle bundle = GamePlugin.getDefault().getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- return resourceBundle;
- }
-}
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/GameLexer.g b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/GameLexer.g
deleted file mode 100644
index 04fdb19..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/GameLexer.g
+++ /dev/null
@@ -1,26 +0,0 @@
-class GameLexer extends Lexer;
-
-options
-{
- testLiterals=false;
- k=3;
- charVocabulary='\003'..'\377';
-}
-
-SEMI : ';';
-
-ID options { testLiterals=true; }
-: ('a'..'z' | 'A'..'Z' | '_') ('a'..'z' | 'A'..'Z' | '_' | DIGIT)* ;
-
-INT_LITERAL : (DIGIT)+ ;
-
-protected DIGIT : '0'..'9';
-
-WS : (' ' | '\t' | '\f' | '\r' | '\n')+
-{ $setType(Token.SKIP); }
-;
-
-SINGLE_LINE_COMMENT : "//" (~('\n'|'\r'))* ('\n'|'\r')?
-{ $setType(Token.SKIP); }
-;
-
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/GameLexer.jj b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/GameLexer.jj
deleted file mode 100644
index 1941c35..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/GameLexer.jj
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-TOKEN : { <SEMI: ";" > }
-
-TOKEN : { <INT_LITERAL: (<DIGIT>)+ > }
-TOKEN : { <#DIGIT: ["0"-"9"] > }
-
-SKIP :
-{
- " "
-| "\t"
-| "\f"
-| "\r"
-| "\n"
-}
-
-SKIP : { <SINGLE_LINE_COMMENT: "//" (~["\r","\n"])* ["\r","\n"] > }
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/GameLexer.lpg b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/GameLexer.lpg
deleted file mode 100644
index 8377843..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/GameLexer.lpg
+++ /dev/null
@@ -1,237 +0,0 @@
-
-$Start
- Token
-$End
-
-$Export
- ASSIGN LEFT_BRACKET RIGHT_BRACKET SEMICOLON
- PLUS MINUS DIVIDE STAR
- LEFT_PARENTHESIS RIGHT_PARENTHESIS
- CONSTANT EOF_SYMBOL ERROR_SYMBOL
-
- IDENTIFIER
-$End
-
-$Terminals
-
- CtlCharNotWS
-
- Space
-
- LF CR HT FF
-
- a b c d e f g h i j k l m
- n o p q r s t u v w x y z _
-
- A B C D E F G H I J K L M
- N O P Q R S T U V W X Y Z
-
- 0 1 2 3 4 5 6 7 8 9
-
- Plus Minus Slash Star LeftParen RightParen
- Equal DoubleQuote AtSign BackQuote Tilde Exclamation
- Sharp DollarSign Percent Ampersand Caret Colon
- SemiColon SingleQuote BackSlash VerticalBar LeftBrace RightBrace
- LeftBracket RightBracket QuestionMark Comma Dot LessThan
- GreaterThan
-
- AfterASCII
-
- EOF
-
-$End
-
-$Alias
-
- ' ' ::= Space
- '"' ::= DoubleQuote
- "'" ::= SingleQuote
- '%' ::= Percent
- '|' ::= VerticalBar
- '!' ::= Exclamation
- '@' ::= AtSign
- '`' ::= BackQuote
- '~' ::= Tilde
- '#' ::= Sharp
- '$' ::= DollarSign
- '&' ::= Ampersand
- '^' ::= Caret
- ':' ::= Colon
- ';' ::= SemiColon
- '\' ::= BackSlash
- '{' ::= LeftBrace
- '}' ::= RightBrace
- '[' ::= LeftBracket
- ']' ::= RightBracket
- '?' ::= QuestionMark
- ',' ::= Comma
- '.' ::= Dot
- '<' ::= LessThan
- '>' ::= GreaterThan
- '+' ::= Plus
- '-' ::= Minus
- '/' ::= Slash
- '*' ::= Star
- '(' ::= LeftParen
- ')' ::= RightParen
- '=' ::= Equal
- '\u0080..\ufffe' ::= AfterASCII
-
-$End
-
-$Rules
- Token ::= Identifier
- /.$BeginAction
- checkForKeyWord();
- $EndAction
- ./
-
- Token ::= WhiteSpace
- /.$BeginAction
- skipToken();
- $EndAction
- ./
-
- Token ::= '/' '*' Inside Stars '/'
- /.$BeginAction
- skipToken();
- $EndAction
- ./
-
- Token ::= SLComment
- /.$BeginAction
- skipToken();
- $EndAction
- ./
-
- Token ::= Integer
- /.$BeginAction
- makeToken($_CONSTANT);
- $EndAction
- ./
-
- Token ::= '+'
- /.$BeginAction
- makeToken($_PLUS);
- $EndAction
- ./
-
- Token ::= '-'
- /.$BeginAction
- makeToken($_MINUS);
- $EndAction
- ./
-
- Token ::= '*'
- /.$BeginAction
- makeToken($_STAR);
- $EndAction
- ./
-
- Token ::= '/'
- /.$BeginAction
- makeToken($_DIVIDE);
- $EndAction
- ./
-
- Token ::= '('
- /.$BeginAction
- makeToken($_LEFT_PARENTHESIS);
- $EndAction
- ./
-
- Token ::= ')'
- /.$BeginAction
- makeToken($_RIGHT_PARENTHESIS);
- $EndAction
- ./
-
- Token ::= '='
- /.$BeginAction
- makeToken($_ASSIGN);
- $EndAction
- ./
-
- Token ::= '['
- /.$BeginAction
- makeToken($_LEFT_BRACKET);
- $EndAction
- ./
-
- Token ::= ']'
- /.$BeginAction
- makeToken($_RIGHT_BRACKET);
- $EndAction
- ./
-
- Token ::= ';'
- /.$BeginAction
- makeToken($_SEMICOLON);
- $EndAction
- ./
-
- Identifier -> Letter
- | Identifier Letter
- | Identifier Digit
-
- Integer -> Digit
- | Integer Digit
-
- WhiteSpace -> WSChar
- | WhiteSpace WSChar
-
- Inside ::= Inside Stars NotSlashOrStar
- | Inside '/'
- | Inside NotSlashOrStar
- | $empty
-
- Stars -> '*'
- | Stars '*'
-
- SLComment ::= '/' '/'
- | SLComment NotEol
-
- WSChar -> Space
- | Eol
- | CtlCharNotWS
-
- Letter -> LowerCaseLetter
- | UpperCaseLetter
- | _
- | '$'
- | '\u0080..\ufffe'
-
- LowerCaseLetter -> a | b | c | d | e | f | g | h | i | j | k | l | m |
- n | o | p | q | r | s | t | u | v | w | x | y | z
-
- UpperCaseLetter -> A | B | C | D | E | F | G | H | I | J | K | L | M |
- N | O | P | Q | R | S | T | U | V | W | X | Y | Z
-
- Digit -> 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
-
- SpecialNotStar -> '+' | '-' | '/' | '(' | ')' | '"' | '!' | '@' | '`' | '~' |
- '%' | '&' | '^' | ':' | ';' | "'" | '\' | '|' | '{' | '}' |
- '[' | ']' | '?' | ',' | '.' | '<' | '>' | '=' | '#'
-
- SpecialNotSlash -> '+' | '-' | -- exclude the star as well
- '(' | ')' | '"' | '!' | '@' | '`' | '~' |
- '%' | '&' | '^' | ':' | ';' | "'" | '\' | '|' | '{' | '}' |
- '[' | ']' | '?' | ',' | '.' | '<' | '>' | '=' | '#'
-
- NotSlashOrStar -> Letter
- | Digit
- | SpecialNotSlash
- | WSChar
-
- Eol -> LF
- | CR
-
- NotEol -> Letter
- | Digit
- | Space
- | '*'
- | SpecialNotStar
- | HT
- | FF
- | CtlCharNotWS
-$End \ No newline at end of file
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/game.ast b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/game.ast
deleted file mode 100644
index f7d7752..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/game.ast
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-language Game;
-
-options {
- parserGenerator=antlr;
-}
-
-list commandList [entry] : command* ;
-abstract command : (optReps) shoot | move ;
-sequence optReps : (reps=INT_LITERAL)? ;
-sequence shoot : "fire" SEMI ;
-sequence move : "move" direction SEMI ;
-token direction : "left" | "right" ;
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/Command.java b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/Command.java
deleted file mode 100644
index 46fa6d7..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/Command.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.eclipse.gymnast.examples.game.lang.gen.ast;
-
-/**
- *
- * @generated by Gymnast from game.ast on Jun 7, 2006 1:11:57 AM
- */
-public abstract class Command extends GameASTNode {
- /**
- * Construct a new Command.
- */
- public Command() {
- super();
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GameASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-} \ No newline at end of file
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/CommandList.java b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/CommandList.java
deleted file mode 100644
index 6425853..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/CommandList.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.eclipse.gymnast.examples.game.lang.gen.ast;
-
-import java.util.ArrayList;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-import org.eclipse.gymnast.runtime.core.ast.TokenInfo;
-
-/**
- *
- * @generated by Gymnast from game.ast on Jun 7, 2006 1:11:57 AM
- */
-public class CommandList extends GameASTNode {
-
- private ArrayList _children = new ArrayList();
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- return _children.size();
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- return (ASTNode)_children.get(index);
- }
-
- /**
- * Add a child to this list.
- */
- public void addChild(GameASTNode child) {
- if (child == null) return;
- if (child._parent != null) throw new RuntimeException();
- _children.add(child);
- child._parent = this;
- }
-
- /**
- * Wrap the provided Token in a GameTokenNode
- * and add it as a child of this node.
- *
- * @param token the Token to be added as a child of this node
- */
- public void addChild(TokenInfo tokenInfo) {
- addChild(new GameTokenNode(tokenInfo));
- }
-
- /**
- * Construct a new CommandList.
- */
- public CommandList() {
- super();
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GameASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/Direction.java b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/Direction.java
deleted file mode 100644
index 8eeb4b2..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/Direction.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.eclipse.gymnast.examples.game.lang.gen.ast;
-
-import org.eclipse.gymnast.runtime.core.ast.TokenInfo;
-
-/**
- *
- * @generated by Gymnast from game.ast on Jun 7, 2006 1:11:57 AM
- */
-public class Direction extends GameTokenNode {
-
- public static final String KW_LEFT = "left";
- public static final String KW_RIGHT = "right";
-
-
- /**
- * Construct a new Direction.
- */
- public Direction(TokenInfo tokenInfo) {
- super(tokenInfo);
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GameASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-} \ No newline at end of file
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/GameASTNode.java b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/GameASTNode.java
deleted file mode 100644
index 2d356e9..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/GameASTNode.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package org.eclipse.gymnast.examples.game.lang.gen.ast;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-import org.eclipse.gymnast.runtime.core.ast.ASTNodeImpl;
-import org.eclipse.gymnast.runtime.core.ast.TokenInfo;
-
-/**
- * The superclass of all ASTNodes for language Game.
- *
- * @generated by Gymnast from game.ast on Jun 7, 2006 1:11:57 AM
- */
-public abstract class GameASTNode extends ASTNodeImpl {
-
- protected GameASTNode _parent;
-
- /**
- * @return the parent of this ASTNode or null if this is the root node of a tree
- */
- public ASTNode getParent() {
- return _parent;
- }
-
- /**
- * Construct a new GameASTNode.
- */
- public GameASTNode() {
- super();
- }
-
- /**
- * Construct a new GameASTNode.
- *
- * @param token a Token to initialize the offset and text for this node.
- */
- public GameASTNode(TokenInfo tokenInfo) {
- super(tokenInfo);
- }
-
- /**
- * The external entry point used to initiate the visitor on this node.
- *
- * @param visitor the Visitor to visit this node tree
- */
- public final void accept(GameASTNodeVisitor visitor) {
- visitor.preVisit(this);
- acceptImpl(visitor);
- visitor.postVisit(this);
- }
-
- /**
- * This method can be overridden by subclasses which should provide exactly
- * the same implementation. Here <code>this</code> refers to the generic node
- * class, but in the subclass implementations <code>this</code> will refer to
- * the specific subclass type. Thus the correct specific <code>beginVisit</code>
- * and <code>endVisit</code> methods will be invoked for each subclass and the
- * generic methods will be invoked for subclasses that don't need specific visitor
- * behavior.
- */
- public void acceptImpl(GameASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
- /**
- * Iterate through the children of this node and accept the visitor on each.
- */
- protected void visitChildren(GameASTNodeVisitor visitor) {
- for (int i = 0; i < getChildCount(); i++) {
- ASTNode child = getChild(i);
- if (child instanceof GameASTNode) {
- GameASTNode c = (GameASTNode)child;
- c.accept(visitor);
- }
- }
- }
-
-}
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/GameASTNodeVisitor.java b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/GameASTNodeVisitor.java
deleted file mode 100644
index ae87550..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/GameASTNodeVisitor.java
+++ /dev/null
@@ -1,248 +0,0 @@
-package org.eclipse.gymnast.examples.game.lang.gen.ast;
-
-/**
- * A Visitor pattern stub implementation for language Game.
- *
- * @generated by Gymnast from game.ast on Jun 7, 2006 1:11:57 AM
- */
-public class GameASTNodeVisitor {
-
- /**
- * The external entry point used to perform a visit beginning at the given node.
- *
- * @param node the GameASTNode to visit
- */
- public final void visit(GameASTNode node) {
- node.accept(this);
- }
-
- /**
- * Called just before <code>beginVisit</code> for each node being visited.
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param node the GameASTNode currently being visited
- */
- public void preVisit(GameASTNode node) {
- }
-
- /**
- * Called just after <code>endVisit</code> for each node being visited.
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param node the GameASTNode currently being visited
- */
- public void postVisit(GameASTNode node) {
- }
-
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the generic one called for node types that
- * don't provide a specific overloaded form of <code>beginVisit</code>.
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param node the GameASTNode currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(GameASTNode node) {
- return true;
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the generic one called for node types that
- * don't provide a specific overloaded form of <code>endVisit</code>.
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param node the GameASTNode currently being visited
- */
- public void endVisit(GameASTNode node) {
- }
-
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>GameTokenNode</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param tokenNode the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(GameTokenNode tokenNode) {
- return beginVisit((GameASTNode)tokenNode);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>GameTokenNode</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param tokenNode the node currently being visited
- */
- public void endVisit(GameTokenNode tokenNode) {
- endVisit((GameASTNode)tokenNode);
- }
-
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>CommandList</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param commandList the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(CommandList commandList) {
- return beginVisit((GameASTNode)commandList);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>CommandList</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param commandList the node currently being visited
- */
- public void endVisit(CommandList commandList) {
- endVisit((GameASTNode)commandList);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>Command</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param command the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(Command command) {
- return beginVisit((GameASTNode)command);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>Command</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param command the node currently being visited
- */
- public void endVisit(Command command) {
- endVisit((GameASTNode)command);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>OptReps</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param optReps the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(OptReps optReps) {
- return beginVisit((GameASTNode)optReps);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>OptReps</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param optReps the node currently being visited
- */
- public void endVisit(OptReps optReps) {
- endVisit((GameASTNode)optReps);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>Shoot</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param shoot the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(Shoot shoot) {
- return beginVisit((Command)shoot);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>Shoot</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param shoot the node currently being visited
- */
- public void endVisit(Shoot shoot) {
- endVisit((Command)shoot);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>Move</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param move the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(Move move) {
- return beginVisit((Command)move);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>Move</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param move the node currently being visited
- */
- public void endVisit(Move move) {
- endVisit((Command)move);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>Direction</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param direction the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(Direction direction) {
- return beginVisit((GameTokenNode)direction);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>Direction</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param direction the node currently being visited
- */
- public void endVisit(Direction direction) {
- endVisit((GameTokenNode)direction);
- }
-
-
-} \ No newline at end of file
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/GameTokenNode.java b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/GameTokenNode.java
deleted file mode 100644
index fd8dbf7..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/GameTokenNode.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.eclipse.gymnast.examples.game.lang.gen.ast;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-import org.eclipse.gymnast.runtime.core.ast.TokenInfo;
-
-/**
- * Represents a token in the language grammar.
- * Can be subclassed to represent specific token subgroups.
- *
- * @generated by Gymnast from game.ast on Jun 7, 2006 1:11:57 AM
- */
-public class GameTokenNode extends GameASTNode {
-
- /**
- * @return the number of children of this ASTNode
- */
- public final int getChildCount() {
- // token rules cannot have children!
- return 0;
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public final ASTNode getChild(int index) {
- // token rules cannot have children!
- throw new IndexOutOfBoundsException();
- }
-
- /**
- * Construct a new GameTokenNode
- */
- public GameTokenNode(TokenInfo tokenInfo) {
- super(tokenInfo);
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GameASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/Move.java b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/Move.java
deleted file mode 100644
index 43ba144..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/Move.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package org.eclipse.gymnast.examples.game.lang.gen.ast;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-import org.eclipse.gymnast.runtime.core.ast.TokenInfo;
-
-/**
- *
- * @generated by Gymnast from game.ast on Jun 7, 2006 1:11:57 AM
- */
-public class Move extends Command {
-
- public static final String KW_MOVE = "move";
-
- private OptReps _optReps;
- private GameTokenNode _move_KW;
- private Direction _direction;
- private GameTokenNode _semi;
-
- public OptReps getOptReps() {
- return _optReps;
- }
- public GameTokenNode getMove_KW() {
- return _move_KW;
- }
- public Direction getDirection() {
- return _direction;
- }
- public GameTokenNode getSemi() {
- return _semi;
- }
-
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- int count = 0;
- if (_optReps != null) count++;
- if (_move_KW != null) count++;
- if (_direction != null) count++;
- if (_semi != null) count++;
-
- return count;
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- int count = -1;
- if ((_optReps != null) && (++count == index)) return _optReps;
- if ((_move_KW != null) && (++count == index)) return _move_KW;
- if ((_direction != null) && (++count == index)) return _direction;
- if ((_semi != null) && (++count == index)) return _semi;
-
- throw new IndexOutOfBoundsException();
- }
-
- /**
- * Construct a new Move.
- */
- public Move(
- OptReps optReps,
- TokenInfo move_KW,
- Direction direction,
- TokenInfo semi
- ) {
- super();
-
- if (optReps != null) {
- _optReps = optReps;
- if (_optReps._parent != null) throw new RuntimeException();
- _optReps._parent = this;
- }
- if (move_KW != null) {
- _move_KW = new GameTokenNode(move_KW);
- if (_move_KW._parent != null) throw new RuntimeException();
- _move_KW._parent = this;
- }
- if (direction != null) {
- _direction = direction;
- if (_direction._parent != null) throw new RuntimeException();
- _direction._parent = this;
- }
- if (semi != null) {
- _semi = new GameTokenNode(semi);
- if (_semi._parent != null) throw new RuntimeException();
- _semi._parent = this;
- }
-
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GameASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/OptReps.java b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/OptReps.java
deleted file mode 100644
index a50894e..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/OptReps.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package org.eclipse.gymnast.examples.game.lang.gen.ast;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-import org.eclipse.gymnast.runtime.core.ast.TokenInfo;
-
-/**
- *
- * @generated by Gymnast from game.ast on Jun 7, 2006 1:11:57 AM
- */
-public class OptReps extends GameASTNode {
-
-
- private GameTokenNode _reps;
-
- public GameTokenNode getReps() {
- return _reps;
- }
-
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- int count = 0;
- if (_reps != null) count++;
-
- return count;
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- int count = -1;
- if ((_reps != null) && (++count == index)) return _reps;
-
- throw new IndexOutOfBoundsException();
- }
-
- /**
- * Construct a new OptReps.
- */
- public OptReps(
- TokenInfo reps
- ) {
- super();
-
- if (reps != null) {
- _reps = new GameTokenNode(reps);
- if (_reps._parent != null) throw new RuntimeException();
- _reps._parent = this;
- }
-
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GameASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/Shoot.java b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/Shoot.java
deleted file mode 100644
index fb68c4b..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/ast/Shoot.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package org.eclipse.gymnast.examples.game.lang.gen.ast;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-import org.eclipse.gymnast.runtime.core.ast.TokenInfo;
-
-/**
- *
- * @generated by Gymnast from game.ast on Jun 7, 2006 1:11:57 AM
- */
-public class Shoot extends Command {
-
- public static final String KW_FIRE = "fire";
-
- private OptReps _optReps;
- private GameTokenNode _fire_KW;
- private GameTokenNode _semi;
-
- public OptReps getOptReps() {
- return _optReps;
- }
- public GameTokenNode getFire_KW() {
- return _fire_KW;
- }
- public GameTokenNode getSemi() {
- return _semi;
- }
-
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- int count = 0;
- if (_optReps != null) count++;
- if (_fire_KW != null) count++;
- if (_semi != null) count++;
-
- return count;
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- int count = -1;
- if ((_optReps != null) && (++count == index)) return _optReps;
- if ((_fire_KW != null) && (++count == index)) return _fire_KW;
- if ((_semi != null) && (++count == index)) return _semi;
-
- throw new IndexOutOfBoundsException();
- }
-
- /**
- * Construct a new Shoot.
- */
- public Shoot(
- OptReps optReps,
- TokenInfo fire_KW,
- TokenInfo semi
- ) {
- super();
-
- if (optReps != null) {
- _optReps = optReps;
- if (_optReps._parent != null) throw new RuntimeException();
- _optReps._parent = this;
- }
- if (fire_KW != null) {
- _fire_KW = new GameTokenNode(fire_KW);
- if (_fire_KW._parent != null) throw new RuntimeException();
- _fire_KW._parent = this;
- }
- if (semi != null) {
- _semi = new GameTokenNode(semi);
- if (_semi._parent != null) throw new RuntimeException();
- _semi._parent = this;
- }
-
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GameASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/Game.g b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/Game.g
deleted file mode 100644
index 2749742..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/Game.g
+++ /dev/null
@@ -1,116 +0,0 @@
-
-header
-{
-package org.eclipse.gymnast.examples.game.lang.gen.parser;
-import org.eclipse.gymnast.examples.game.lang.gen.ast.*;
-import org.eclipse.gymnast.runtime.core.parser.*;
-import org.eclipse.gymnast.runtime.core.ast.*;
-}
-
-class GameParser extends Parser;
-
-{
- private ParseError createParseError(RecognitionException ex) {
- return GameParserDriver.createParseError(ex);
- }
-
- private TokenInfo createTokenInfo(Token tok) {
- if (tok == null) return null;
- else return new TokenInfo(tok.getText(), tok.getColumn(), tok.getType());
- }
-
-
- private ParseContext _parseContext;
- public void setParseContext(ParseContext parseContext) {
- _parseContext = parseContext;
- }
-
- public void reportError(RecognitionException ex) {
- if (_parseContext != null) {
- _parseContext.addParseMessage(createParseError(ex));
- }
- }
-
- public void reportError(String s) {
- if (_parseContext != null) {
- _parseContext.addParseMessage(new ParseError(s, -1));
- }
- }
-
- public void reportWarning(String s) {
- if (_parseContext != null) {
- _parseContext.addParseMessage(new ParseWarning(s, -1));
- }
- }
-
-}
-
-commandList returns [ CommandList retVal = new CommandList() ]
-:
-{ Command command = null; }
- ( command=command { retVal.addChild(command); } )* EOF
-;
-
-command returns [ Command retVal = null ]
-:
-{ OptReps optReps = null; }
-optReps=optReps
- ( retVal=shoot[optReps]
- | retVal=move[optReps]
- )
-;
-
-optReps returns [ OptReps retVal = null ]
-:
- ( reps:INT_LITERAL )?
-{ retVal = new OptReps(createTokenInfo(reps)); }
-;
-
-shoot [ OptReps optReps ] returns [ Shoot retVal = null ]
-:
- fire_KW:"fire" semi:SEMI
-{ retVal = new Shoot(optReps, createTokenInfo(fire_KW), createTokenInfo(semi)); }
-;
-
-move [ OptReps optReps ] returns [ Move retVal = null ]
-:
-{ Direction direction = null; }
- move_KW:"move" direction=direction semi:SEMI
-{ retVal = new Move(optReps, createTokenInfo(move_KW), direction, createTokenInfo(semi)); }
-;
-
-direction returns [ Direction retVal = null ]
-{ Token tok = LT(1); }
-: ( "left"
- | "right"
- )
-{ retVal = new Direction(createTokenInfo(tok)); }
-;
-
-
-class GameLexer extends Lexer;
-
-options
-{
- testLiterals=false;
- k=3;
- charVocabulary='\003'..'\377';
-}
-
-SEMI : ';';
-
-ID options { testLiterals=true; }
-: ('a'..'z' | 'A'..'Z' | '_') ('a'..'z' | 'A'..'Z' | '_' | DIGIT)* ;
-
-INT_LITERAL : (DIGIT)+ ;
-
-protected DIGIT : '0'..'9';
-
-WS : (' ' | '\t' | '\f' | '\r' | '\n')+
-{ $setType(Token.SKIP); }
-;
-
-SINGLE_LINE_COMMENT : "//" (~('\n'|'\r'))* ('\n'|'\r')?
-{ $setType(Token.SKIP); }
-;
-
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameLexer.java b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameLexer.java
deleted file mode 100644
index ffab436..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameLexer.java
+++ /dev/null
@@ -1,378 +0,0 @@
-// $ANTLR : "Game.g" -> "GameLexer.java"$
-
-package org.eclipse.gymnast.examples.game.lang.gen.parser;
-import java.io.InputStream;
-import java.io.Reader;
-import java.util.Hashtable;
-
-import antlr.ANTLRHashString;
-import antlr.ByteBuffer;
-import antlr.CharBuffer;
-import antlr.CharStreamException;
-import antlr.CharStreamIOException;
-import antlr.InputBuffer;
-import antlr.LexerSharedInputState;
-import antlr.NoViableAltForCharException;
-import antlr.RecognitionException;
-import antlr.Token;
-import antlr.TokenStream;
-import antlr.TokenStreamException;
-import antlr.TokenStreamIOException;
-import antlr.TokenStreamRecognitionException;
-import antlr.collections.impl.BitSet;
-
-public class GameLexer extends antlr.CharScanner implements GameParserTokenTypes, TokenStream
- {
-public GameLexer(InputStream in) {
- this(new ByteBuffer(in));
-}
-public GameLexer(Reader in) {
- this(new CharBuffer(in));
-}
-public GameLexer(InputBuffer ib) {
- this(new LexerSharedInputState(ib));
-}
-public GameLexer(LexerSharedInputState state) {
- super(state);
- caseSensitiveLiterals = true;
- setCaseSensitive(true);
- literals = new Hashtable();
- literals.put(new ANTLRHashString("right", this), new Integer(9));
- literals.put(new ANTLRHashString("fire", this), new Integer(5));
- literals.put(new ANTLRHashString("move", this), new Integer(7));
- literals.put(new ANTLRHashString("left", this), new Integer(8));
-}
-
-public Token nextToken() throws TokenStreamException {
- Token theRetToken=null;
-tryAgain:
- for (;;) {
- Token _token = null;
- int _ttype = Token.INVALID_TYPE;
- resetText();
- try { // for char stream error handling
- try { // for lexical error handling
- switch ( LA(1)) {
- case ';':
- {
- mSEMI(true);
- theRetToken=_returnToken;
- break;
- }
- case 'A': case 'B': case 'C': case 'D':
- case 'E': case 'F': case 'G': case 'H':
- case 'I': case 'J': case 'K': case 'L':
- case 'M': case 'N': case 'O': case 'P':
- case 'Q': case 'R': case 'S': case 'T':
- case 'U': case 'V': case 'W': case 'X':
- case 'Y': case 'Z': case '_': case 'a':
- case 'b': case 'c': case 'd': case 'e':
- case 'f': case 'g': case 'h': case 'i':
- case 'j': case 'k': case 'l': case 'm':
- case 'n': case 'o': case 'p': case 'q':
- case 'r': case 's': case 't': case 'u':
- case 'v': case 'w': case 'x': case 'y':
- case 'z':
- {
- mID(true);
- theRetToken=_returnToken;
- break;
- }
- case '0': case '1': case '2': case '3':
- case '4': case '5': case '6': case '7':
- case '8': case '9':
- {
- mINT_LITERAL(true);
- theRetToken=_returnToken;
- break;
- }
- case '\t': case '\n': case '\u000c': case '\r':
- case ' ':
- {
- mWS(true);
- theRetToken=_returnToken;
- break;
- }
- case '/':
- {
- mSINGLE_LINE_COMMENT(true);
- theRetToken=_returnToken;
- break;
- }
- default:
- {
- if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);}
- else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
- }
- }
- if ( _returnToken==null ) continue tryAgain; // found SKIP token
- _ttype = _returnToken.getType();
- _returnToken.setType(_ttype);
- return _returnToken;
- }
- catch (RecognitionException e) {
- throw new TokenStreamRecognitionException(e);
- }
- }
- catch (CharStreamException cse) {
- if ( cse instanceof CharStreamIOException ) {
- throw new TokenStreamIOException(((CharStreamIOException)cse).io);
- }
- else {
- throw new TokenStreamException(cse.getMessage());
- }
- }
- }
-}
-
- public final void mSEMI(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = SEMI;
- int _saveIndex;
-
- match(';');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mID(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = ID;
- int _saveIndex;
-
- {
- switch ( LA(1)) {
- case 'a': case 'b': case 'c': case 'd':
- case 'e': case 'f': case 'g': case 'h':
- case 'i': case 'j': case 'k': case 'l':
- case 'm': case 'n': case 'o': case 'p':
- case 'q': case 'r': case 's': case 't':
- case 'u': case 'v': case 'w': case 'x':
- case 'y': case 'z':
- {
- matchRange('a','z');
- break;
- }
- case 'A': case 'B': case 'C': case 'D':
- case 'E': case 'F': case 'G': case 'H':
- case 'I': case 'J': case 'K': case 'L':
- case 'M': case 'N': case 'O': case 'P':
- case 'Q': case 'R': case 'S': case 'T':
- case 'U': case 'V': case 'W': case 'X':
- case 'Y': case 'Z':
- {
- matchRange('A','Z');
- break;
- }
- case '_':
- {
- match('_');
- break;
- }
- default:
- {
- throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
- }
- }
- }
- {
- _loop16:
- do {
- switch ( LA(1)) {
- case 'a': case 'b': case 'c': case 'd':
- case 'e': case 'f': case 'g': case 'h':
- case 'i': case 'j': case 'k': case 'l':
- case 'm': case 'n': case 'o': case 'p':
- case 'q': case 'r': case 's': case 't':
- case 'u': case 'v': case 'w': case 'x':
- case 'y': case 'z':
- {
- matchRange('a','z');
- break;
- }
- case 'A': case 'B': case 'C': case 'D':
- case 'E': case 'F': case 'G': case 'H':
- case 'I': case 'J': case 'K': case 'L':
- case 'M': case 'N': case 'O': case 'P':
- case 'Q': case 'R': case 'S': case 'T':
- case 'U': case 'V': case 'W': case 'X':
- case 'Y': case 'Z':
- {
- matchRange('A','Z');
- break;
- }
- case '_':
- {
- match('_');
- break;
- }
- case '0': case '1': case '2': case '3':
- case '4': case '5': case '6': case '7':
- case '8': case '9':
- {
- mDIGIT(false);
- break;
- }
- default:
- {
- break _loop16;
- }
- }
- } while (true);
- }
- _ttype = testLiteralsTable(_ttype);
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- protected final void mDIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = DIGIT;
- int _saveIndex;
-
- matchRange('0','9');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mINT_LITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = INT_LITERAL;
- int _saveIndex;
-
- {
- int _cnt19=0;
- _loop19:
- do {
- if (((LA(1) >= '0' && LA(1) <= '9'))) {
- mDIGIT(false);
- }
- else {
- if ( _cnt19>=1 ) { break _loop19; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
- }
-
- _cnt19++;
- } while (true);
- }
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mWS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = WS;
- int _saveIndex;
-
- {
- int _cnt23=0;
- _loop23:
- do {
- switch ( LA(1)) {
- case ' ':
- {
- match(' ');
- break;
- }
- case '\t':
- {
- match('\t');
- break;
- }
- case '\u000c':
- {
- match('\f');
- break;
- }
- case '\r':
- {
- match('\r');
- break;
- }
- case '\n':
- {
- match('\n');
- break;
- }
- default:
- {
- if ( _cnt23>=1 ) { break _loop23; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
- }
- }
- _cnt23++;
- } while (true);
- }
- _ttype = Token.SKIP;
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mSINGLE_LINE_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = SINGLE_LINE_COMMENT;
- int _saveIndex;
-
- match("//");
- {
- _loop27:
- do {
- if ((_tokenSet_0.member(LA(1)))) {
- {
- match(_tokenSet_0);
- }
- }
- else {
- break _loop27;
- }
-
- } while (true);
- }
- {
- switch ( LA(1)) {
- case '\n':
- {
- match('\n');
- break;
- }
- case '\r':
- {
- match('\r');
- break;
- }
- default:
- {
- }
- }
- }
- _ttype = Token.SKIP;
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
-
- private static final long[] mk_tokenSet_0() {
- long[] data = new long[8];
- data[0]=-9224L;
- for (int i = 1; i<=3; i++) { data[i]=-1L; }
- return data;
- }
- public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
-
- }
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameLexer.smap b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameLexer.smap
deleted file mode 100644
index 0d48e09..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameLexer.smap
+++ /dev/null
@@ -1,208 +0,0 @@
-SMAP
-GameLexer.java
-G
-*S G
-*F
-+ 0 Game.g
-Game.g
-*L
-0:66
-0:85
-0:93
-0:100
-0:106
-3:3
-3:4
-3:5
-3:6
-100:136
-100:137
-100:138
-100:139
-100:141
-100:142
-100:143
-100:144
-100:145
-100:146
-100:147
-102:149
-102:150
-102:151
-102:152
-102:234
-102:235
-102:236
-102:237
-102:238
-102:239
-102:240
-103:155
-103:156
-103:157
-103:158
-103:159
-103:160
-103:161
-103:162
-103:163
-103:164
-103:167
-103:168
-103:169
-103:170
-103:171
-103:172
-103:173
-103:174
-103:175
-103:178
-103:179
-103:180
-103:183
-103:184
-103:185
-103:186
-103:187
-103:189
-103:190
-103:191
-103:192
-103:193
-103:194
-103:195
-103:196
-103:197
-103:198
-103:199
-103:200
-103:201
-103:204
-103:205
-103:206
-103:207
-103:208
-103:209
-103:210
-103:211
-103:212
-103:215
-103:216
-103:217
-103:220
-103:221
-103:222
-103:223
-103:224
-103:227
-103:228
-103:229
-103:230
-103:231
-103:232
-103:233
-105:255
-105:256
-105:257
-105:258
-105:261
-105:262
-105:263
-105:264
-105:265
-105:266
-105:267
-105:268
-105:269
-105:271
-105:272
-105:273
-105:274
-105:275
-105:276
-105:277
-105:278
-105:279
-107:242
-107:243
-107:244
-107:245
-107:247
-107:248
-107:249
-107:250
-107:251
-107:252
-107:253
-109:281
-109:282
-109:283
-109:284
-109:287
-109:288
-109:289
-109:290
-109:291
-109:292
-109:293
-109:296
-109:297
-109:298
-109:301
-109:302
-109:303
-109:306
-109:307
-109:308
-109:311
-109:312
-109:313
-109:316
-109:317
-109:318
-109:319
-109:320
-109:321
-109:322
-109:323
-109:325
-109:326
-109:327
-109:328
-109:329
-109:330
-110:324
-113:332
-113:333
-113:334
-113:335
-113:337
-113:338
-113:339
-113:340
-113:341
-113:343
-113:345
-113:346
-113:347
-113:348
-113:350
-113:351
-113:353
-113:354
-113:355
-113:356
-113:359
-113:360
-113:361
-113:364
-113:366
-113:367
-113:370
-113:371
-113:372
-113:373
-113:374
-113:375
-114:369
-*E
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameParser.java b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameParser.java
deleted file mode 100644
index b685fd9..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameParser.java
+++ /dev/null
@@ -1,297 +0,0 @@
-// $ANTLR : "Game.g" -> "GameParser.java"$
-
-package org.eclipse.gymnast.examples.game.lang.gen.parser;
-import org.eclipse.gymnast.examples.game.lang.gen.ast.Command;
-import org.eclipse.gymnast.examples.game.lang.gen.ast.CommandList;
-import org.eclipse.gymnast.examples.game.lang.gen.ast.Direction;
-import org.eclipse.gymnast.examples.game.lang.gen.ast.Move;
-import org.eclipse.gymnast.examples.game.lang.gen.ast.OptReps;
-import org.eclipse.gymnast.examples.game.lang.gen.ast.Shoot;
-import org.eclipse.gymnast.runtime.core.ast.TokenInfo;
-import org.eclipse.gymnast.runtime.core.parser.ParseContext;
-import org.eclipse.gymnast.runtime.core.parser.ParseError;
-import org.eclipse.gymnast.runtime.core.parser.ParseWarning;
-
-import antlr.NoViableAltException;
-import antlr.ParserSharedInputState;
-import antlr.RecognitionException;
-import antlr.Token;
-import antlr.TokenBuffer;
-import antlr.TokenStream;
-import antlr.TokenStreamException;
-import antlr.collections.impl.BitSet;
-
-public class GameParser extends antlr.LLkParser implements GameParserTokenTypes
- {
-
- private ParseError createParseError(RecognitionException ex) {
- return GameParserDriver.createParseError(ex);
- }
-
- private TokenInfo createTokenInfo(Token tok) {
- if (tok == null) return null;
- else return new TokenInfo(tok.getText(), tok.getColumn(), tok.getType());
- }
-
-
- private ParseContext _parseContext;
- public void setParseContext(ParseContext parseContext) {
- _parseContext = parseContext;
- }
-
- public void reportError(RecognitionException ex) {
- if (_parseContext != null) {
- _parseContext.addParseMessage(createParseError(ex));
- }
- }
-
- public void reportError(String s) {
- if (_parseContext != null) {
- _parseContext.addParseMessage(new ParseError(s, -1));
- }
- }
-
- public void reportWarning(String s) {
- if (_parseContext != null) {
- _parseContext.addParseMessage(new ParseWarning(s, -1));
- }
- }
-
-
-protected GameParser(TokenBuffer tokenBuf, int k) {
- super(tokenBuf,k);
- tokenNames = _tokenNames;
-}
-
-public GameParser(TokenBuffer tokenBuf) {
- this(tokenBuf,1);
-}
-
-protected GameParser(TokenStream lexer, int k) {
- super(lexer,k);
- tokenNames = _tokenNames;
-}
-
-public GameParser(TokenStream lexer) {
- this(lexer,1);
-}
-
-public GameParser(ParserSharedInputState state) {
- super(state,1);
- tokenNames = _tokenNames;
-}
-
- public final CommandList commandList() throws RecognitionException, TokenStreamException {
- CommandList retVal = new CommandList() ;
-
-
- try { // for error handling
- Command command = null;
- {
- _loop3:
- do {
- if ((LA(1)==INT_LITERAL||LA(1)==LITERAL_fire||LA(1)==LITERAL_move)) {
- command=command();
- retVal.addChild(command);
- }
- else {
- break _loop3;
- }
-
- } while (true);
- }
- match(Token.EOF_TYPE);
- }
- catch (RecognitionException ex) {
- reportError(ex);
- recover(ex,_tokenSet_0);
- }
- return retVal;
- }
-
- public final Command command() throws RecognitionException, TokenStreamException {
- Command retVal = null ;
-
-
- try { // for error handling
- OptReps optReps = null;
- optReps=optReps();
- {
- switch ( LA(1)) {
- case LITERAL_fire:
- {
- retVal=shoot(optReps);
- break;
- }
- case LITERAL_move:
- {
- retVal=move(optReps);
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
- }
- catch (RecognitionException ex) {
- reportError(ex);
- recover(ex,_tokenSet_1);
- }
- return retVal;
- }
-
- public final OptReps optReps() throws RecognitionException, TokenStreamException {
- OptReps retVal = null ;
-
- Token reps = null;
-
- try { // for error handling
- {
- switch ( LA(1)) {
- case INT_LITERAL:
- {
- reps = LT(1);
- match(INT_LITERAL);
- break;
- }
- case LITERAL_fire:
- case LITERAL_move:
- {
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
- retVal = new OptReps(createTokenInfo(reps));
- }
- catch (RecognitionException ex) {
- reportError(ex);
- recover(ex,_tokenSet_2);
- }
- return retVal;
- }
-
- public final Shoot shoot(
- OptReps optReps
- ) throws RecognitionException, TokenStreamException {
- Shoot retVal = null ;
-
- Token fire_KW = null;
- Token semi = null;
-
- try { // for error handling
- fire_KW = LT(1);
- match(LITERAL_fire);
- semi = LT(1);
- match(SEMI);
- retVal = new Shoot(optReps, createTokenInfo(fire_KW), createTokenInfo(semi));
- }
- catch (RecognitionException ex) {
- reportError(ex);
- recover(ex,_tokenSet_1);
- }
- return retVal;
- }
-
- public final Move move(
- OptReps optReps
- ) throws RecognitionException, TokenStreamException {
- Move retVal = null ;
-
- Token move_KW = null;
- Token semi = null;
-
- try { // for error handling
- Direction direction = null;
- move_KW = LT(1);
- match(LITERAL_move);
- direction=direction();
- semi = LT(1);
- match(SEMI);
- retVal = new Move(optReps, createTokenInfo(move_KW), direction, createTokenInfo(semi));
- }
- catch (RecognitionException ex) {
- reportError(ex);
- recover(ex,_tokenSet_1);
- }
- return retVal;
- }
-
- public final Direction direction() throws RecognitionException, TokenStreamException {
- Direction retVal = null ;
-
- Token tok = LT(1);
-
- try { // for error handling
- {
- switch ( LA(1)) {
- case LITERAL_left:
- {
- match(LITERAL_left);
- break;
- }
- case LITERAL_right:
- {
- match(LITERAL_right);
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
- retVal = new Direction(createTokenInfo(tok));
- }
- catch (RecognitionException ex) {
- reportError(ex);
- recover(ex,_tokenSet_3);
- }
- return retVal;
- }
-
-
- public static final String[] _tokenNames = {
- "<0>",
- "EOF",
- "<2>",
- "NULL_TREE_LOOKAHEAD",
- "INT_LITERAL",
- "\"fire\"",
- "SEMI",
- "\"move\"",
- "\"left\"",
- "\"right\"",
- "ID",
- "DIGIT",
- "WS",
- "SINGLE_LINE_COMMENT"
- };
-
- private static final long[] mk_tokenSet_0() {
- long[] data = { 2L, 0L};
- return data;
- }
- public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
- private static final long[] mk_tokenSet_1() {
- long[] data = { 178L, 0L};
- return data;
- }
- public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
- private static final long[] mk_tokenSet_2() {
- long[] data = { 160L, 0L};
- return data;
- }
- public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
- private static final long[] mk_tokenSet_3() {
- long[] data = { 64L, 0L};
- return data;
- }
- public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
-
- }
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameParser.smap b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameParser.smap
deleted file mode 100644
index 6c690d2..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameParser.smap
+++ /dev/null
@@ -1,173 +0,0 @@
-SMAP
-GameParser.java
-G
-*S G
-*F
-+ 0 Game.g
-Game.g
-*L
-3:3
-3:4
-3:5
-3:6
-13:25
-14:26
-15:27
-17:29
-18:30
-19:31
-20:32
-23:35
-24:36
-25:37
-26:38
-28:40
-29:41
-30:42
-31:43
-32:44
-34:46
-35:47
-36:48
-37:49
-38:50
-40:52
-41:53
-42:54
-43:55
-44:56
-48:82
-48:83
-48:86
-48:102
-48:103
-48:104
-48:105
-48:106
-48:107
-48:108
-50:87
-51:88
-51:89
-51:90
-51:91
-51:92
-51:93
-51:94
-51:95
-51:96
-51:97
-51:99
-51:100
-51:101
-54:110
-54:111
-54:114
-54:135
-54:136
-54:137
-54:138
-54:139
-54:140
-54:141
-56:115
-57:116
-58:118
-58:119
-58:120
-58:121
-58:129
-58:130
-58:131
-58:132
-58:133
-59:124
-59:125
-59:126
-63:143
-63:144
-63:148
-63:169
-63:170
-63:171
-63:172
-63:173
-63:174
-63:175
-65:146
-65:150
-65:151
-65:152
-65:153
-65:154
-65:162
-65:163
-65:164
-65:165
-65:166
-66:168
-69:177
-69:178
-69:179
-69:180
-69:185
-69:191
-69:192
-69:193
-69:194
-69:195
-69:196
-69:197
-71:182
-71:183
-71:186
-71:187
-71:188
-71:189
-72:190
-75:199
-75:200
-75:201
-75:202
-75:207
-75:215
-75:216
-75:217
-75:218
-75:219
-75:220
-75:221
-77:208
-78:204
-78:205
-78:209
-78:210
-78:211
-78:212
-78:213
-79:214
-82:223
-82:224
-82:226
-82:228
-82:248
-82:249
-82:250
-82:251
-82:252
-82:253
-82:254
-84:230
-84:231
-84:232
-84:233
-84:241
-84:242
-84:243
-84:244
-84:245
-85:236
-85:237
-85:238
-87:247
-*E
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameParserDriver.java b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameParserDriver.java
deleted file mode 100644
index ab325d4..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameParserDriver.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package org.eclipse.gymnast.examples.game.lang.gen.parser;
-
-import java.io.Reader;
-
-import org.eclipse.gymnast.examples.game.lang.gen.ast.CommandList;
-import org.eclipse.gymnast.runtime.core.parser.IParser;
-import org.eclipse.gymnast.runtime.core.parser.ParseContext;
-import org.eclipse.gymnast.runtime.core.parser.ParseError;
-import org.eclipse.gymnast.runtime.core.parser.ParseMessage;
-
-import antlr.MismatchedCharException;
-import antlr.MismatchedTokenException;
-import antlr.NoViableAltException;
-import antlr.NoViableAltForCharException;
-import antlr.RecognitionException;
-import antlr.TokenStreamRecognitionException;
-
-/**
- *
- * @generated by Gymnast from game.ast on Jun 7, 2006 1:11:57 AM
- */
-public class GameParserDriver implements IParser {
-
- public ParseContext parse(Reader input) {
- GameLexer lexer = new GameLexer(input);
- lexer.setColumn(0);
- lexer.setTabSize(1);
-
- GameParser parser = new GameParser(lexer);
- ParseContext parseContext = new ParseContext();
- parser.setParseContext(parseContext);
-
- CommandList compUnit = parseCompUnit(parser, parseContext);
-
- if (parseContext.getMessageCount() == 0) {
- System.out.println("Parse OK!");
- }
- else {
- ParseMessage[] msgs = parseContext.getMessages();
- for (int i = 0; i < msgs.length; i++) {
- System.err.println(msgs[i].getMessage());
- }
- }
-
- return parseContext;
- }
-
- private CommandList parseCompUnit(GameParser parser, ParseContext parseContext) {
- try {
- CommandList compUnit = parser.commandList();
- parseContext.setParseRoot(compUnit);
- return compUnit;
- }
- catch (RecognitionException rex) {
- parseContext.addParseMessage(createParseError(rex));
- }
- catch (TokenStreamRecognitionException tex) {
- RecognitionException rex = tex.recog;
- parseContext.addParseMessage(createParseError(rex));
- }
- catch (Exception ex) {
- parseContext.addParseMessage(new ParseError(ex.getMessage(), 1));
- }
- return null;
- }
-
- static ParseError createParseError(RecognitionException ex) {
- String message = ex.getMessage();
- int offset = ex.getColumn();
- int length = 0;
-
- if (ex instanceof MismatchedCharException) {
- length = 1;
- } else if (ex instanceof MismatchedTokenException) {
- MismatchedTokenException ex2 = (MismatchedTokenException) ex;
- if ((ex2.token != null) && (ex2.token.getText() != null)) {
- length = ex2.token.getText().length();
- }
- } else if (ex instanceof NoViableAltException) {
- NoViableAltException ex2 = (NoViableAltException) ex;
- if ((ex2.token != null) && (ex2.token.getText() != null)) {
- length = ex2.token.getText().length();
- }
- } else if (ex instanceof NoViableAltForCharException) {
- length = 1;
- }
-
- return new ParseError(message, offset, length);
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameParserTokenTypes.java b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameParserTokenTypes.java
deleted file mode 100644
index 639cb26..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameParserTokenTypes.java
+++ /dev/null
@@ -1,18 +0,0 @@
-// $ANTLR : "Game.g" -> "GameLexer.java"$
-
-package org.eclipse.gymnast.examples.game.lang.gen.parser;
-
-public interface GameParserTokenTypes {
- int EOF = 1;
- int NULL_TREE_LOOKAHEAD = 3;
- int INT_LITERAL = 4;
- int LITERAL_fire = 5;
- int SEMI = 6;
- int LITERAL_move = 7;
- int LITERAL_left = 8;
- int LITERAL_right = 9;
- int ID = 10;
- int DIGIT = 11;
- int WS = 12;
- int SINGLE_LINE_COMMENT = 13;
-}
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameParserTokenTypes.txt b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameParserTokenTypes.txt
deleted file mode 100644
index 69d6501..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/lang/gen/parser/GameParserTokenTypes.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-// $ANTLR : Game.g -> GameParserTokenTypes.txt$
-GameParser // output token vocab name
-INT_LITERAL=4
-LITERAL_fire="fire"=5
-SEMI=6
-LITERAL_move="move"=7
-LITERAL_left="left"=8
-LITERAL_right="right"=9
-ID=10
-DIGIT=11
-WS=12
-SINGLE_LINE_COMMENT=13
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameCodeScanner.java b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameCodeScanner.java
deleted file mode 100644
index 99630c0..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameCodeScanner.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.examples.game.ui;
-
-import org.eclipse.gymnast.runtime.ui.editor.LDTCodeScanner;
-import org.eclipse.gymnast.runtime.ui.util.LDTColorProvider;
-import org.eclipse.swt.SWT;
-
-public class GameCodeScanner extends LDTCodeScanner {
-
- private static final String[] COMMANDS = {"fire", "move"};
- private static final String[] DIRECTIONS = {"left", "right"};
-
- public void initKeywords() {
- addKeywords(COMMANDS, LDTColorProvider.BLUE);
- addKeywords(DIRECTIONS, LDTColorProvider.DARK_GREEN, null, SWT.BOLD);
- }
-
-}
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameEditor.java b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameEditor.java
deleted file mode 100644
index 09f5b2c..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameEditor.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.examples.game.ui;
-
-import org.eclipse.gymnast.runtime.ui.editor.LDTEditor;
-import org.eclipse.gymnast.runtime.ui.editor.LDTSourceViewerConfiguration;
-import org.eclipse.gymnast.runtime.ui.outline.LDTOutlineConfiguration;
-
-public class GameEditor extends LDTEditor {
-
- protected LDTSourceViewerConfiguration createSourceViewerConfiguration() {
- return new GameSourceViewerConfiguration(this);
- }
-
- protected LDTOutlineConfiguration createOutlineConfiguration() {
- return new GameOutlineConfiguration(this);
- }
-
-}
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameEditorActionContributor.java b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameEditorActionContributor.java
deleted file mode 100644
index 14da78c..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameEditorActionContributor.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.examples.game.ui;
-
-import org.eclipse.gymnast.runtime.ui.editor.LDTEditorActionContributor;
-
-public class GameEditorActionContributor extends LDTEditorActionContributor {
-
-}
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameOutlineBuilder.java b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameOutlineBuilder.java
deleted file mode 100644
index 4436ba0..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameOutlineBuilder.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.examples.game.ui;
-
-import org.eclipse.gymnast.examples.game.lang.gen.ast.CommandList;
-import org.eclipse.gymnast.examples.game.lang.gen.ast.GameASTNodeVisitor;
-import org.eclipse.gymnast.examples.game.lang.gen.ast.Move;
-import org.eclipse.gymnast.examples.game.lang.gen.ast.Shoot;
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-import org.eclipse.gymnast.runtime.core.outline.IOutlineBuilder;
-import org.eclipse.gymnast.runtime.core.outline.OutlineNode;
-
-public class GameOutlineBuilder implements IOutlineBuilder {
-
- public OutlineNode[] buildOutline(ASTNode parseRoot) {
-
- if (parseRoot instanceof CommandList) {
- CommandList commandList = (CommandList)parseRoot;
-
- final OutlineNode root = new OutlineNode(commandList, "Commands");
-
- new GameASTNodeVisitor() {
- public boolean beginVisit(Move move) {
- if (move.getDirection() == null) {
- OutlineNode n = new OutlineNode(move, "move ?");
- root.addChild(n);
- }
- else {
- String text = move.getDirection().getText();
- if (move.getOptReps().getReps() != null) {
- text += " (x" + move.getOptReps().getReps().getText() + ")";
- }
- OutlineNode n = new OutlineNode(move, text);
- root.addChild(n);
- }
- return false;
- }
- public boolean beginVisit(Shoot shoot) {
- String text = shoot.getFire_KW().getText();
- if (shoot.getOptReps().getReps() != null) {
- text += " (x" + shoot.getOptReps().getReps().getText() + ")";
- }
- OutlineNode n = new OutlineNode(shoot, text);
- root.addChild(n);
- return false;
- }
- }.visit(commandList);
-
- return new OutlineNode[] {root};
- }
-
- return null;
- }
-}
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameOutlineConfiguration.java b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameOutlineConfiguration.java
deleted file mode 100644
index 2361474..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameOutlineConfiguration.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.examples.game.ui;
-
-import org.eclipse.gymnast.runtime.core.outline.IOutlineBuilder;
-import org.eclipse.gymnast.runtime.ui.outline.LDTOutlineConfiguration;
-
-public class GameOutlineConfiguration extends LDTOutlineConfiguration {
-
- public GameOutlineConfiguration(GameEditor editor) {
- super(editor);
- }
-
- public IOutlineBuilder getOutlineBuilder() {
- return new GameOutlineBuilder();
- }
-
-}
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GamePlayAction.java b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GamePlayAction.java
deleted file mode 100644
index d0b81cd..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GamePlayAction.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.examples.game.ui;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.gymnast.examples.game.lang.gen.ast.CommandList;
-import org.eclipse.gymnast.examples.game.lang.gen.ast.GameASTNodeVisitor;
-import org.eclipse.gymnast.examples.game.lang.gen.ast.Move;
-import org.eclipse.gymnast.examples.game.lang.gen.ast.OptReps;
-import org.eclipse.gymnast.examples.game.lang.gen.ast.Shoot;
-import org.eclipse.gymnast.examples.game.lang.gen.parser.GameParserDriver;
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-import org.eclipse.gymnast.runtime.core.parser.ParseContext;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-
-public class GamePlayAction implements IObjectActionDelegate {
-
- private IFile _file;
-
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- _file = null;
-
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection sel = (IStructuredSelection)selection;
- Object selElem = sel.getFirstElement();
- if (selElem instanceof IFile) {
- _file = (IFile)selElem;
- }
- }
- }
-
- public void run(IAction action) {
- if (_file != null) {
- try {
- BufferedReader reader = new BufferedReader(new InputStreamReader(_file.getContents()));
- GameParserDriver parser = new GameParserDriver();
- ParseContext parseContext = parser.parse(reader);
-
- if (parseContext.hasErrors()) {
- System.out.println("Error in parse!");
- }
- else {
- ASTNode root = parseContext.getParseRoot();
- if (root instanceof CommandList) {
- play((CommandList)root);
- }
- }
- }
- catch (Exception ex) {
- ex.printStackTrace();
- }
- }
- }
-
- private void play(CommandList commandList) {
- new GameASTNodeVisitor() {
-
- public boolean beginVisit(Move move) {
- String text = move.getDirection().getText().toUpperCase();
- int reps = getReps(move.getOptReps());
- println(text, reps);
- return false;
- }
- public boolean beginVisit(Shoot shoot) {
- String text = shoot.getFire_KW().getText().toUpperCase();
- int reps = getReps(shoot.getOptReps());
- println(text, reps);
- return false;
- }
-
- }.visit(commandList);
- }
-
- private int getReps(OptReps optReps) {
- if (optReps.getReps() == null) return 1;
- String reps = optReps.getReps().getText();
- return Integer.parseInt(reps);
- }
-
- private void println(String text, int times) {
- for (int i = 0; i < times; i++) {
- System.out.print(text + " ");
- }
- System.out.println();
- }
-
-}
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameSourceViewerConfiguration.java b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameSourceViewerConfiguration.java
deleted file mode 100644
index 7223b97..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameSourceViewerConfiguration.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.examples.game.ui;
-
-import org.eclipse.gymnast.examples.game.lang.gen.parser.GameParserDriver;
-import org.eclipse.gymnast.runtime.core.parser.IParser;
-import org.eclipse.gymnast.runtime.ui.editor.LDTCodeScanner;
-import org.eclipse.gymnast.runtime.ui.editor.LDTSourceViewerConfiguration;
-import org.eclipse.jface.text.ITextHover;
-import org.eclipse.jface.text.source.ISourceViewer;
-
-public class GameSourceViewerConfiguration extends LDTSourceViewerConfiguration {
-
- private final GameTextHover _textHover;
-
- public GameSourceViewerConfiguration(GameEditor editor) {
- super(editor);
- _textHover = new GameTextHover(editor);
- }
-
- public LDTCodeScanner createCodeScanner() {
- return new GameCodeScanner();
- }
-
- public IParser getParser() {
- return new GameParserDriver();
- }
-
- public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType) {
- return _textHover;
- }
-
- public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType, int stateMask) {
- return _textHover;
- }
-
-}
diff --git a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameTextHover.java b/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameTextHover.java
deleted file mode 100644
index 883a522..0000000
--- a/examples/org.eclipse.gymnast.examples.game/src/org/eclipse/gymnast/examples/game/ui/GameTextHover.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.examples.game.ui;
-
-import org.eclipse.gymnast.examples.game.lang.gen.ast.Move;
-import org.eclipse.gymnast.examples.game.lang.gen.ast.Shoot;
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextHover;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.Region;
-
-public class GameTextHover implements ITextHover {
-
- private final GameEditor _editor;
- private final Class[] _hoverClasses;
-
- public GameTextHover(GameEditor editor) {
- _editor = editor;
- _hoverClasses = new Class[] {
- Move.class,
- Shoot.class
- };
- }
-
- public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
- if (hoverRegion != null) {
- ASTNode rootNode = _editor.getParseRoot();
- if (rootNode != null) {
- ASTNode hoverNode = rootNode.getNodeAt(hoverRegion.getOffset(), hoverRegion.getLength(), _hoverClasses, true);
- if (hoverNode != null) return getHoverInfo(hoverNode);
- }
- }
- return null;
- }
-
- public IRegion getHoverRegion(ITextViewer textViewer, int offset) {
- return new Region(offset, 0);
- }
-
- private String getHoverInfo(ASTNode hoverNode) {
- if (hoverNode instanceof Move) {
- return "MOVE!";
- }
- else if (hoverNode instanceof Shoot) {
- return "BANG!";
- }
- else return null;
- }
-
-}
diff --git a/features/org.eclipse.emf.emfatic.all.runtime-feature/.project b/features/org.eclipse.emf.emfatic.all.runtime-feature/.project
deleted file mode 100644
index f52ef8d..0000000
--- a/features/org.eclipse.emf.emfatic.all.runtime-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.emf.emfatic.all.runtime-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/features/org.eclipse.emf.emfatic.all.runtime-feature/build.properties b/features/org.eclipse.emf.emfatic.all.runtime-feature/build.properties
deleted file mode 100644
index 64f93a9..0000000
--- a/features/org.eclipse.emf.emfatic.all.runtime-feature/build.properties
+++ /dev/null
@@ -1 +0,0 @@
-bin.includes = feature.xml
diff --git a/features/org.eclipse.emf.emfatic.all.runtime-feature/feature.xml b/features/org.eclipse.emf.emfatic.all.runtime-feature/feature.xml
deleted file mode 100644
index b881d4e..0000000
--- a/features/org.eclipse.emf.emfatic.all.runtime-feature/feature.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.emf.emfatic.all.runtime"
- label="EMFatic All Runtime (Incubation)"
- version="0.7.0.qualifier">
-
- <description url="http://www.example.com/description">
- [Enter Feature Description here.]
- </description>
-
- <copyright url="http://www.example.com/copyright">
- [Enter Copyright Description here.]
- </copyright>
-
- <license url="http://www.example.com/license">
- [Enter License Description here.]
- </license>
-
- <includes
- id="org.eclipse.emf.emfatic"
- version="0.0.0"/>
-
-</feature>
diff --git a/features/org.eclipse.emf.emfatic.all.sdk-feature/.project b/features/org.eclipse.emf.emfatic.all.sdk-feature/.project
deleted file mode 100644
index 002817c..0000000
--- a/features/org.eclipse.emf.emfatic.all.sdk-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.emf.emfatic.all.sdk-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/features/org.eclipse.emf.emfatic.all.sdk-feature/build.properties b/features/org.eclipse.emf.emfatic.all.sdk-feature/build.properties
deleted file mode 100644
index 64f93a9..0000000
--- a/features/org.eclipse.emf.emfatic.all.sdk-feature/build.properties
+++ /dev/null
@@ -1 +0,0 @@
-bin.includes = feature.xml
diff --git a/features/org.eclipse.emf.emfatic.all.sdk-feature/feature.xml b/features/org.eclipse.emf.emfatic.all.sdk-feature/feature.xml
deleted file mode 100644
index b1be663..0000000
--- a/features/org.eclipse.emf.emfatic.all.sdk-feature/feature.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.emf.emfatic.all.sdk"
- label="All EMFatic Sdk (Incubation)"
- version="0.7.0.qualifier">
-
- <description url="http://www.example.com/description">
- [Enter Feature Description here.]
- </description>
-
- <copyright url="http://www.example.com/copyright">
- [Enter Copyright Description here.]
- </copyright>
-
- <license url="http://www.example.com/license">
- [Enter License Description here.]
- </license>
-
- <includes
- id="org.eclipse.emf.emfatic.sdk"
- version="0.0.0"/>
-
-</feature>
diff --git a/features/org.eclipse.emf.emfatic.sdk-feature/.project b/features/org.eclipse.emf.emfatic.sdk-feature/.project
deleted file mode 100644
index 688c150..0000000
--- a/features/org.eclipse.emf.emfatic.sdk-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.emf.emfatic.sdk-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/features/org.eclipse.emf.emfatic.sdk-feature/build.properties b/features/org.eclipse.emf.emfatic.sdk-feature/build.properties
deleted file mode 100644
index 64f93a9..0000000
--- a/features/org.eclipse.emf.emfatic.sdk-feature/build.properties
+++ /dev/null
@@ -1 +0,0 @@
-bin.includes = feature.xml
diff --git a/features/org.eclipse.emf.emfatic.sdk-feature/feature.xml b/features/org.eclipse.emf.emfatic.sdk-feature/feature.xml
deleted file mode 100644
index 0efbc78..0000000
--- a/features/org.eclipse.emf.emfatic.sdk-feature/feature.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.emf.emfatic.sdk"
- label="EMFatic SDK (Incubation)"
- version="0.7.0.qualifier">
-
- <description url="http://www.example.com/description">
- [Enter Feature Description here.]
- </description>
-
- <copyright url="http://www.example.com/copyright">
- [Enter Copyright Description here.]
- </copyright>
-
- <license url="http://www.example.com/license">
- [Enter License Description here.]
- </license>
-
- <includes
- id="org.eclipse.emf.emfatic"
- version="0.0.0"/>
-
-</feature>
diff --git a/features/org.eclipse.gymnast.generator-feature/.project b/features/org.eclipse.gymnast.generator-feature/.project
deleted file mode 100644
index ad82b54..0000000
--- a/features/org.eclipse.gymnast.generator-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.gymnast.generator-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/features/org.eclipse.gymnast.generator-feature/build.properties b/features/org.eclipse.gymnast.generator-feature/build.properties
deleted file mode 100644
index 64f93a9..0000000
--- a/features/org.eclipse.gymnast.generator-feature/build.properties
+++ /dev/null
@@ -1 +0,0 @@
-bin.includes = feature.xml
diff --git a/features/org.eclipse.gymnast.generator-feature/feature.xml b/features/org.eclipse.gymnast.generator-feature/feature.xml
deleted file mode 100644
index 07083e5..0000000
--- a/features/org.eclipse.gymnast.generator-feature/feature.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.gymnast.generator"
- label="Gymnast Generator (Incubation)"
- version="0.7.0.qualifier"
- provider-name="Eclipse.org">
-
- <description url="http://www.sts.tu-harburg.de/%7Emi.garcia/SoC2007/GymnastSlides.pdf">
- Gymnast is a framework for jumpstarting text editors for custom Domain Specific Languages.
- Gymnast comprises two main parts (Runtime and Generator), each of which can in
- turn be divided into Core and User Interface.
- Technical documentation on how to use Gymnast can be found in Ch. 1 and 2 of the technical report &quot;Generation of Eclipse-based IDEs for
-Custom DSLs&quot;, to be found at http://www.sts.tu-harburg.de/%7Emi.garcia/SoC2007/draftreport.pdf
-
- Gymnast is hosted as an EMFT component with Incubation status.
- </description>
-
- <copyright>
- Copyright (c) 2006 IBM Corporation and others.
- </copyright>
-
- <license url="http://www.eclipse.org/legal/epl-v10.html">
- Eclipse Public License - v 1.0
- </license>
-
- <requires>
- <import plugin="org.antlr"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.jdt.core"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.ui.views"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.gymnast.runtime.core"/>
- <import plugin="org.eclipse.ui.console"/>
- <import plugin="org.eclipse.ui.editors"/>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.ui.workbench.texteditor"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.gymnast.runtime.ui"/>
- <import plugin="org.eclipse.text"/>
- <import feature="org.eclipse.gymnast.runtime"/>
- <import plugin="org.eclipse.emf.ecore"/>
- </requires>
-
- <plugin
- id="org.eclipse.gymnast.generator.core"
- download-size="0"
- install-size="0"
- version="0.7.0.qualifier"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.gymnast.generator.ui"
- download-size="0"
- install-size="0"
- version="0.7.0.qualifier"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.gymnast.generators.parser.antlr"
- download-size="0"
- install-size="0"
- version="0.7.0.qualifier"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.gymnast.generators.parser.javacc"
- download-size="0"
- install-size="0"
- version="0.7.0.qualifier"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.gymnast.generators.ast.primordial"
- download-size="0"
- install-size="0"
- version="0.7.0.qualifier"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.gymnast.generators.parser.lpg"
- download-size="0"
- install-size="0"
- version="0.7.0.qualifier"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.gymnast.generator.doc.user"
- download-size="0"
- install-size="0"
- version="0.7.0.qualifier"/>
-
-</feature>
diff --git a/features/org.eclipse.gymnast.runtime-feature/.project b/features/org.eclipse.gymnast.runtime-feature/.project
deleted file mode 100644
index c8a6518..0000000
--- a/features/org.eclipse.gymnast.runtime-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.gymnast.runtime-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/features/org.eclipse.gymnast.runtime-feature/build.properties b/features/org.eclipse.gymnast.runtime-feature/build.properties
deleted file mode 100644
index 64f93a9..0000000
--- a/features/org.eclipse.gymnast.runtime-feature/build.properties
+++ /dev/null
@@ -1 +0,0 @@
-bin.includes = feature.xml
diff --git a/features/org.eclipse.gymnast.runtime-feature/feature.xml b/features/org.eclipse.gymnast.runtime-feature/feature.xml
deleted file mode 100644
index 6507c28..0000000
--- a/features/org.eclipse.gymnast.runtime-feature/feature.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.gymnast.runtime"
- label="Gymnast Runtime (Incubation)"
- version="0.7.0.qualifier"
- provider-name="Eclipse.org">
-
- <description url="http://www.sts.tu-harburg.de/%7Emi.garcia/SoC2007/GymnastSlides.pdf">
- Gymnast is a framework for jumpstarting text editors for custom
-Domain Specific Languages. Gymnast comprises two main parts (Runtime and Generator), each of which can in turn be divided into Core and User Interface.
-
-Technical documentation on how to use Gymnast can be found in
-Ch. 1 and 2 of the technical report &quot;Generation of Eclipse-based
-IDEs for Custom DSLs&quot;, to be found at http://www.sts.tu-harburg.de/%7Emi.garcia/SoC2007/draftreport.pdf
-
-Gymnast is hosted as an EMFT component with Incubation status.
- </description>
-
- <copyright>
- Copyright (c) 2006 IBM Corporation and others.
- </copyright>
-
- <license url="http://www.eclipse.org/legal/epl-v10.html">
- Eclipse Public License - v 1.0
- </license>
-
- <requires>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.ui.views"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.ui.editors"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.ui.console"/>
- <import plugin="org.eclipse.ui.workbench.texteditor"/>
- </requires>
-
- <plugin
- id="org.eclipse.gymnast.runtime.core"
- download-size="0"
- install-size="0"
- version="0.7.0.qualifier"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.gymnast.runtime.ui"
- download-size="0"
- install-size="0"
- version="0.7.0.qualifier"
- unpack="false"/>
-
-</feature>
diff --git a/plugins/org.eclipse.gymnast.generator.core/.classpath b/plugins/org.eclipse.gymnast.generator.core/.classpath
deleted file mode 100644
index 065ac06..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.gymnast.generator.core/.cvsignore b/plugins/org.eclipse.gymnast.generator.core/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/plugins/org.eclipse.gymnast.generator.core/.project b/plugins/org.eclipse.gymnast.generator.core/.project
deleted file mode 100644
index 86cf52a..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.gymnast.generator.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/plugins/org.eclipse.gymnast.generator.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.gymnast.generator.core/META-INF/MANIFEST.MF
deleted file mode 100644
index 4757280..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,22 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Plugin.name (Incubation)
-Bundle-SymbolicName: org.eclipse.gymnast.generator.core;singleton:=true
-Bundle-Version: 0.3.0.qualifier
-Bundle-ClassPath: .
-Bundle-Activator: org.eclipse.gymnast.generator.core.GymnastCorePlugin
-Bundle-Vendor: Eclipse.org
-Bundle-Localization: plugin
-Export-Package: org.eclipse.gymnast.generator.core,
- org.eclipse.gymnast.generator.core.ast,
- org.eclipse.gymnast.generator.core.generator,
- org.eclipse.gymnast.generator.core.parser,
- org.eclipse.gymnast.generator.core.registry
-Require-Bundle: org.antlr,
- org.eclipse.core.resources,
- org.eclipse.jdt.core,
- org.eclipse.ui,
- org.eclipse.ui.views,
- org.eclipse.core.runtime,
- org.eclipse.gymnast.runtime.core
-Eclipse-LazyStart: true
diff --git a/plugins/org.eclipse.gymnast.generator.core/build.properties b/plugins/org.eclipse.gymnast.generator.core/build.properties
deleted file mode 100644
index 720c9fd..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.properties,\
- plugin.xml,\
- schema/
-
diff --git a/plugins/org.eclipse.gymnast.generator.core/plugin.properties b/plugins/org.eclipse.gymnast.generator.core/plugin.properties
deleted file mode 100644
index c9f4212..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/plugin.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#/**
-# * <copyright>
-# *
-# * Copyright (c) 2004,2006 IBM Corporation and others.
-# * All rights reserved. This program and the accompanying materials
-# * are made available under the terms of the Eclipse Public License v1.0
-# * which accompanies this distribution, and is available at
-# * http://www.eclipse.org/legal/epl-v10.html
-# *
-# * Contributors:
-# * IBM - Initial API and implementation
-# *
-# * </copyright>
-# *
-# * $Id: plugin.properties,v 1.1 2008/01/15 06:19:18 cdaly Exp $
-# */
-
-# NLS_MESSAGEFORMAT_VAR
-
-# ==============================================================================
-# Do not change the properties between this line and the last line containing:
-# %%% END OF TRANSLATED PROPERTIES %%%
-# Instead, either redefine an existing property, or create a new property,
-# append it to the end of the file, and change the code to use the new name.
-# ==============================================================================
-
-# ==============================================================================
-# %%% END OF TRANSLATED PROPERTIES %%%
-# The above properties have been shipped for translation.
-# ==============================================================================
-
-Plugin.name = Gymnast Generator Core
-Plugin.providerName = Eclipse.org
diff --git a/plugins/org.eclipse.gymnast.generator.core/plugin.xml b/plugins/org.eclipse.gymnast.generator.core/plugin.xml
deleted file mode 100644
index 7525f74..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/plugin.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension-point id="parserGenerators" name="Gymnast Parser Generators" schema="schema/parserGenerators.exsd"/>
- <extension-point id="astGenerators" name="Gymnast AST Generators" schema="schema/astGenerators.exsd"/>
-
-</plugin>
diff --git a/plugins/org.eclipse.gymnast.generator.core/schema/astGenerators.exsd b/plugins/org.eclipse.gymnast.generator.core/schema/astGenerators.exsd
deleted file mode 100644
index a09fe29..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/schema/astGenerators.exsd
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.gymnast.generator.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.gymnast.generator.core" id="astGenerators" name="Gymnast AST Generators"/>
- </appInfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="astGenerator" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="astGenerator">
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="description" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.gymnast.generator.core.registry.ASTGenerator"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.gymnast.generator.core/schema/parserGenerators.exsd b/plugins/org.eclipse.gymnast.generator.core/schema/parserGenerators.exsd
deleted file mode 100644
index 15ccff4..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/schema/parserGenerators.exsd
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.gymnast.generator.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.gymnast.generator.core" id="parserGenerators" name="Gymnast Parser Generators"/>
- </appInfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="parserGenerator" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="parserGenerator">
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="description" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.gymnast.generator.core.registry.ParserGenerator"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/GymnastCorePlugin.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/GymnastCorePlugin.java
deleted file mode 100644
index 1e40d8c..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/GymnastCorePlugin.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generator.core;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.runtime.Plugin;
-
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class GymnastCorePlugin extends Plugin {
- //The shared instance.
- private static GymnastCorePlugin plugin;
- //Resource bundle.
- private ResourceBundle resourceBundle;
-
- /**
- * The constructor.
- */
- public GymnastCorePlugin() {
- plugin = this;
- try {
- resourceBundle = ResourceBundle.getBundle("org.eclipse.gymnast.generator.core.GymnastCorePluginResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- }
-
- /**
- * Returns the shared instance.
- */
- public static GymnastCorePlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String key) {
- ResourceBundle bundle = GymnastCorePlugin.getDefault().getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- return resourceBundle;
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/AltRule.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/AltRule.java
deleted file mode 100644
index f83f683..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/AltRule.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-
-import antlr.Token;
-
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class AltRule extends Rule {
-
-
- private AltRuleDecl _decl;
- private AltRuleBody _body;
- private GymnastTokenNode _semi;
-
- public AltRuleDecl getDecl() {
- return _decl;
- }
- public AltRuleBody getBody() {
- return _body;
- }
- public GymnastTokenNode getSemi() {
- return _semi;
- }
-
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- int count = 0;
- if (_decl != null) count++;
- if (_body != null) count++;
- if (_semi != null) count++;
-
- return count;
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- int count = -1;
- if ((_decl != null) && (++count == index)) return _decl;
- if ((_body != null) && (++count == index)) return _body;
- if ((_semi != null) && (++count == index)) return _semi;
-
- throw new IndexOutOfBoundsException();
- }
-
- /**
- * Construct a new AltRule.
- */
- public AltRule(
- AltRuleDecl decl,
- AltRuleBody body,
- Token semi
- ) {
- super();
-
- if (decl != null) {
- _decl = decl;
- if (_decl._parent != null) throw new RuntimeException();
- _decl._parent = this;
- }
- if (body != null) {
- _body = body;
- if (_body._parent != null) throw new RuntimeException();
- _body._parent = this;
- }
- if (semi != null) {
- _semi = new GymnastTokenNode(semi);
- if (_semi._parent != null) throw new RuntimeException();
- _semi._parent = this;
- }
-
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/AltRuleBody.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/AltRuleBody.java
deleted file mode 100644
index d655c6e..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/AltRuleBody.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class AltRuleBody extends GymnastASTNode {
-
-
- private AltSeq _preSeq;
- private Alts _alts;
- private AltSeq _postSeq;
-
- public AltSeq getPreSeq() {
- return _preSeq;
- }
- public Alts getAlts() {
- return _alts;
- }
- public AltSeq getPostSeq() {
- return _postSeq;
- }
-
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- int count = 0;
- if (_preSeq != null) count++;
- if (_alts != null) count++;
- if (_postSeq != null) count++;
-
- return count;
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- int count = -1;
- if ((_preSeq != null) && (++count == index)) return _preSeq;
- if ((_alts != null) && (++count == index)) return _alts;
- if ((_postSeq != null) && (++count == index)) return _postSeq;
-
- throw new IndexOutOfBoundsException();
- }
-
- /**
- * Construct a new AltRuleBody.
- */
- public AltRuleBody(
- AltSeq preSeq,
- Alts alts,
- AltSeq postSeq
- ) {
- super();
-
- if (preSeq != null) {
- _preSeq = preSeq;
- if (_preSeq._parent != null) throw new RuntimeException();
- _preSeq._parent = this;
- }
- if (alts != null) {
- _alts = alts;
- if (_alts._parent != null) throw new RuntimeException();
- _alts._parent = this;
- }
- if (postSeq != null) {
- _postSeq = postSeq;
- if (_postSeq._parent != null) throw new RuntimeException();
- _postSeq._parent = this;
- }
-
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/AltRuleDecl.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/AltRuleDecl.java
deleted file mode 100644
index 6ed02e6..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/AltRuleDecl.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-
-import antlr.Token;
-
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class AltRuleDecl extends GymnastASTNode {
-
-
- private AltRuleKind _kind;
- private Id _name;
- private Attrs _attrs;
- private GymnastTokenNode _colon;
-
- public AltRuleKind getKind() {
- return _kind;
- }
- public Id getName() {
- return _name;
- }
- public Attrs getAttrs() {
- return _attrs;
- }
- public GymnastTokenNode getColon() {
- return _colon;
- }
-
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- int count = 0;
- if (_kind != null) count++;
- if (_name != null) count++;
- if (_attrs != null) count++;
- if (_colon != null) count++;
-
- return count;
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- int count = -1;
- if ((_kind != null) && (++count == index)) return _kind;
- if ((_name != null) && (++count == index)) return _name;
- if ((_attrs != null) && (++count == index)) return _attrs;
- if ((_colon != null) && (++count == index)) return _colon;
-
- throw new IndexOutOfBoundsException();
- }
-
- /**
- * Construct a new AltRuleDecl.
- */
- public AltRuleDecl(
- AltRuleKind kind,
- Id name,
- Attrs attrs,
- Token colon
- ) {
- super();
-
- if (kind != null) {
- _kind = kind;
- if (_kind._parent != null) throw new RuntimeException();
- _kind._parent = this;
- }
- if (name != null) {
- _name = name;
- if (_name._parent != null) throw new RuntimeException();
- _name._parent = this;
- }
- if (attrs != null) {
- _attrs = attrs;
- if (_attrs._parent != null) throw new RuntimeException();
- _attrs._parent = this;
- }
- if (colon != null) {
- _colon = new GymnastTokenNode(colon);
- if (_colon._parent != null) throw new RuntimeException();
- _colon._parent = this;
- }
-
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/AltRuleKind.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/AltRuleKind.java
deleted file mode 100644
index ba7a8df..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/AltRuleKind.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import antlr.Token;
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class AltRuleKind extends GymnastTokenNode {
-
- public static final String KW_ABSTRACT = "abstract";
- public static final String KW_CONTAINER = "container";
- public static final String KW_INTERFACE = "interface";
-
-
- /**
- * Construct a new AltRuleKind.
- */
- public AltRuleKind(Token token) {
- super(token);
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/AltSeq.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/AltSeq.java
deleted file mode 100644
index 6543108..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/AltSeq.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-
-import antlr.Token;
-
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class AltSeq extends GymnastASTNode {
-
-
- private GymnastTokenNode _lparen;
- private Seq _seq;
- private GymnastTokenNode _rparen;
-
- public GymnastTokenNode getLparen() {
- return _lparen;
- }
- public Seq getSeq() {
- return _seq;
- }
- public GymnastTokenNode getRparen() {
- return _rparen;
- }
-
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- int count = 0;
- if (_lparen != null) count++;
- if (_seq != null) count++;
- if (_rparen != null) count++;
-
- return count;
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- int count = -1;
- if ((_lparen != null) && (++count == index)) return _lparen;
- if ((_seq != null) && (++count == index)) return _seq;
- if ((_rparen != null) && (++count == index)) return _rparen;
-
- throw new IndexOutOfBoundsException();
- }
-
- /**
- * Construct a new AltSeq.
- */
- public AltSeq(
- Token lparen,
- Seq seq,
- Token rparen
- ) {
- super();
-
- if (lparen != null) {
- _lparen = new GymnastTokenNode(lparen);
- if (_lparen._parent != null) throw new RuntimeException();
- _lparen._parent = this;
- }
- if (seq != null) {
- _seq = seq;
- if (_seq._parent != null) throw new RuntimeException();
- _seq._parent = this;
- }
- if (rparen != null) {
- _rparen = new GymnastTokenNode(rparen);
- if (_rparen._parent != null) throw new RuntimeException();
- _rparen._parent = this;
- }
-
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Alts.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Alts.java
deleted file mode 100644
index c23d4f3..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Alts.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import java.util.ArrayList;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-
-import antlr.Token;
-
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class Alts extends GymnastASTNode {
-
- private ArrayList _children = new ArrayList();
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- return _children.size();
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- return (ASTNode)_children.get(index);
- }
-
- /**
- * Add a child to this list.
- */
- public void addChild(GymnastASTNode child) {
- if (child == null) return;
- if (child._parent != null) throw new RuntimeException();
- _children.add(child);
- child._parent = this;
- }
-
- /**
- * Wrap the provided Token in a GymnastTokenNode
- * and add it as a child of this node.
- *
- * @param token the Token to be added as a child of this node
- */
- public void addChild(Token token) {
- addChild(new GymnastTokenNode(token));
- }
-
- /**
- * Construct a new Alts.
- */
- public Alts() {
- super();
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Atom.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Atom.java
deleted file mode 100644
index 625af34..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Atom.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import antlr.Token;
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class Atom extends GymnastTokenNode {
-
- public static final String KW_ABSTRACT = "abstract";
- public static final String KW_CONTAINER = "container";
- public static final String KW_INTERFACE = "interface";
- public static final String KW_LANGUAGE = "language";
- public static final String KW_LIST = "list";
- public static final String KW_OPTIONS = "options";
- public static final String KW_SEQUENCE = "sequence";
- public static final String KW_TOKEN = "token";
-
-
- /**
- * Construct a new Atom.
- */
- public Atom(Token token) {
- super(token);
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/AttrList.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/AttrList.java
deleted file mode 100644
index 7577ef0..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/AttrList.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import java.util.ArrayList;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-
-import antlr.Token;
-
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class AttrList extends GymnastASTNode {
-
- private ArrayList _children = new ArrayList();
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- return _children.size();
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- return (ASTNode)_children.get(index);
- }
-
- /**
- * Add a child to this list.
- */
- public void addChild(GymnastASTNode child) {
- if (child == null) return;
- if (child._parent != null) throw new RuntimeException();
- _children.add(child);
- child._parent = this;
- }
-
- /**
- * Wrap the provided Token in a GymnastTokenNode
- * and add it as a child of this node.
- *
- * @param token the Token to be added as a child of this node
- */
- public void addChild(Token token) {
- addChild(new GymnastTokenNode(token));
- }
-
- /**
- * Construct a new AttrList.
- */
- public AttrList() {
- super();
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Attrs.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Attrs.java
deleted file mode 100644
index 4e190ff..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Attrs.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-
-import antlr.Token;
-
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class Attrs extends GymnastASTNode {
-
-
- private GymnastTokenNode _lsquare;
- private AttrList _attrList;
- private GymnastTokenNode _rsquare;
-
- public GymnastTokenNode getLsquare() {
- return _lsquare;
- }
- public AttrList getAttrList() {
- return _attrList;
- }
- public GymnastTokenNode getRsquare() {
- return _rsquare;
- }
-
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- int count = 0;
- if (_lsquare != null) count++;
- if (_attrList != null) count++;
- if (_rsquare != null) count++;
-
- return count;
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- int count = -1;
- if ((_lsquare != null) && (++count == index)) return _lsquare;
- if ((_attrList != null) && (++count == index)) return _attrList;
- if ((_rsquare != null) && (++count == index)) return _rsquare;
-
- throw new IndexOutOfBoundsException();
- }
-
- /**
- * Construct a new Attrs.
- */
- public Attrs(
- Token lsquare,
- AttrList attrList,
- Token rsquare
- ) {
- super();
-
- if (lsquare != null) {
- _lsquare = new GymnastTokenNode(lsquare);
- if (_lsquare._parent != null) throw new RuntimeException();
- _lsquare._parent = this;
- }
- if (attrList != null) {
- _attrList = attrList;
- if (_attrList._parent != null) throw new RuntimeException();
- _attrList._parent = this;
- }
- if (rsquare != null) {
- _rsquare = new GymnastTokenNode(rsquare);
- if (_rsquare._parent != null) throw new RuntimeException();
- _rsquare._parent = this;
- }
-
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/CompUnit.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/CompUnit.java
deleted file mode 100644
index daf8039..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/CompUnit.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class CompUnit extends GymnastASTNode {
-
-
- private HeaderSection _headerSection;
- private Grammar _grammar;
-
- public HeaderSection getHeaderSection() {
- return _headerSection;
- }
- public Grammar getGrammar() {
- return _grammar;
- }
-
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- int count = 0;
- if (_headerSection != null) count++;
- if (_grammar != null) count++;
-
- return count;
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- int count = -1;
- if ((_headerSection != null) && (++count == index)) return _headerSection;
- if ((_grammar != null) && (++count == index)) return _grammar;
-
- throw new IndexOutOfBoundsException();
- }
-
- /**
- * Construct a new CompUnit.
- */
- public CompUnit(
- HeaderSection headerSection,
- Grammar grammar
- ) {
- super();
-
- if (headerSection != null) {
- _headerSection = headerSection;
- if (_headerSection._parent != null) throw new RuntimeException();
- _headerSection._parent = this;
- }
- if (grammar != null) {
- _grammar = grammar;
- if (_grammar._parent != null) throw new RuntimeException();
- _grammar._parent = this;
- }
-
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Expr.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Expr.java
deleted file mode 100644
index bef1922..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Expr.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public abstract class Expr extends GymnastASTNode {
- /**
- * Construct a new Expr.
- */
- public Expr() {
- super();
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Grammar.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Grammar.java
deleted file mode 100644
index 9cfadb4..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Grammar.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import java.util.ArrayList;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-
-import antlr.Token;
-
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class Grammar extends GymnastASTNode {
-
- private ArrayList _children = new ArrayList();
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- return _children.size();
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- return (ASTNode)_children.get(index);
- }
-
- /**
- * Add a child to this list.
- */
- public void addChild(GymnastASTNode child) {
- if (child == null) return;
- if (child._parent != null) throw new RuntimeException();
- _children.add(child);
- child._parent = this;
- }
-
- /**
- * Wrap the provided Token in a GymnastTokenNode
- * and add it as a child of this node.
- *
- * @param token the Token to be added as a child of this node
- */
- public void addChild(Token token) {
- addChild(new GymnastTokenNode(token));
- }
-
- /**
- * Construct a new Grammar.
- */
- public Grammar() {
- super();
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/GymnastASTNode.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/GymnastASTNode.java
deleted file mode 100644
index 70473f6..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/GymnastASTNode.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-import org.eclipse.gymnast.runtime.core.ast.ASTNodeImpl;
-import org.eclipse.gymnast.runtime.core.ast.TokenInfo;
-
-import antlr.Token;
-
-
-/**
- * The superclass of all ASTNodes for language Gymnast.
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public abstract class GymnastASTNode extends ASTNodeImpl {
-
- protected GymnastASTNode _parent;
-
- /**
- * @return the parent of this ASTNode or null if this is the root node of a tree
- */
- public ASTNode getParent() {
- return _parent;
- }
-
- /**
- * Construct a new GymnastASTNode.
- */
- public GymnastASTNode() {
- super();
- }
-
- /**
- * Construct a new GymnastASTNode.
- *
- * @param token a Token to initialize the offset and text for this node.
- */
- public GymnastASTNode(Token token) {
- super(new TokenInfo(token.getText(), token.getColumn(), token.getType()));
- }
-
- /**
- * The external entry point used to initiate the visitor on this node.
- *
- * @param visitor the Visitor to visit this node tree
- */
- public final void accept(GymnastASTNodeVisitor visitor) {
- visitor.preVisit(this);
- acceptImpl(visitor);
- visitor.postVisit(this);
- }
-
- /**
- * This method can be overridden by subclasses which should provide exactly
- * the same implementation. Here <code>this</code> refers to the generic node
- * class, but in the subclass implementations <code>this</code> will refer to
- * the specific subclass type. Thus the correct specific <code>beginVisit</code>
- * and <code>endVisit</code> methods will be invoked for each subclass and the
- * generic methods will be invoked for subclasses that don't need specific visitor
- * behavior.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
- /**
- * Iterate through the children of this node and accept the visitor on each.
- */
- protected void visitChildren(GymnastASTNodeVisitor visitor) {
- for (int i = 0; i < getChildCount(); i++) {
- ASTNode child = getChild(i);
- if (child instanceof GymnastASTNode) {
- GymnastASTNode c = (GymnastASTNode)child;
- c.accept(visitor);
- }
- }
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/GymnastASTNodeVisitor.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/GymnastASTNodeVisitor.java
deleted file mode 100644
index 4f14ed2..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/GymnastASTNodeVisitor.java
+++ /dev/null
@@ -1,882 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-/**
- * A Visitor pattern stub implementation for language Gymnast.
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class GymnastASTNodeVisitor {
-
- /**
- * The external entry point used to perform a visit beginning at the given node.
- *
- * @param node the GymnastASTNode to visit
- */
- public final void visit(GymnastASTNode node) {
- node.accept(this);
- }
-
- /**
- * Called just before <code>beginVisit</code> for each node being visited.
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param node the GymnastASTNode currently being visited
- */
- public void preVisit(GymnastASTNode node) {
- }
-
- /**
- * Called just after <code>endVisit</code> for each node being visited.
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param node the GymnastASTNode currently being visited
- */
- public void postVisit(GymnastASTNode node) {
- }
-
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the generic one called for node types that
- * don't provide a specific overloaded form of <code>beginVisit</code>.
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param node the GymnastASTNode currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(GymnastASTNode node) {
- return true;
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the generic one called for node types that
- * don't provide a specific overloaded form of <code>endVisit</code>.
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param node the GymnastASTNode currently being visited
- */
- public void endVisit(GymnastASTNode node) {
- }
-
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>GymnastTokenNode</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param tokenNode the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(GymnastTokenNode tokenNode) {
- return beginVisit((GymnastASTNode)tokenNode);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>GymnastTokenNode</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param tokenNode the node currently being visited
- */
- public void endVisit(GymnastTokenNode tokenNode) {
- endVisit((GymnastASTNode)tokenNode);
- }
-
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>CompUnit</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param compUnit the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(CompUnit compUnit) {
- return beginVisit((GymnastASTNode)compUnit);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>CompUnit</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param compUnit the node currently being visited
- */
- public void endVisit(CompUnit compUnit) {
- endVisit((GymnastASTNode)compUnit);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>HeaderSection</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param headerSection the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(HeaderSection headerSection) {
- return beginVisit((GymnastASTNode)headerSection);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>HeaderSection</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param headerSection the node currently being visited
- */
- public void endVisit(HeaderSection headerSection) {
- endVisit((GymnastASTNode)headerSection);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>OptionsSection</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param optionsSection the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(OptionsSection optionsSection) {
- return beginVisit((GymnastASTNode)optionsSection);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>OptionsSection</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param optionsSection the node currently being visited
- */
- public void endVisit(OptionsSection optionsSection) {
- endVisit((GymnastASTNode)optionsSection);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>OptionList</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param optionList the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(OptionList optionList) {
- return beginVisit((GymnastASTNode)optionList);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>OptionList</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param optionList the node currently being visited
- */
- public void endVisit(OptionList optionList) {
- endVisit((GymnastASTNode)optionList);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>Option</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param option the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(Option option) {
- return beginVisit((GymnastASTNode)option);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>Option</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param option the node currently being visited
- */
- public void endVisit(Option option) {
- endVisit((GymnastASTNode)option);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>OptionValue</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param optionValue the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(OptionValue optionValue) {
- return beginVisit((GymnastTokenNode)optionValue);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>OptionValue</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param optionValue the node currently being visited
- */
- public void endVisit(OptionValue optionValue) {
- endVisit((GymnastTokenNode)optionValue);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>Grammar</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param grammar the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(Grammar grammar) {
- return beginVisit((GymnastASTNode)grammar);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>Grammar</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param grammar the node currently being visited
- */
- public void endVisit(Grammar grammar) {
- endVisit((GymnastASTNode)grammar);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>Rule</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param rule the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(Rule rule) {
- return beginVisit((GymnastASTNode)rule);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>Rule</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param rule the node currently being visited
- */
- public void endVisit(Rule rule) {
- endVisit((GymnastASTNode)rule);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>AltRule</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param altRule the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(AltRule altRule) {
- return beginVisit((Rule)altRule);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>AltRule</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param altRule the node currently being visited
- */
- public void endVisit(AltRule altRule) {
- endVisit((Rule)altRule);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>AltRuleDecl</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param altRuleDecl the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(AltRuleDecl altRuleDecl) {
- return beginVisit((GymnastASTNode)altRuleDecl);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>AltRuleDecl</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param altRuleDecl the node currently being visited
- */
- public void endVisit(AltRuleDecl altRuleDecl) {
- endVisit((GymnastASTNode)altRuleDecl);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>AltRuleKind</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param altRuleKind the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(AltRuleKind altRuleKind) {
- return beginVisit((GymnastTokenNode)altRuleKind);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>AltRuleKind</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param altRuleKind the node currently being visited
- */
- public void endVisit(AltRuleKind altRuleKind) {
- endVisit((GymnastTokenNode)altRuleKind);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>AltRuleBody</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param altRuleBody the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(AltRuleBody altRuleBody) {
- return beginVisit((GymnastASTNode)altRuleBody);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>AltRuleBody</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param altRuleBody the node currently being visited
- */
- public void endVisit(AltRuleBody altRuleBody) {
- endVisit((GymnastASTNode)altRuleBody);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>Alts</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param alts the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(Alts alts) {
- return beginVisit((GymnastASTNode)alts);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>Alts</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param alts the node currently being visited
- */
- public void endVisit(Alts alts) {
- endVisit((GymnastASTNode)alts);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>AltSeq</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param altSeq the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(AltSeq altSeq) {
- return beginVisit((GymnastASTNode)altSeq);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>AltSeq</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param altSeq the node currently being visited
- */
- public void endVisit(AltSeq altSeq) {
- endVisit((GymnastASTNode)altSeq);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>ListRule</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param listRule the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(ListRule listRule) {
- return beginVisit((Rule)listRule);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>ListRule</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param listRule the node currently being visited
- */
- public void endVisit(ListRule listRule) {
- endVisit((Rule)listRule);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>ListRuleDecl</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param listRuleDecl the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(ListRuleDecl listRuleDecl) {
- return beginVisit((GymnastASTNode)listRuleDecl);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>ListRuleDecl</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param listRuleDecl the node currently being visited
- */
- public void endVisit(ListRuleDecl listRuleDecl) {
- endVisit((GymnastASTNode)listRuleDecl);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>ListRuleBody</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param listRuleBody the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(ListRuleBody listRuleBody) {
- return beginVisit((GymnastASTNode)listRuleBody);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>ListRuleBody</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param listRuleBody the node currently being visited
- */
- public void endVisit(ListRuleBody listRuleBody) {
- endVisit((GymnastASTNode)listRuleBody);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>ListMark</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param listMark the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(ListMark listMark) {
- return beginVisit((GymnastTokenNode)listMark);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>ListMark</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param listMark the node currently being visited
- */
- public void endVisit(ListMark listMark) {
- endVisit((GymnastTokenNode)listMark);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>SeqRule</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param seqRule the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(SeqRule seqRule) {
- return beginVisit((Rule)seqRule);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>SeqRule</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param seqRule the node currently being visited
- */
- public void endVisit(SeqRule seqRule) {
- endVisit((Rule)seqRule);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>SeqRuleDecl</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param seqRuleDecl the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(SeqRuleDecl seqRuleDecl) {
- return beginVisit((GymnastASTNode)seqRuleDecl);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>SeqRuleDecl</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param seqRuleDecl the node currently being visited
- */
- public void endVisit(SeqRuleDecl seqRuleDecl) {
- endVisit((GymnastASTNode)seqRuleDecl);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>Seq</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param seq the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(Seq seq) {
- return beginVisit((GymnastASTNode)seq);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>Seq</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param seq the node currently being visited
- */
- public void endVisit(Seq seq) {
- endVisit((GymnastASTNode)seq);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>TokenRule</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param tokenRule the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(TokenRule tokenRule) {
- return beginVisit((Rule)tokenRule);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>TokenRule</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param tokenRule the node currently being visited
- */
- public void endVisit(TokenRule tokenRule) {
- endVisit((Rule)tokenRule);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>TokenRuleDecl</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param tokenRuleDecl the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(TokenRuleDecl tokenRuleDecl) {
- return beginVisit((GymnastASTNode)tokenRuleDecl);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>TokenRuleDecl</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param tokenRuleDecl the node currently being visited
- */
- public void endVisit(TokenRuleDecl tokenRuleDecl) {
- endVisit((GymnastASTNode)tokenRuleDecl);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>Expr</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param expr the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(Expr expr) {
- return beginVisit((GymnastASTNode)expr);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>Expr</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param expr the node currently being visited
- */
- public void endVisit(Expr expr) {
- endVisit((GymnastASTNode)expr);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>OptSubSeq</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param optSubSeq the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(OptSubSeq optSubSeq) {
- return beginVisit((Expr)optSubSeq);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>OptSubSeq</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param optSubSeq the node currently being visited
- */
- public void endVisit(OptSubSeq optSubSeq) {
- endVisit((Expr)optSubSeq);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>SimpleExpr</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param simpleExpr the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(SimpleExpr simpleExpr) {
- return beginVisit((Expr)simpleExpr);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>SimpleExpr</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param simpleExpr the node currently being visited
- */
- public void endVisit(SimpleExpr simpleExpr) {
- endVisit((Expr)simpleExpr);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>Attrs</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param attrs the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(Attrs attrs) {
- return beginVisit((GymnastASTNode)attrs);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>Attrs</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param attrs the node currently being visited
- */
- public void endVisit(Attrs attrs) {
- endVisit((GymnastASTNode)attrs);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>AttrList</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param attrList the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(AttrList attrList) {
- return beginVisit((GymnastASTNode)attrList);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>AttrList</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param attrList the node currently being visited
- */
- public void endVisit(AttrList attrList) {
- endVisit((GymnastASTNode)attrList);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>Atom</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param atom the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(Atom atom) {
- return beginVisit((GymnastTokenNode)atom);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>Atom</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param atom the node currently being visited
- */
- public void endVisit(Atom atom) {
- endVisit((GymnastTokenNode)atom);
- }
- /**
- * This is called, for each node being visited, just after <code>preVisit</code> and
- * before (optionally) visiting the children of the node.
- * This <code>beginVisit</code> method is the specific one called for nodes
- * of type <code>Id</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param id the node currently being visited
- * @return true to visit the children of the node, false to prevent visiting the children of the node
- */
- public boolean beginVisit(Id id) {
- return beginVisit((GymnastTokenNode)id);
- }
-
- /**
- * This is called, for each node being visited, after <code>beginVisit</code> and
- * (optionally) visiting the children of the node and before <code>postVisit</code>.
- * This <code>endVisit</code> method is the specific one called for nodes
- * of type <code>Id</code>
- * This may be overridden to provide special behavior at that point in processing.
- *
- * @param id the node currently being visited
- */
- public void endVisit(Id id) {
- endVisit((GymnastTokenNode)id);
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/GymnastTokenNode.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/GymnastTokenNode.java
deleted file mode 100644
index 0d2f2ba..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/GymnastTokenNode.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-
-import antlr.Token;
-
-
-/**
- * Represents a token in the language grammar.
- * Can be subclassed to represent specific token subgroups.
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class GymnastTokenNode extends GymnastASTNode {
-
- /**
- * @return the number of children of this ASTNode
- */
- public final int getChildCount() {
- // token rules cannot have children!
- return 0;
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public final ASTNode getChild(int index) {
- // token rules cannot have children!
- throw new IndexOutOfBoundsException();
- }
-
- /**
- * Construct a new GymnastTokenNode
- */
- public GymnastTokenNode(Token token) {
- super(token);
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/HeaderSection.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/HeaderSection.java
deleted file mode 100644
index 5c06eae..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/HeaderSection.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-
-import antlr.Token;
-
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class HeaderSection extends GymnastASTNode {
-
- public static final String KW_LANGUAGE = "language";
-
- private GymnastTokenNode _language_KW;
- private Id _name;
- private GymnastTokenNode _semi;
- private OptionsSection _optionsSection;
-
- public GymnastTokenNode getLanguage_KW() {
- return _language_KW;
- }
- public Id getName() {
- return _name;
- }
- public GymnastTokenNode getSemi() {
- return _semi;
- }
- public OptionsSection getOptionsSection() {
- return _optionsSection;
- }
-
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- int count = 0;
- if (_language_KW != null) count++;
- if (_name != null) count++;
- if (_semi != null) count++;
- if (_optionsSection != null) count++;
-
- return count;
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- int count = -1;
- if ((_language_KW != null) && (++count == index)) return _language_KW;
- if ((_name != null) && (++count == index)) return _name;
- if ((_semi != null) && (++count == index)) return _semi;
- if ((_optionsSection != null) && (++count == index)) return _optionsSection;
-
- throw new IndexOutOfBoundsException();
- }
-
- /**
- * Construct a new HeaderSection.
- */
- public HeaderSection(
- Token language_KW,
- Id name,
- Token semi,
- OptionsSection optionsSection
- ) {
- super();
-
- if (language_KW != null) {
- _language_KW = new GymnastTokenNode(language_KW);
- if (_language_KW._parent != null) throw new RuntimeException();
- _language_KW._parent = this;
- }
- if (name != null) {
- _name = name;
- if (_name._parent != null) throw new RuntimeException();
- _name._parent = this;
- }
- if (semi != null) {
- _semi = new GymnastTokenNode(semi);
- if (_semi._parent != null) throw new RuntimeException();
- _semi._parent = this;
- }
- if (optionsSection != null) {
- _optionsSection = optionsSection;
- if (_optionsSection._parent != null) throw new RuntimeException();
- _optionsSection._parent = this;
- }
-
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Id.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Id.java
deleted file mode 100644
index 1941bf6..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Id.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import antlr.Token;
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class Id extends GymnastTokenNode {
-
- public static final String KW_ABSTRACT = "abstract";
- public static final String KW_CONTAINER = "container";
- public static final String KW_INTERFACE = "interface";
- public static final String KW_LANGUAGE = "language";
- public static final String KW_LIST = "list";
- public static final String KW_OPTIONS = "options";
- public static final String KW_SEQUENCE = "sequence";
- public static final String KW_TOKEN = "token";
-
-
- /**
- * Construct a new Id.
- */
- public Id(Token token) {
- super(token);
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/ListMark.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/ListMark.java
deleted file mode 100644
index f41137b..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/ListMark.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import antlr.Token;
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class ListMark extends GymnastTokenNode {
-
-
-
- /**
- * Construct a new ListMark.
- */
- public ListMark(Token token) {
- super(token);
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/ListRule.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/ListRule.java
deleted file mode 100644
index b7895eb..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/ListRule.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-
-import antlr.Token;
-
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class ListRule extends Rule {
-
-
- private ListRuleDecl _decl;
- private ListRuleBody _body;
- private GymnastTokenNode _semi;
-
- public ListRuleDecl getDecl() {
- return _decl;
- }
- public ListRuleBody getBody() {
- return _body;
- }
- public GymnastTokenNode getSemi() {
- return _semi;
- }
-
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- int count = 0;
- if (_decl != null) count++;
- if (_body != null) count++;
- if (_semi != null) count++;
-
- return count;
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- int count = -1;
- if ((_decl != null) && (++count == index)) return _decl;
- if ((_body != null) && (++count == index)) return _body;
- if ((_semi != null) && (++count == index)) return _semi;
-
- throw new IndexOutOfBoundsException();
- }
-
- /**
- * Construct a new ListRule.
- */
- public ListRule(
- ListRuleDecl decl,
- ListRuleBody body,
- Token semi
- ) {
- super();
-
- if (decl != null) {
- _decl = decl;
- if (_decl._parent != null) throw new RuntimeException();
- _decl._parent = this;
- }
- if (body != null) {
- _body = body;
- if (_body._parent != null) throw new RuntimeException();
- _body._parent = this;
- }
- if (semi != null) {
- _semi = new GymnastTokenNode(semi);
- if (_semi._parent != null) throw new RuntimeException();
- _semi._parent = this;
- }
-
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/ListRuleBody.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/ListRuleBody.java
deleted file mode 100644
index 34022cf..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/ListRuleBody.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-
-import antlr.Token;
-
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class ListRuleBody extends GymnastASTNode {
-
-
- private SimpleExpr _listExpr;
- private GymnastTokenNode _lparen;
- private SimpleExpr _separator;
- private SimpleExpr _listExpr2;
- private GymnastTokenNode _rparen;
- private ListMark _listMark;
-
- public SimpleExpr getListExpr() {
- return _listExpr;
- }
- public GymnastTokenNode getLparen() {
- return _lparen;
- }
- public SimpleExpr getSeparator() {
- return _separator;
- }
- public SimpleExpr getListExpr2() {
- return _listExpr2;
- }
- public GymnastTokenNode getRparen() {
- return _rparen;
- }
- public ListMark getListMark() {
- return _listMark;
- }
-
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- int count = 0;
- if (_listExpr != null) count++;
- if (_lparen != null) count++;
- if (_separator != null) count++;
- if (_listExpr2 != null) count++;
- if (_rparen != null) count++;
- if (_listMark != null) count++;
-
- return count;
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- int count = -1;
- if ((_listExpr != null) && (++count == index)) return _listExpr;
- if ((_lparen != null) && (++count == index)) return _lparen;
- if ((_separator != null) && (++count == index)) return _separator;
- if ((_listExpr2 != null) && (++count == index)) return _listExpr2;
- if ((_rparen != null) && (++count == index)) return _rparen;
- if ((_listMark != null) && (++count == index)) return _listMark;
-
- throw new IndexOutOfBoundsException();
- }
-
- /**
- * Construct a new ListRuleBody.
- */
- public ListRuleBody(
- SimpleExpr listExpr,
- Token lparen,
- SimpleExpr separator,
- SimpleExpr listExpr2,
- Token rparen,
- ListMark listMark
- ) {
- super();
-
- if (listExpr != null) {
- _listExpr = listExpr;
- if (_listExpr._parent != null) throw new RuntimeException();
- _listExpr._parent = this;
- }
- if (lparen != null) {
- _lparen = new GymnastTokenNode(lparen);
- if (_lparen._parent != null) throw new RuntimeException();
- _lparen._parent = this;
- }
- if (separator != null) {
- _separator = separator;
- if (_separator._parent != null) throw new RuntimeException();
- _separator._parent = this;
- }
- if (listExpr2 != null) {
- _listExpr2 = listExpr2;
- if (_listExpr2._parent != null) throw new RuntimeException();
- _listExpr2._parent = this;
- }
- if (rparen != null) {
- _rparen = new GymnastTokenNode(rparen);
- if (_rparen._parent != null) throw new RuntimeException();
- _rparen._parent = this;
- }
- if (listMark != null) {
- _listMark = listMark;
- if (_listMark._parent != null) throw new RuntimeException();
- _listMark._parent = this;
- }
-
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/ListRuleDecl.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/ListRuleDecl.java
deleted file mode 100644
index 72c4593..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/ListRuleDecl.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-
-import antlr.Token;
-
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class ListRuleDecl extends GymnastASTNode {
-
- public static final String KW_LIST = "list";
-
- private GymnastTokenNode _list_KW;
- private Id _name;
- private Attrs _attrs;
- private GymnastTokenNode _colon;
-
- public GymnastTokenNode getList_KW() {
- return _list_KW;
- }
- public Id getName() {
- return _name;
- }
- public Attrs getAttrs() {
- return _attrs;
- }
- public GymnastTokenNode getColon() {
- return _colon;
- }
-
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- int count = 0;
- if (_list_KW != null) count++;
- if (_name != null) count++;
- if (_attrs != null) count++;
- if (_colon != null) count++;
-
- return count;
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- int count = -1;
- if ((_list_KW != null) && (++count == index)) return _list_KW;
- if ((_name != null) && (++count == index)) return _name;
- if ((_attrs != null) && (++count == index)) return _attrs;
- if ((_colon != null) && (++count == index)) return _colon;
-
- throw new IndexOutOfBoundsException();
- }
-
- /**
- * Construct a new ListRuleDecl.
- */
- public ListRuleDecl(
- Token list_KW,
- Id name,
- Attrs attrs,
- Token colon
- ) {
- super();
-
- if (list_KW != null) {
- _list_KW = new GymnastTokenNode(list_KW);
- if (_list_KW._parent != null) throw new RuntimeException();
- _list_KW._parent = this;
- }
- if (name != null) {
- _name = name;
- if (_name._parent != null) throw new RuntimeException();
- _name._parent = this;
- }
- if (attrs != null) {
- _attrs = attrs;
- if (_attrs._parent != null) throw new RuntimeException();
- _attrs._parent = this;
- }
- if (colon != null) {
- _colon = new GymnastTokenNode(colon);
- if (_colon._parent != null) throw new RuntimeException();
- _colon._parent = this;
- }
-
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/OptSubSeq.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/OptSubSeq.java
deleted file mode 100644
index 1b9c6de..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/OptSubSeq.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-
-import antlr.Token;
-
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class OptSubSeq extends Expr {
-
-
- private GymnastTokenNode _lparen;
- private Seq _seq;
- private GymnastTokenNode _rparen;
- private GymnastTokenNode _qmark;
-
- public GymnastTokenNode getLparen() {
- return _lparen;
- }
- public Seq getSeq() {
- return _seq;
- }
- public GymnastTokenNode getRparen() {
- return _rparen;
- }
- public GymnastTokenNode getQmark() {
- return _qmark;
- }
-
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- int count = 0;
- if (_lparen != null) count++;
- if (_seq != null) count++;
- if (_rparen != null) count++;
- if (_qmark != null) count++;
-
- return count;
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- int count = -1;
- if ((_lparen != null) && (++count == index)) return _lparen;
- if ((_seq != null) && (++count == index)) return _seq;
- if ((_rparen != null) && (++count == index)) return _rparen;
- if ((_qmark != null) && (++count == index)) return _qmark;
-
- throw new IndexOutOfBoundsException();
- }
-
- /**
- * Construct a new OptSubSeq.
- */
- public OptSubSeq(
- Token lparen,
- Seq seq,
- Token rparen,
- Token qmark
- ) {
- super();
-
- if (lparen != null) {
- _lparen = new GymnastTokenNode(lparen);
- if (_lparen._parent != null) throw new RuntimeException();
- _lparen._parent = this;
- }
- if (seq != null) {
- _seq = seq;
- if (_seq._parent != null) throw new RuntimeException();
- _seq._parent = this;
- }
- if (rparen != null) {
- _rparen = new GymnastTokenNode(rparen);
- if (_rparen._parent != null) throw new RuntimeException();
- _rparen._parent = this;
- }
- if (qmark != null) {
- _qmark = new GymnastTokenNode(qmark);
- if (_qmark._parent != null) throw new RuntimeException();
- _qmark._parent = this;
- }
-
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Option.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Option.java
deleted file mode 100644
index 9168669..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Option.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-
-import antlr.Token;
-
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class Option extends GymnastASTNode {
-
-
- private Id _name;
- private GymnastTokenNode _equals;
- private OptionValue _value;
- private GymnastTokenNode _semi;
-
- public Id getName() {
- return _name;
- }
- public GymnastTokenNode getEquals() {
- return _equals;
- }
- public OptionValue getValue() {
- return _value;
- }
- public GymnastTokenNode getSemi() {
- return _semi;
- }
-
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- int count = 0;
- if (_name != null) count++;
- if (_equals != null) count++;
- if (_value != null) count++;
- if (_semi != null) count++;
-
- return count;
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- int count = -1;
- if ((_name != null) && (++count == index)) return _name;
- if ((_equals != null) && (++count == index)) return _equals;
- if ((_value != null) && (++count == index)) return _value;
- if ((_semi != null) && (++count == index)) return _semi;
-
- throw new IndexOutOfBoundsException();
- }
-
- /**
- * Construct a new Option.
- */
- public Option(
- Id name,
- Token equals,
- OptionValue value,
- Token semi
- ) {
- super();
-
- if (name != null) {
- _name = name;
- if (_name._parent != null) throw new RuntimeException();
- _name._parent = this;
- }
- if (equals != null) {
- _equals = new GymnastTokenNode(equals);
- if (_equals._parent != null) throw new RuntimeException();
- _equals._parent = this;
- }
- if (value != null) {
- _value = value;
- if (_value._parent != null) throw new RuntimeException();
- _value._parent = this;
- }
- if (semi != null) {
- _semi = new GymnastTokenNode(semi);
- if (_semi._parent != null) throw new RuntimeException();
- _semi._parent = this;
- }
-
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/OptionList.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/OptionList.java
deleted file mode 100644
index 1001fc4..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/OptionList.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import java.util.ArrayList;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-
-import antlr.Token;
-
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class OptionList extends GymnastASTNode {
-
- private ArrayList _children = new ArrayList();
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- return _children.size();
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- return (ASTNode)_children.get(index);
- }
-
- /**
- * Add a child to this list.
- */
- public void addChild(GymnastASTNode child) {
- if (child == null) return;
- if (child._parent != null) throw new RuntimeException();
- _children.add(child);
- child._parent = this;
- }
-
- /**
- * Wrap the provided Token in a GymnastTokenNode
- * and add it as a child of this node.
- *
- * @param token the Token to be added as a child of this node
- */
- public void addChild(Token token) {
- addChild(new GymnastTokenNode(token));
- }
-
- /**
- * Construct a new OptionList.
- */
- public OptionList() {
- super();
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/OptionValue.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/OptionValue.java
deleted file mode 100644
index 2ca8565..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/OptionValue.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import antlr.Token;
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class OptionValue extends GymnastTokenNode {
-
-
-
- /**
- * Construct a new OptionValue.
- */
- public OptionValue(Token token) {
- super(token);
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/OptionsSection.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/OptionsSection.java
deleted file mode 100644
index dc4d7d9..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/OptionsSection.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-
-import antlr.Token;
-
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class OptionsSection extends GymnastASTNode {
-
- public static final String KW_OPTIONS = "options";
-
- private GymnastTokenNode _options_KW;
- private GymnastTokenNode _lcurly;
- private OptionList _optionList;
- private GymnastTokenNode _rcurly;
-
- public GymnastTokenNode getOptions_KW() {
- return _options_KW;
- }
- public GymnastTokenNode getLcurly() {
- return _lcurly;
- }
- public OptionList getOptionList() {
- return _optionList;
- }
- public GymnastTokenNode getRcurly() {
- return _rcurly;
- }
-
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- int count = 0;
- if (_options_KW != null) count++;
- if (_lcurly != null) count++;
- if (_optionList != null) count++;
- if (_rcurly != null) count++;
-
- return count;
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- int count = -1;
- if ((_options_KW != null) && (++count == index)) return _options_KW;
- if ((_lcurly != null) && (++count == index)) return _lcurly;
- if ((_optionList != null) && (++count == index)) return _optionList;
- if ((_rcurly != null) && (++count == index)) return _rcurly;
-
- throw new IndexOutOfBoundsException();
- }
-
- /**
- * Construct a new OptionsSection.
- */
- public OptionsSection(
- Token options_KW,
- Token lcurly,
- OptionList optionList,
- Token rcurly
- ) {
- super();
-
- if (options_KW != null) {
- _options_KW = new GymnastTokenNode(options_KW);
- if (_options_KW._parent != null) throw new RuntimeException();
- _options_KW._parent = this;
- }
- if (lcurly != null) {
- _lcurly = new GymnastTokenNode(lcurly);
- if (_lcurly._parent != null) throw new RuntimeException();
- _lcurly._parent = this;
- }
- if (optionList != null) {
- _optionList = optionList;
- if (_optionList._parent != null) throw new RuntimeException();
- _optionList._parent = this;
- }
- if (rcurly != null) {
- _rcurly = new GymnastTokenNode(rcurly);
- if (_rcurly._parent != null) throw new RuntimeException();
- _rcurly._parent = this;
- }
-
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Rule.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Rule.java
deleted file mode 100644
index 071effa..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Rule.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public abstract class Rule extends GymnastASTNode {
- /**
- * Construct a new Rule.
- */
- public Rule() {
- super();
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Seq.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Seq.java
deleted file mode 100644
index 6d1bc7b..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/Seq.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import java.util.ArrayList;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-
-import antlr.Token;
-
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class Seq extends GymnastASTNode {
-
- private ArrayList _children = new ArrayList();
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- return _children.size();
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- return (ASTNode)_children.get(index);
- }
-
- /**
- * Add a child to this list.
- */
- public void addChild(GymnastASTNode child) {
- if (child == null) return;
- if (child._parent != null) throw new RuntimeException();
- _children.add(child);
- child._parent = this;
- }
-
- /**
- * Wrap the provided Token in a GymnastTokenNode
- * and add it as a child of this node.
- *
- * @param token the Token to be added as a child of this node
- */
- public void addChild(Token token) {
- addChild(new GymnastTokenNode(token));
- }
-
- /**
- * Construct a new Seq.
- */
- public Seq() {
- super();
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/SeqRule.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/SeqRule.java
deleted file mode 100644
index 4115937..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/SeqRule.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-
-import antlr.Token;
-
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class SeqRule extends Rule {
-
-
- private SeqRuleDecl _decl;
- private Seq _body;
- private GymnastTokenNode _semi;
-
- public SeqRuleDecl getDecl() {
- return _decl;
- }
- public Seq getBody() {
- return _body;
- }
- public GymnastTokenNode getSemi() {
- return _semi;
- }
-
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- int count = 0;
- if (_decl != null) count++;
- if (_body != null) count++;
- if (_semi != null) count++;
-
- return count;
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- int count = -1;
- if ((_decl != null) && (++count == index)) return _decl;
- if ((_body != null) && (++count == index)) return _body;
- if ((_semi != null) && (++count == index)) return _semi;
-
- throw new IndexOutOfBoundsException();
- }
-
- /**
- * Construct a new SeqRule.
- */
- public SeqRule(
- SeqRuleDecl decl,
- Seq body,
- Token semi
- ) {
- super();
-
- if (decl != null) {
- _decl = decl;
- if (_decl._parent != null) throw new RuntimeException();
- _decl._parent = this;
- }
- if (body != null) {
- _body = body;
- if (_body._parent != null) throw new RuntimeException();
- _body._parent = this;
- }
- if (semi != null) {
- _semi = new GymnastTokenNode(semi);
- if (_semi._parent != null) throw new RuntimeException();
- _semi._parent = this;
- }
-
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/SeqRuleDecl.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/SeqRuleDecl.java
deleted file mode 100644
index 4513550..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/SeqRuleDecl.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-
-import antlr.Token;
-
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class SeqRuleDecl extends GymnastASTNode {
-
- public static final String KW_SEQUENCE = "sequence";
-
- private GymnastTokenNode _sequence_KW;
- private Id _name;
- private Attrs _attrs;
- private GymnastTokenNode _colon;
-
- public GymnastTokenNode getSequence_KW() {
- return _sequence_KW;
- }
- public Id getName() {
- return _name;
- }
- public Attrs getAttrs() {
- return _attrs;
- }
- public GymnastTokenNode getColon() {
- return _colon;
- }
-
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- int count = 0;
- if (_sequence_KW != null) count++;
- if (_name != null) count++;
- if (_attrs != null) count++;
- if (_colon != null) count++;
-
- return count;
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- int count = -1;
- if ((_sequence_KW != null) && (++count == index)) return _sequence_KW;
- if ((_name != null) && (++count == index)) return _name;
- if ((_attrs != null) && (++count == index)) return _attrs;
- if ((_colon != null) && (++count == index)) return _colon;
-
- throw new IndexOutOfBoundsException();
- }
-
- /**
- * Construct a new SeqRuleDecl.
- */
- public SeqRuleDecl(
- Token sequence_KW,
- Id name,
- Attrs attrs,
- Token colon
- ) {
- super();
-
- if (sequence_KW != null) {
- _sequence_KW = new GymnastTokenNode(sequence_KW);
- if (_sequence_KW._parent != null) throw new RuntimeException();
- _sequence_KW._parent = this;
- }
- if (name != null) {
- _name = name;
- if (_name._parent != null) throw new RuntimeException();
- _name._parent = this;
- }
- if (attrs != null) {
- _attrs = attrs;
- if (_attrs._parent != null) throw new RuntimeException();
- _attrs._parent = this;
- }
- if (colon != null) {
- _colon = new GymnastTokenNode(colon);
- if (_colon._parent != null) throw new RuntimeException();
- _colon._parent = this;
- }
-
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/SimpleExpr.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/SimpleExpr.java
deleted file mode 100644
index 01861a4..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/SimpleExpr.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-
-import antlr.Token;
-
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class SimpleExpr extends Expr {
-
-
- private Id _name;
- private GymnastTokenNode _equals;
- private Atom _value;
- private Attrs _attrs;
-
- public Id getName() {
- return _name;
- }
- public GymnastTokenNode getEquals() {
- return _equals;
- }
- public Atom getValue() {
- return _value;
- }
- public Attrs getAttrs() {
- return _attrs;
- }
-
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- int count = 0;
- if (_name != null) count++;
- if (_equals != null) count++;
- if (_value != null) count++;
- if (_attrs != null) count++;
-
- return count;
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- int count = -1;
- if ((_name != null) && (++count == index)) return _name;
- if ((_equals != null) && (++count == index)) return _equals;
- if ((_value != null) && (++count == index)) return _value;
- if ((_attrs != null) && (++count == index)) return _attrs;
-
- throw new IndexOutOfBoundsException();
- }
-
- /**
- * Construct a new SimpleExpr.
- */
- public SimpleExpr(
- Id name,
- Token equals,
- Atom value,
- Attrs attrs
- ) {
- super();
-
- if (name != null) {
- _name = name;
- if (_name._parent != null) throw new RuntimeException();
- _name._parent = this;
- }
- if (equals != null) {
- _equals = new GymnastTokenNode(equals);
- if (_equals._parent != null) throw new RuntimeException();
- _equals._parent = this;
- }
- if (value != null) {
- _value = value;
- if (_value._parent != null) throw new RuntimeException();
- _value._parent = this;
- }
- if (attrs != null) {
- _attrs = attrs;
- if (_attrs._parent != null) throw new RuntimeException();
- _attrs._parent = this;
- }
-
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/TokenRule.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/TokenRule.java
deleted file mode 100644
index 4490aa4..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/TokenRule.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-
-import antlr.Token;
-
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class TokenRule extends Rule {
-
-
- private TokenRuleDecl _decl;
- private Alts _body;
- private GymnastTokenNode _semi;
-
- public TokenRuleDecl getDecl() {
- return _decl;
- }
- public Alts getBody() {
- return _body;
- }
- public GymnastTokenNode getSemi() {
- return _semi;
- }
-
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- int count = 0;
- if (_decl != null) count++;
- if (_body != null) count++;
- if (_semi != null) count++;
-
- return count;
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- int count = -1;
- if ((_decl != null) && (++count == index)) return _decl;
- if ((_body != null) && (++count == index)) return _body;
- if ((_semi != null) && (++count == index)) return _semi;
-
- throw new IndexOutOfBoundsException();
- }
-
- /**
- * Construct a new TokenRule.
- */
- public TokenRule(
- TokenRuleDecl decl,
- Alts body,
- Token semi
- ) {
- super();
-
- if (decl != null) {
- _decl = decl;
- if (_decl._parent != null) throw new RuntimeException();
- _decl._parent = this;
- }
- if (body != null) {
- _body = body;
- if (_body._parent != null) throw new RuntimeException();
- _body._parent = this;
- }
- if (semi != null) {
- _semi = new GymnastTokenNode(semi);
- if (_semi._parent != null) throw new RuntimeException();
- _semi._parent = this;
- }
-
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/TokenRuleDecl.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/TokenRuleDecl.java
deleted file mode 100644
index 9892c66..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/ast/TokenRuleDecl.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.gymnast.generator.core.ast;
-
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-
-import antlr.Token;
-
-
-/**
- *
- * @generated by Gymnast from gymnast.ast on Aug 15, 2004 2:28:15 PM
- */
-public class TokenRuleDecl extends GymnastASTNode {
-
- public static final String KW_TOKEN = "token";
-
- private GymnastTokenNode _token_KW;
- private Id _name;
- private Attrs _attrs;
- private GymnastTokenNode _colon;
-
- public GymnastTokenNode getToken_KW() {
- return _token_KW;
- }
- public Id getName() {
- return _name;
- }
- public Attrs getAttrs() {
- return _attrs;
- }
- public GymnastTokenNode getColon() {
- return _colon;
- }
-
-
- /**
- * @return the number of children of this ASTNode
- */
- public int getChildCount() {
- int count = 0;
- if (_token_KW != null) count++;
- if (_name != null) count++;
- if (_attrs != null) count++;
- if (_colon != null) count++;
-
- return count;
- }
-
- /**
- * @param index the index of a child ASTNode to get
- * @return the child ASTNode at the given index
- * @throws IndexOutOfBoundsException when the index is out of bounds
- */
- public ASTNode getChild(int index) {
- int count = -1;
- if ((_token_KW != null) && (++count == index)) return _token_KW;
- if ((_name != null) && (++count == index)) return _name;
- if ((_attrs != null) && (++count == index)) return _attrs;
- if ((_colon != null) && (++count == index)) return _colon;
-
- throw new IndexOutOfBoundsException();
- }
-
- /**
- * Construct a new TokenRuleDecl.
- */
- public TokenRuleDecl(
- Token token_KW,
- Id name,
- Attrs attrs,
- Token colon
- ) {
- super();
-
- if (token_KW != null) {
- _token_KW = new GymnastTokenNode(token_KW);
- if (_token_KW._parent != null) throw new RuntimeException();
- _token_KW._parent = this;
- }
- if (name != null) {
- _name = name;
- if (_name._parent != null) throw new RuntimeException();
- _name._parent = this;
- }
- if (attrs != null) {
- _attrs = attrs;
- if (_attrs._parent != null) throw new RuntimeException();
- _attrs._parent = this;
- }
- if (colon != null) {
- _colon = new GymnastTokenNode(colon);
- if (_colon._parent != null) throw new RuntimeException();
- _colon._parent = this;
- }
-
- }
-
- /**
- * This method overrides the superclass <code>acceptImpl</code> providing
- * the same implementation. Here <code>this</code> refers to this specific node
- * class, so the <code>beginVisit</code> and <code>endVisit</code> methods
- * specific to this type in the visitor will be invoked.
- */
- public void acceptImpl(GymnastASTNodeVisitor visitor) {
- boolean visitChildren = visitor.beginVisit(this);
- if (visitChildren) visitChildren(visitor);
- visitor.endVisit(this);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/ASTUtil.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/ASTUtil.java
deleted file mode 100644
index 5bb3519..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/ASTUtil.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generator.core.generator;
-
-import org.eclipse.gymnast.generator.core.ast.AltRule;
-import org.eclipse.gymnast.generator.core.ast.AltRuleKind;
-import org.eclipse.gymnast.generator.core.ast.AttrList;
-import org.eclipse.gymnast.generator.core.ast.Attrs;
-import org.eclipse.gymnast.generator.core.ast.ListRule;
-import org.eclipse.gymnast.generator.core.ast.Rule;
-import org.eclipse.gymnast.generator.core.ast.SeqRule;
-import org.eclipse.gymnast.generator.core.ast.SimpleExpr;
-import org.eclipse.gymnast.generator.core.ast.TokenRule;
-
-/**
- * @author cjdaly@us.ibm.com
- *
- */
-public class ASTUtil {
-
- public static String getName(Rule rule) {
- return rule.getChild(0).getChild(1).getText();
- }
-
- public static boolean hasAttr(SimpleExpr se, String attrText) {
- return hasAttr(se.getAttrs(), attrText);
- }
-
- public static boolean hasAttr(Rule rule, String attrText) {
-
- if (rule instanceof AltRule) {
- AltRule r = (AltRule) rule;
- return hasAttr(r.getDecl().getAttrs(), attrText);
- }
- else if (rule instanceof ListRule) {
- ListRule r = (ListRule) rule;
- return hasAttr(r.getDecl().getAttrs(), attrText);
- }
- else if (rule instanceof SeqRule) {
- SeqRule r = (SeqRule) rule;
- return hasAttr(r.getDecl().getAttrs(), attrText);
- }
- else if (rule instanceof TokenRule) {
- TokenRule r = (TokenRule) rule;
- return hasAttr(r.getDecl().getAttrs(), attrText);
- }
-
- return false;
- }
-
- private static boolean hasAttr(Attrs attrs, String attrText) {
- if (attrs == null) return false;
- AttrList attrList = attrs.getAttrList();
-
- for (int i = 0; i < attrList.getChildCount(); i+=2) {
- if (attrText.equals(attrList.getChild(i).getText())) return true;
- }
- return false;
- }
-
- public static boolean isAbstract(Rule rule) {
- if (rule instanceof AltRule) {
- AltRule altRule = (AltRule)rule;
- return altRule.getDecl().getKind().getText().equals(AltRuleKind.KW_ABSTRACT);
- }
- return false;
- }
- public static boolean isContainer(Rule rule) {
- if (rule instanceof AltRule) {
- AltRule altRule = (AltRule)rule;
- return altRule.getDecl().getKind().getText().equals(AltRuleKind.KW_CONTAINER);
- }
- return false;
- }
- public static boolean isInterface(Rule rule) {
- if (rule instanceof AltRule) {
- AltRule altRule = (AltRule)rule;
- return altRule.getDecl().getKind().getText().equals(AltRuleKind.KW_INTERFACE);
- }
- return false;
- }
- public static boolean isList(Rule rule) {
- return (rule instanceof ListRule);
- }
- public static boolean isSequence(Rule rule) {
- return (rule instanceof SeqRule);
- }
- public static boolean isToken(Rule rule) {
- return (rule instanceof TokenRule);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/Generator.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/Generator.java
deleted file mode 100644
index eed0747..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/Generator.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generator.core.generator;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.gymnast.generator.core.ast.CompUnit;
-import org.eclipse.gymnast.generator.core.parser.ParserDriver;
-import org.eclipse.gymnast.generator.core.registry.ASTGeneratorDescriptor;
-import org.eclipse.gymnast.generator.core.registry.GeneratorRegistry;
-import org.eclipse.gymnast.generator.core.registry.ParserGeneratorDescriptor;
-import org.eclipse.gymnast.runtime.core.parser.ParseContext;
-import org.eclipse.gymnast.runtime.core.parser.ParseMessage;
-import org.eclipse.gymnast.runtime.core.util.IReporter;
-
-
-/**
- * @author cjdaly@us.ibm.com
- *
- */
-public class Generator {
-
- public void generate(IFile astFile, IProgressMonitor monitor, IReporter reporter) {
- try {
- GeneratorContext context = new GeneratorContext(astFile, monitor, reporter);
- GeneratorUtil util = context.getUtil();
- util.report("Gymnast run started at " + context.getBeginTimestamp());
-
- CompUnit compUnit = parse(context);
- context.initCompUnit(compUnit);
-
- GrammarInfo info = new GrammarInfo(context);
- context.initGrammarInfo(info);
-
- context.processOptions();
- context.initJavaPackages();
-
- final GeneratorRegistry generatorRegistry = GeneratorRegistry.getInstance();
-
- final String astGeneratorId = context.getASTGeneratorId();
- ASTGeneratorDescriptor astGeneratorDescriptor = generatorRegistry.getASTGeneratorDescriptor(astGeneratorId);
- if (astGeneratorDescriptor != null) {
- astGeneratorDescriptor.getASTGenerator().generateAST(context);
- } else {
- util.reportWarning("No AST generator found for id: " + astGeneratorId);
- }
-
- final String parserGeneratorId = context.getParserGeneratorId();
- ParserGeneratorDescriptor parserGeneratorDescriptor = generatorRegistry.getParserGeneratorDescriptor(parserGeneratorId);
- if (parserGeneratorDescriptor != null) {
- parserGeneratorDescriptor.getParserGenerator().generateParser(context);
- } else {
- util.reportWarning("No parser generator found for id: " + parserGeneratorId);
- }
-
- context.initEndTime();
- util.report("Gymnast run finished normally at " + context.getEndTimestamp());
- }
- catch (Exception ex) {
- reporter.reportError(ex);
- }
- }
-
- private CompUnit parse(GeneratorContext context) throws Exception {
-
- BufferedReader reader = new BufferedReader(new InputStreamReader(context.getASTFile().getContents()));
-
- ParserDriver parser = new ParserDriver();
- ParseContext parseContext = parser.parse(reader);
-
- if (parseContext.getMessageCount() > 0) {
- ParseMessage[] msgs = parseContext.getMessages();
- for (int i = 0; i < msgs.length; i++) {
- context.getUtil().reportError("parse message: " + msgs[i].getMessage());
- }
- throw new Exception("Errors in parse!");
- }
-
- CompUnit parseRoot = (CompUnit)parseContext.getParseRoot();
- if (parseRoot == null) {
- throw new Exception("Incomplete input!");
- }
-
- return parseRoot;
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/GeneratorContext.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/GeneratorContext.java
deleted file mode 100644
index 8467a23..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/GeneratorContext.java
+++ /dev/null
@@ -1,285 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generator.core.generator;
-
-import java.text.DateFormat;
-import java.util.Date;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.gymnast.generator.core.ast.CompUnit;
-import org.eclipse.gymnast.runtime.core.util.IReporter;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.JavaCore;
-
-
-/**
- * @author cjdaly@us.ibm.com
- *
- */
-public class GeneratorContext {
-
- private final String _toolName = "Gymnast";
- private String _generatedByText;
-
- private Date _beginTime;
- private String _beginTimestamp;
- private Date _endTime;
- private String _endTimestamp;
-
- private IFile _astFile;
- private GeneratorUtil _util;
- private boolean _isReportingVerbose = true;
-
- private CompUnit _compUnit;
- private GrammarInfo _grammarInfo;
-
- private String _astName;
-
- private String _astGeneratorId;
- private String _parserGeneratorId;
- private String _parserPackageName;
- private String _astPackageName;
- private String _lexerFileName;
- private String _astBaseClassName;
- private String _astBaseClassBaseName;
- private String _astTokenClassName;
- private String _astVisitorClassName;
- private final String _ldtASTNodePackageName = "org.eclipse.gymnast.runtime.core.ast";
- private final String _ldtASTNodeClassName = "ASTNode";
- private final String _ldtParserPackageName = "org.eclipse.gymnast.runtime.core.parser";
-
- private IJavaProject _javaProject;
- private IPackageFragment _astPackage;
- private IPackageFragment _parserPackage;
-
- public GeneratorContext(IFile astFile, IProgressMonitor monitor, IReporter reporter) throws Exception {
- _beginTime = new Date();
- _beginTimestamp = DateFormat.getDateTimeInstance().format(_beginTime);
-
- _astFile = astFile;
-
- _util = new GeneratorUtil(this, monitor, reporter);
-
- IProject proj = getProject();
-
- if (!proj.hasNature("org.eclipse.jdt.core.javanature")) {
- throw new Exception("no java project nature!");
- }
-
- _javaProject = JavaCore.create(proj);
- }
-
- public void initCompUnit(CompUnit compUnit) {
- _compUnit = compUnit;
- }
-
- public void initGrammarInfo(GrammarInfo grammarInfo) {
- _grammarInfo = grammarInfo;
- _astName = grammarInfo.getLanguageName();
- }
-
- void processOptions() throws Exception {
-
- _astGeneratorId = _grammarInfo.getOptionValue("astGenerator");
- if (_astGeneratorId == null) {
- _astGeneratorId = "primordial";
- }
-
- _astPackageName = _grammarInfo.getOptionValue("astPackageName");
- if (_astPackageName == null) {
- // get the path of the ast file and remove the filename
- // .../src/org/foo/lang/lang.g -> .../src/org/foo/lang
- IPath absPath = _astFile.getFullPath().removeLastSegments(1);
- IPackageFragment frag = _javaProject.findPackageFragment(absPath);
- if (frag != null) {
- _astPackageName = frag.getElementName() + ".gen.ast";
- }
- else {
- _astPackageName = ""; // global package ... will this work?
- }
- }
-
- _parserGeneratorId = _grammarInfo.getOptionValue("parserGenerator");
- if (_parserGeneratorId == null) {
- _parserGeneratorId = "antlr";
- }
-
- _parserPackageName = _grammarInfo.getOptionValue("parserPackageName");
- if (_parserPackageName == null) {
- // get the path of the ast file and remove the filename
- // .../src/org/foo/lang/lang.g -> .../src/org/foo/lang
- IPath absPath = _astFile.getFullPath().removeLastSegments(1);
- IPackageFragment frag = _javaProject.findPackageFragment(absPath);
- if (frag != null) {
- _parserPackageName = frag.getElementName() + ".gen.parser";
- }
- else {
- _parserPackageName = ""; // global package ... will this work?
- }
- }
-
- _lexerFileName = _grammarInfo.getOptionValue("lexerFileName");
- if (_lexerFileName == null) {
- _lexerFileName = getASTName() + "Lexer.g";
- }
-
- _astBaseClassName = _grammarInfo.getOptionValue("astBaseClassName");
- if (_astBaseClassName == null) {
- _astBaseClassName = _astName + "ASTNode";
- }
-
- _astBaseClassBaseName = _grammarInfo.getOptionValue("astBaseClassBaseName");
- if (_astBaseClassBaseName == null) {
- _astBaseClassBaseName = "ASTNodeImpl";
- }
-
- _astTokenClassName = _grammarInfo.getOptionValue("astTokenClassName");
- if (_astTokenClassName == null) {
- _astTokenClassName = _astName + "TokenNode";
- }
-
- _astVisitorClassName = _grammarInfo.getOptionValue("astVisitorClassName");
- if (_astVisitorClassName == null) {
- _astVisitorClassName = _astName + "ASTNodeVisitor";
- }
- }
-
- void initJavaPackages() throws Exception {
- _astPackage = _util.findOrCreatePackage(_javaProject, _astPackageName);
- checkExists(_astPackage, "AST package", _astPackageName);
-
- _parserPackage = _util.findOrCreatePackage(_javaProject, _parserPackageName);
- checkExists(_parserPackage, "parser package", _parserPackageName);
- }
- private void checkExists(IJavaElement el, String kind, String name) throws Exception {
- if ((el == null) || (!el.exists())) {
- throw new Exception("Could not get " + kind + " (name: " + name + ")");
- }
- }
-
- void initEndTime() {
- _endTime = new Date();
- _endTimestamp = DateFormat.getDateTimeInstance().format(_endTime);
- }
-
- //
- // data accessors
- //
-
- public String getToolName() {
- return _toolName;
- }
-
- public String getGeneratedByText() {
- if (_generatedByText == null) {
- _generatedByText = "@generated by " + getToolName() + " from "
- + getASTFile().getName() + " on " + getBeginTimestamp();
- }
- return _generatedByText;
- }
-
- public String getBeginTimestamp() {
- return _beginTimestamp;
- }
- public String getEndTimestamp() {
- return _endTimestamp;
- }
-
-
- public IProject getProject() {
- return _astFile.getProject();
- }
- public IJavaProject getJavaProject() {
- return _javaProject;
- }
- public IPackageFragment getASTPackage() {
- return _astPackage;
- }
- public IPackageFragment getParserPackage() {
- return _parserPackage;
- }
-
- public IFile getASTFile() {
- return _astFile;
- }
- public GeneratorUtil getUtil() {
- return _util;
- }
- public boolean isReportingVerbose() {
- return _isReportingVerbose;
- }
- public int getVerbosity() {
- return 5;
- }
-
- public String getASTName() {
- return _astName;
- }
-
- public String getASTGeneratorId() {
- return _astGeneratorId;
- }
- public String getParserGeneratorId() {
- return _parserGeneratorId;
- }
- public String getParserPackageName() {
- return _parserPackageName;
- }
- public String getASTPackageName() {
- return _astPackageName;
- }
- public String getLexerFileName() {
- return _lexerFileName;
- }
- public String getASTBaseClassName() {
- return _astBaseClassName;
- }
- public String getASTBaseClassBaseName() {
- return _astBaseClassBaseName;
- }
- public String getASTTokenClassName() {
- return _astTokenClassName;
- }
- public String getASTVisitorClassName() {
- return _astVisitorClassName;
- }
-
- public String getLDT_ASTNodePackageName() {
- return _ldtASTNodePackageName;
- }
- public String getLDT_ASTNodeClassName() {
- return _ldtASTNodeClassName;
- }
- public String getLDT_ParserPackageName() {
- return _ldtParserPackageName;
- }
- public String getEntryRuleName() {
- return _grammarInfo.getEntryRuleName();
- }
- public String getEntryRuleClassName() {
- return _grammarInfo.getEntryRuleClassName();
- }
-
-
- public GrammarInfo getGrammarInfo() {
- return _grammarInfo;
- }
- public CompUnit getCompUnit() {
- return _compUnit;
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/GeneratorUtil.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/GeneratorUtil.java
deleted file mode 100644
index c2262b6..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/GeneratorUtil.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generator.core.generator;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.gymnast.generator.core.ast.Rule;
-import org.eclipse.gymnast.generator.core.ast.SimpleExpr;
-import org.eclipse.gymnast.runtime.core.util.IReporter;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-
-
-/**
- * @author cjdaly@us.ibm.com
- *
- */
-public class GeneratorUtil {
-
- private GeneratorContext _context;
- private IProgressMonitor _monitor;
- private IReporter _reporter;
-
- GeneratorUtil(GeneratorContext context, IProgressMonitor monitor, IReporter reporter) {
- _context = context;
- _monitor = monitor;
- _reporter = reporter;
- }
-
-
- //
- // Reporting
- //
-
- public IReporter getReporter() {
- return _reporter;
- }
-
- public void report(String message) {
- report(message, 0);
- }
-
- public void report(String message, int verbosity) {
- if (verbosity == 0) {
- if (message != null) {
- _monitor.subTask(message);
- }
- }
-
- if (verbosity <= _context.getVerbosity()) {
- _reporter.report(message, verbosity);
- }
- }
-
- public void reportWarning(String message) {
- _reporter.reportWarning(message);
- }
-
- public void reportError(String message) {
- _reporter.reportError(message);
- }
-
- public void reportError(Exception ex) {
- _reporter.reportError(ex);
- }
-
-
- public void beginRules(int ruleCount) {
- _monitor.beginTask("Processing Rules", ruleCount);
- }
- public void ruleDone() {
- _monitor.worked(1);
- }
-
- //
- // Helpers for string manipulation scenarios
- //
-
- public String removeSurroundingQuotes(String text) {
- return Util.removeSurroundingQuotes(text);
- }
-
- /**
- * Uppercase the first letter of the name to make a good Java class
- * name (so "myName" -> "MyName")
- * @param name name to be uppercased
- * @return name with first character uppercased
- */
- public String toUppercaseName(String name) {
- return Util.toUppercaseName(name);
- }
-
- /**
- * Lowercase the first letter of the name to make a good Antlr rule
- * name (so "MyName" -> "myName")
- * @param name name to be lowercased
- * @return name with first character lowercased
- */
- public String toLowercaseName(String name) {
- return Util.toLowercaseName(name);
- }
-
- //
- //
- //
-
- public boolean isTokenReference(String type) {
- // In Antlr syntax a reference is a token reference if it is
- // all uppercase characters or if it's a string literal. Otherwise
- // it's a rule reference.
- // eg: ruleDef : ruleRef | TOKEN_REF | "literal";
-
- if (type.charAt(0) == '"') {
- // it's a string literal
- return true;
- }
-
- for (int i = 0; i < type.length(); i++) {
- char c = type.charAt(i);
-
- if (Character.isLowerCase(c)) {
- return false;
- }
- }
- return true;
- }
-
- private String getDefaultName(String type) {
- String name = null;
- // construct a reasonable name based on the type
- if (type.charAt(0) == '"') {
- // it's a string literal
- name = removeSurroundingQuotes(type) + "_KW";
- }
- else if (isTokenReference(type)) {
- name = type.toLowerCase();
- }
- else {
- name = type;
- }
- return name;
- }
-
- public String getLabel(SimpleExpr simpleExpr) {
- String rule = simpleExpr.getValue().getText();
- String label = null;
- if (simpleExpr.getName() != null) {
- label = simpleExpr.getName().getText();
- }
- else {
- label = getDefaultName(rule);
- }
- return label;
- }
-
- //
- // Helpers for building doc comments and code body text
- //
-
- void appendLine(StringBuffer sb) {
- sb.append('\n');
- }
-
- void appendLine(StringBuffer sb, int indentLevel, String text) {
- for (int i=0; i<indentLevel; i++) sb.append('\t');
- sb.append(text);
- sb.append('\n');
- }
-
- public String getRuleBaseClassName(Rule rule) {
- String baseClassName;
-
- if (ASTUtil.isToken(rule)) {
- baseClassName = _context.getASTTokenClassName();
- }
- else {
- String[] bases = _context.getGrammarInfo().getAltReferencers(ASTUtil.getName(rule));
- if ((bases == null) || (bases.length == 0)) {
- baseClassName = _context.getASTBaseClassName();
- }
- else if (bases.length == 1) {
- baseClassName = toUppercaseName(bases[0]);
- }
- else {
- baseClassName = _context.getASTBaseClassName();
- }
- }
-
- return baseClassName;
- }
-
- public String[] getRuleBaseInterfaceNames(Rule rule) {
- String[] baseInterfaceNames = null;
-
- if (ASTUtil.isToken(rule)) {
- }
- else {
- String[] bases = _context.getGrammarInfo().getAltReferencers(ASTUtil.getName(rule));
- if ((bases == null) || (bases.length == 0)) {
- }
- else if (bases.length == 1) {
- }
- else {
- for (int i = 0; i < bases.length; i++) {
- bases[i] = toUppercaseName(bases[i]);
- }
- baseInterfaceNames = bases;
- }
- }
-
- return baseInterfaceNames;
- }
-
-
- //
- // Helpers for constucting JavaElements
- //
-
- public IPackageFragment findOrCreatePackage(
- IJavaProject project,
- String packageName)
- throws Exception {
-
- IPackageFragmentRoot[] roots = project.getPackageFragmentRoots();
- IPackageFragmentRoot root = null;
- for (int i = 0; i < roots.length; i++) {
- if (roots[i].getKind() == IPackageFragmentRoot.K_SOURCE) {
- root = roots[i];
- break;
- }
- }
-
- if (root == null) {
- throw new Exception("Can't get source IPackageFragmentRoot!");
- }
-
- IPackageFragment frag = root.getPackageFragment(packageName);
- if (frag.exists()) {
- report("Found package: " + frag.getElementName(), 2);
- return frag;
- } else {
- frag = root.createPackageFragment(packageName, false, null);
- report("Creating package: " + frag.getElementName(), 2);
- return frag;
- }
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/GrammarInfo.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/GrammarInfo.java
deleted file mode 100644
index f7c29a7..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/GrammarInfo.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generator.core.generator;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Hashtable;
-
-import org.eclipse.gymnast.generator.core.ast.AltRule;
-import org.eclipse.gymnast.generator.core.ast.Alts;
-import org.eclipse.gymnast.generator.core.ast.GymnastASTNodeVisitor;
-import org.eclipse.gymnast.generator.core.ast.HeaderSection;
-import org.eclipse.gymnast.generator.core.ast.Option;
-import org.eclipse.gymnast.generator.core.ast.Rule;
-import org.eclipse.gymnast.generator.core.ast.SimpleExpr;
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;
-
-
-/**
- * @author cjdaly@us.ibm.com
- *
- */
-public class GrammarInfo extends GymnastASTNodeVisitor implements IGrammarInfo {
-
- private GeneratorContext _context;
- private GeneratorUtil _util;
-
- private String _languageName;
-
- private Hashtable _options = new Hashtable();
-
- private ArrayList _rules = new ArrayList();
- private Hashtable _ruleNameToRule = new Hashtable();
- private Hashtable _ruleToRuleRefCollector = new Hashtable();
-
- // key is rule name
- // value is ArrayList of altRule names that reference the rule in an alt
- private Hashtable _altReverseMap = new Hashtable();
-
- private String _entryRuleName = "compUnit";
- private String _entryRuleClassName = "CompUnit";
-
- private Rule _currentRule;
-
- public GrammarInfo(GeneratorContext context) {
- _context = context;
- _util = _context.getUtil();
-
- init();
- }
-
- private void init() {
- visit(_context.getCompUnit());
-
- for (int i = 0; i < _rules.size(); i++) {
- Rule rule = (Rule)_rules.get(i);
- initRuleParams(rule);
-
- if (ASTUtil.hasAttr(rule, "entry")) {
- _entryRuleName = getRuleName(rule);
- _entryRuleClassName = getTypeName(rule);
- }
- }
- }
-
- private void initRuleParams(Rule rule) {
- RuleRefCollector refs = getRuleRefCollector(rule);
- String[] altReferencers = getAltReferencers(ASTUtil.getName(rule));
-
- for (int i = 0; i < altReferencers.length; i++) {
- String altReferencerName = altReferencers[i];
- Rule altRule = getRule(altReferencerName);
- RuleRefCollector altRuleRefs = getRuleRefCollector(altRule);
- String[] labels = altRuleRefs.getLabels();
- for (int j = 0; j < labels.length; j++) {
- String label = labels[j];
- if (altRuleRefs.isAltSeq(label)) {
- refs.addInherited(label, altRuleRefs.getType(label));
- }
- }
- }
- }
-
- public String getLanguageName() {
- return _languageName;
- }
-
- public String getEntryRuleName() {
- return _entryRuleName;
- }
-
- public String getEntryRuleClassName() {
- return _entryRuleClassName;
- }
-
- public Rule[] getRules() {
- return (Rule[]) _rules.toArray(new Rule[_rules.size()]);
- }
-
- public Rule getRule(String name) {
- return (Rule)_ruleNameToRule.get(name);
- }
-
- public String getRuleName(Rule rule) {
- return ASTUtil.getName(rule);
- }
-
- public String getTypeName(Rule rule) {
- return _util.toUppercaseName(getRuleName(rule));
- }
-
- public String getOptionValue(String name) {
- if (!_options.containsKey(name)) return null;
-
- String value = (String)_options.get(name);
- value = Util.removeSurroundingQuotes(value);
- return value;
- }
-
- public RuleRefCollector getRuleRefCollector(Rule rule) {
- return (RuleRefCollector)_ruleToRuleRefCollector.get(rule);
- }
-
- public String[] getAltReferencers(String ruleName) {
- if (_altReverseMap.containsKey(ruleName)) {
- ArrayList altList = (ArrayList)_altReverseMap.get(ruleName);
- return (String[]) altList.toArray(new String[altList.size()]);
- }
- return new String[]{};
- }
-
- public String[] getLiterals() {
- final HashSet literals = new HashSet();
-
- new GymnastASTNodeVisitor() {
- public boolean beginVisit(SimpleExpr simpleExpr) {
- String value = simpleExpr.getValue().getText();
- if (value.startsWith("\"")) {
- literals.add(Util.removeSurroundingQuotes(value));
- }
- return false;
- }
- }.visit(_context.getCompUnit());
-
- return (String[]) literals.toArray(new String[literals.size()]);
- }
-
- public boolean beginVisit(HeaderSection headerSection) {
- _languageName = headerSection.getName().getText();
- _util.report("language: " + getLanguageName());
- return true;
- }
-
- public boolean beginVisit(Option option) {
- String name = option.getName().getText();
- String value = option.getValue().getText();
-
- _options.put(name, value);
-
- _util.report("option " + name + " = " + value);
- return false;
- }
-
- public boolean beginVisit(Rule rule) {
- String name = ASTUtil.getName(rule);
- if (_ruleNameToRule.containsKey(name)) {
- throw new RuntimeException("Rule " + name + "declared twice!");
- }
- _util.report("rule: " + name);
-
- _currentRule = rule;
- _rules.add(rule);
- _ruleNameToRule.put(name, rule);
-
- RuleRefCollector ruleRefs = new RuleRefCollector(rule, _context);
- _ruleToRuleRefCollector.put(rule, ruleRefs);
-
- return true;
- }
-
- public boolean beginVisit(Alts alts) {
- if (_currentRule instanceof AltRule) {
- for (int i = 0; i < alts.getChildCount(); i++) {
- ASTNode child = alts.getChild(i);
- if (child instanceof SimpleExpr) {
- SimpleExpr se = (SimpleExpr)child;
-
- String refRuleName = se.getValue().getText();
- ArrayList altList = null;
- if (!_altReverseMap.containsKey(refRuleName)) {
- altList = new ArrayList();
- _altReverseMap.put(refRuleName, altList);
- }
- else {
- altList = (ArrayList)_altReverseMap.get(refRuleName);
- }
- altList.add(ASTUtil.getName(_currentRule));
- }
- }
- }
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/IGrammarInfo.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/IGrammarInfo.java
deleted file mode 100644
index b1242b1..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/IGrammarInfo.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.eclipse.gymnast.generator.core.generator;
-
-import org.eclipse.gymnast.generator.core.ast.Rule;
-
-public interface IGrammarInfo {
- public String getLanguageName();
-
- public String getEntryRuleName();
-
- public String getEntryRuleClassName();
-
- public Rule[] getRules();
-
- public Rule getRule(String name);
-
- public String getRuleName(Rule rule) ;
-
- public String getTypeName(Rule rule) ;
-
- public String getOptionValue(String name);
-
- public RuleRefCollector getRuleRefCollector(Rule rule) ;
-
- public String[] getAltReferencers(String ruleName) ;
-
- public String[] getLiterals() ;
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/LiteralCollector.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/LiteralCollector.java
deleted file mode 100644
index a11f296..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/LiteralCollector.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generator.core.generator;
-
-import java.util.ArrayList;
-
-import org.eclipse.gymnast.generator.core.ast.GymnastASTNodeVisitor;
-import org.eclipse.gymnast.generator.core.ast.Rule;
-import org.eclipse.gymnast.generator.core.ast.SimpleExpr;
-
-
-/**
- * @author cjdaly@us.ibm.com
- *
- */
-public class LiteralCollector extends GymnastASTNodeVisitor {
-
- private ArrayList _literals = new ArrayList();
-
- public LiteralCollector(Rule rule, GeneratorContext context) {
- visit(rule);
- }
-
- public String[] getLiterals() {
- return (String[]) _literals.toArray(new String[_literals.size()]);
- }
-
- public boolean beginVisit(SimpleExpr simpleExpr) {
- String value = simpleExpr.getValue().getText();
- if (value.startsWith("\"")) {
- _literals.add(value);
- }
-
- return false;
- }
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/RuleRefCollector.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/RuleRefCollector.java
deleted file mode 100644
index 578dbfb..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/RuleRefCollector.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generator.core.generator;
-
-import java.util.ArrayList;
-import java.util.Hashtable;
-
-import org.eclipse.gymnast.generator.core.ast.AltSeq;
-import org.eclipse.gymnast.generator.core.ast.Alts;
-import org.eclipse.gymnast.generator.core.ast.GymnastASTNodeVisitor;
-import org.eclipse.gymnast.generator.core.ast.Rule;
-import org.eclipse.gymnast.generator.core.ast.SimpleExpr;
-
-
-
-/**
- * @author cjdaly@us.ibm.com
- *
- */
-public class RuleRefCollector extends GymnastASTNodeVisitor {
-
- private GeneratorContext _context;
- private Rule _rule;
-
- private ArrayList _labels;
- private Hashtable _labelToLabelData;
- private int _inheritedLabelCount = 0;
-
- private boolean _doingAltSeq = false;
-
- public RuleRefCollector(Rule rule, GeneratorContext context) {
- _context = context;
- _rule = rule;
-
- _labels = new ArrayList();
- _labelToLabelData = new Hashtable();
-
- visit(rule);
- }
-
- public int getCount() {
- return _labels.size();
- }
- public int getInheritedLabelCount() {
- return _inheritedLabelCount;
- }
-
- public String[] getLabels() {
- return (String[]) _labels.toArray(new String[_labels.size()]);
- }
-
- public boolean hasLabel(String label) {
- return _labelToLabelData.containsKey(label);
- }
-
- private LabelData getLabelData(String label) {
- return (LabelData)_labelToLabelData.get(label);
- }
- public String getType(String label) {
- return getLabelData(label).getType();
- }
- public boolean isAltSeq(String label) {
- return getLabelData(label).isAltSeq();
- }
- public boolean isInherited(String label) {
- return getLabelData(label).isInherited();
- }
-
-
- public boolean beginVisit(Alts alts) {
- // don't worry about labels for elements of Alts!
- return false;
- }
-
- public boolean beginVisit(AltSeq altSeq) {
- _doingAltSeq = true;
- return true;
- }
- public void endVisit(AltSeq altSeq) {
- _doingAltSeq = false;
- }
-
- public boolean beginVisit(SimpleExpr simpleExpr) {
-
- if (!ASTUtil.hasAttr(simpleExpr, "ignore")) {
- String type = simpleExpr.getValue().getText();
- String name = _context.getUtil().getLabel(simpleExpr);
- add(name, type);
- }
-
- return false;
- }
-
- private void add(String label, String type) {
- if (_labelToLabelData.containsKey(label)) {
- if (_context != null) {
- _context.getUtil().reportWarning("Label: " + label + " used more than once in rule: " + ASTUtil.getName(_rule));
- }
- return;
- }
-
- _labels.add(label);
- _labelToLabelData.put(label, new LabelData(type, _doingAltSeq, false));
- }
-
- void addInherited(String label, String type) {
- if (_labelToLabelData.containsKey(label)) {
- if (!getType(label).equals(type)) {
- String msg = "Label: " + label + " needed for more than one type in params for: " + ASTUtil.getName(_rule);
- throw new RuntimeException(msg);
- }
- }
- else {
- _labels.add(_inheritedLabelCount, label);
- _labelToLabelData.put(label, new LabelData(type, false, true));
- _inheritedLabelCount++;
- }
- }
-
- private class LabelData {
- String _type;
- boolean _isAltSeq;
- boolean _isInherited;
-
- LabelData(String type, boolean isAltSeq, boolean isInherited) {
- _type = type;
- _isAltSeq = isAltSeq;
- _isInherited = isInherited;
- }
-
- String getType() {
- return _type;
- }
-
- boolean isAltSeq() {
- return _isAltSeq;
- }
-
- boolean isInherited() {
- return _isInherited;
- }
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/Util.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/Util.java
deleted file mode 100644
index 0c72452..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/generator/Util.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generator.core.generator;
-
-/**
- * @author cjdaly@us.ibm.com
- *
- */
-public class Util {
-
- //
- // Helpers for string manipulation scenarios
- //
-
- public static String removeSurroundingQuotes(String text) {
- return text.replaceAll("\"", "");
- }
-
- /**
- * Uppercase the first letter of the name to make a good Java class
- * name (so "myName" -> "MyName")
- * @param name name to be uppercased
- * @return name with first character uppercased
- */
- public static String toUppercaseName(String name) {
- String val;
- char firstChar = Character.toUpperCase(name.charAt(0));
- if (name.length() > 1) {
- val = firstChar + name.substring(1);
- }
- else {
- val = Character.toString(firstChar);
- }
- return val;
- }
-
- /**
- * Lowercase the first letter of the name to make a good Antlr rule
- * name (so "MyName" -> "myName")
- * @param name name to be lowercased
- * @return name with first character lowercased
- */
- public static String toLowercaseName(String name) {
- String val;
- char firstChar = Character.toLowerCase(name.charAt(0));
- if (name.length() > 1) {
- val = firstChar + name.substring(1);
- }
- else {
- val = Character.toString(firstChar);
- }
- return val;
- }
-
- /**
- * Find all of the uppercase letters in the name and return a new
- * String with just those letters lowercased (so "MyName" -> "mn")
- * If there are no uppercase letters in the input String then return
- * the input String.
- * @param name name to be abbreviated
- * @return abbreviated name
- */
- public static String toAbbreviatedName(String name) {
- StringBuffer sb = new StringBuffer();
- for (int i = 0; i < name.length(); i++) {
- char c = name.charAt(i);
- if (Character.isUpperCase(c)) {
- sb.append(Character.toLowerCase(c));
- }
- }
- if (sb.length() == 0) return name;
- else return sb.toString();
-
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/Gymnast.g b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/Gymnast.g
deleted file mode 100644
index be54536..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/Gymnast.g
+++ /dev/null
@@ -1,326 +0,0 @@
-
-header
-{
-package org.eclipse.gymnast.generator.core.parser;
-import org.eclipse.gymnast.generator.core.ast.*;
-import org.eclipse.gymnast.runtime.core.parser.*;
-}
-
-class GymnastParser extends Parser;
-
-options {
- k=2;
-}
-{
- private ParseContext _parseContext;
- public void setParseContext(ParseContext parseContext) {
- _parseContext = parseContext;
- }
-
- public void reportError(RecognitionException ex) {
- if (_parseContext != null) {
- _parseContext.addParseMessage(new ParseError(ex));
- }
- }
-
- public void reportError(String s) {
- if (_parseContext != null) {
- _parseContext.addParseMessage(new ParseError(s, -1));
- }
- }
-
- public void reportWarning(String s) {
- if (_parseContext != null) {
- _parseContext.addParseMessage(new ParseWarning(s, -1));
- }
- }
-}
-
-compUnit returns [ CompUnit retVal = null ]
-:
-{ HeaderSection headerSection = null; Grammar grammar = null; }
- headerSection=headerSection grammar=grammar EOF
-{ retVal = new CompUnit(headerSection, grammar); }
-;
-
-headerSection returns [ HeaderSection retVal = null ]
-:
-{ Id name = null; OptionsSection optionsSection = null; }
- language_KW:"language" name=id semi:SEMI ( optionsSection=optionsSection )?
-{ retVal = new HeaderSection(language_KW, name, semi, optionsSection); }
-;
-
-optionsSection returns [ OptionsSection retVal = null ]
-:
-{ OptionList optionList = null; }
- options_KW:"options" lcurly:LCURLY optionList=optionList rcurly:RCURLY
-{ retVal = new OptionsSection(options_KW, lcurly, optionList, rcurly); }
-;
-
-optionList returns [ OptionList retVal = new OptionList() ]
-:
-{ Option option = null; }
- ( option=option { retVal.addChild(option); } )*
-;
-
-option returns [ Option retVal = null ]
-:
-{ Id name = null; OptionValue value = null; }
- name=id equals:EQUALS value=optionValue semi:SEMI
-{ retVal = new Option(name, equals, value, semi); }
-;
-
-optionValue returns [ OptionValue retVal = null ]
-{ Token tok = LT(1); }
-: ( ID
- | STRING_LITERAL
- | INT_LITERAL
- )
-{ retVal = new OptionValue(tok); }
-;
-
-grammar returns [ Grammar retVal = new Grammar() ]
-:
-{ Rule rule = null; }
- ( rule=rule { retVal.addChild(rule); } )*
-;
-
-rule returns [ Rule retVal = null ]
-:
- ( retVal=altRule
- | retVal=listRule
- | retVal=seqRule
- | retVal=tokenRule
- )
-;
-
-altRule returns [ AltRule retVal = null ]
-:
-{ AltRuleDecl decl = null; AltRuleBody body = null; }
- decl=altRuleDecl body=altRuleBody semi:SEMI
-{ retVal = new AltRule(decl, body, semi); }
-;
-
-altRuleDecl returns [ AltRuleDecl retVal = null ]
-:
-{ AltRuleKind kind = null; Id name = null; Attrs attrs = null; }
- kind=altRuleKind name=id ( attrs=attrs )? colon:COLON
-{ retVal = new AltRuleDecl(kind, name, attrs, colon); }
-;
-
-altRuleKind returns [ AltRuleKind retVal = null ]
-{ Token tok = LT(1); }
-: ( "abstract"
- | "container"
- | "interface"
- )
-{ retVal = new AltRuleKind(tok); }
-;
-
-altRuleBody returns [ AltRuleBody retVal = null ]
-:
-{ AltSeq preSeq = null; Alts alts = null; AltSeq postSeq = null; }
- ( preSeq=altSeq )? alts=alts ( postSeq=altSeq )?
-{ retVal = new AltRuleBody(preSeq, alts, postSeq); }
-;
-
-alts returns [ Alts retVal = new Alts() ]
-:
-{ SimpleExpr se1 = null; SimpleExpr sen = null; }
- se1=simpleExpr { retVal.addChild(se1); }
- ( pipe:PIPE sen=simpleExpr { retVal.addChild(pipe); retVal.addChild(sen); } )*
-;
-
-altSeq returns [ AltSeq retVal = null ]
-:
-{ Seq seq = null; }
- lparen:LPAREN seq=seq rparen:RPAREN
-{ retVal = new AltSeq(lparen, seq, rparen); }
-;
-
-listRule returns [ ListRule retVal = null ]
-:
-{ ListRuleDecl decl = null; ListRuleBody body = null; }
- decl=listRuleDecl body=listRuleBody semi:SEMI
-{ retVal = new ListRule(decl, body, semi); }
-;
-
-listRuleDecl returns [ ListRuleDecl retVal = null ]
-:
-{ Id name = null; Attrs attrs = null; }
- list_KW:"list" name=id ( attrs=attrs )? colon:COLON
-{ retVal = new ListRuleDecl(list_KW, name, attrs, colon); }
-;
-
-listRuleBody returns [ ListRuleBody retVal = null ]
-:
-{ SimpleExpr listExpr = null; SimpleExpr separator = null; SimpleExpr listExpr2 = null; ListMark listMark = null; }
- listExpr=simpleExpr ( lparen:LPAREN separator=simpleExpr listExpr2=simpleExpr rparen:RPAREN )? listMark=listMark
-{ retVal = new ListRuleBody(listExpr, lparen, separator, listExpr2, rparen, listMark); }
-;
-
-listMark returns [ ListMark retVal = null ]
-{ Token tok = LT(1); }
-: ( STAR
- | PLUS
- )
-{ retVal = new ListMark(tok); }
-;
-
-seqRule returns [ SeqRule retVal = null ]
-:
-{ SeqRuleDecl decl = null; Seq body = null; }
- decl=seqRuleDecl body=seq semi:SEMI
-{ retVal = new SeqRule(decl, body, semi); }
-;
-
-seqRuleDecl returns [ SeqRuleDecl retVal = null ]
-:
-{ Id name = null; Attrs attrs = null; }
- sequence_KW:"sequence" name=id ( attrs=attrs )? colon:COLON
-{ retVal = new SeqRuleDecl(sequence_KW, name, attrs, colon); }
-;
-
-seq returns [ Seq retVal = new Seq() ]
-:
-{ Expr expr = null; }
- ( expr=expr { retVal.addChild(expr); } )+
-;
-
-tokenRule returns [ TokenRule retVal = null ]
-:
-{ TokenRuleDecl decl = null; Alts body = null; }
- decl=tokenRuleDecl body=alts semi:SEMI
-{ retVal = new TokenRule(decl, body, semi); }
-;
-
-tokenRuleDecl returns [ TokenRuleDecl retVal = null ]
-:
-{ Id name = null; Attrs attrs = null; }
- token_KW:"token" name=id ( attrs=attrs )? colon:COLON
-{ retVal = new TokenRuleDecl(token_KW, name, attrs, colon); }
-;
-
-expr returns [ Expr retVal = null ]
-:
- ( retVal=optSubSeq
- | retVal=simpleExpr
- )
-;
-
-optSubSeq returns [ OptSubSeq retVal = null ]
-:
-{ Seq seq = null; }
- lparen:LPAREN seq=seq rparen:RPAREN qmark:QMARK
-{ retVal = new OptSubSeq(lparen, seq, rparen, qmark); }
-;
-
-simpleExpr returns [ SimpleExpr retVal = null ]
-:
-{ Id name = null; Atom value = null; Attrs attrs = null; }
- ( name=id equals:EQUALS )? value=atom ( attrs=attrs )?
-{ retVal = new SimpleExpr(name, equals, value, attrs); }
-;
-
-attrs returns [ Attrs retVal = null ]
-:
-{ AttrList attrList = null; }
- lsquare:LSQUARE attrList=attrList rsquare:RSQUARE
-{ retVal = new Attrs(lsquare, attrList, rsquare); }
-;
-
-attrList returns [ AttrList retVal = new AttrList() ]
-:
- id1:ID { retVal.addChild(id1); }
- ( comma:COMMA idn:ID { retVal.addChild(comma); retVal.addChild(idn); } )*
-;
-
-atom returns [ Atom retVal = null ]
-{ Token tok = LT(1); }
-: ( ID
- | STRING_LITERAL
- | "abstract"
- | "container"
- | "interface"
- | "language"
- | "list"
- | "options"
- | "sequence"
- | "token"
- )
-{ retVal = new Atom(tok); }
-;
-
-id returns [ Id retVal = null ]
-{ Token tok = LT(1); }
-: ( ID
- | "abstract"
- | "container"
- | "interface"
- | "language"
- | "list"
- | "options"
- | "sequence"
- | "token"
- )
-{ retVal = new Id(tok); }
-;
-
-
-
-class GymnastLexer extends Lexer;
-
-options
-{
- testLiterals=false;
- k=3;
- charVocabulary='\003'..'\377';
-}
-
-
-LCURLY : '{';
-RCURLY : '}';
-LSQUARE : '[';
-RSQUARE : ']';
-LPAREN : '(';
-RPAREN : ')';
-
-DOT : '.';
-COMMA : ',';
-COLON : ':';
-SEMI : ';';
-PIPE : '|';
-
-STAR : '*';
-PLUS : '+';
-EQUALS : '=';
-QMARK : '?';
-BANG : '!';
-
-STRING_LITERAL : '"' (ESC | ~'"')* '"' ;
-
-// TODO: The (DIGIT DIGIT DIGIT) is cheesy it should be something like
-// ( options { warnWhenFollowAmbig = false; } : (DIGIT)+ )
-// but I don't want to deal with parsing that yet.
-protected ESC :
-'\\' ('t' | 'f' | 'r' | 'n' | '"' | '\'' | '\\' | (DIGIT DIGIT DIGIT) )
-;
-
-ID options { testLiterals=true; }
-: ('a'..'z' | 'A'..'Z' | '_') ('a'..'z' | 'A'..'Z' | '_' | DIGIT)* ;
-
-INT_LITERAL : (DIGIT)+ ;
-
-protected DIGIT : '0'..'9';
-
-WS : (' ' | '\t' | '\f' | '\r' | '\n')+
-{ $setType(Token.SKIP); }
-;
-
-SINGLE_LINE_COMMENT : "//" (~('\n'|'\r'))* ('\n'|'\r')?
-{ $setType(Token.SKIP); }
-;
-
-MULTI_LINE_COMMENT : "/*" ("*/" | (~'!' (~'*' | '*' ~'/')* "*/"))
-{ $setType(Token.SKIP); }
-;
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/GymnastLexer.g b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/GymnastLexer.g
deleted file mode 100644
index b6ad6ef..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/GymnastLexer.g
+++ /dev/null
@@ -1,57 +0,0 @@
-
-class GymnastLexer extends Lexer;
-
-options
-{
- testLiterals=false;
- k=3;
- charVocabulary='\003'..'\377';
-}
-
-
-LCURLY : '{';
-RCURLY : '}';
-LSQUARE : '[';
-RSQUARE : ']';
-LPAREN : '(';
-RPAREN : ')';
-
-DOT : '.';
-COMMA : ',';
-COLON : ':';
-SEMI : ';';
-PIPE : '|';
-
-STAR : '*';
-PLUS : '+';
-EQUALS : '=';
-QMARK : '?';
-BANG : '!';
-
-STRING_LITERAL : '"' (ESC | ~'"')* '"' ;
-
-// TODO: The (DIGIT DIGIT DIGIT) is cheesy it should be something like
-// ( options { warnWhenFollowAmbig = false; } : (DIGIT)+ )
-// but I don't want to deal with parsing that yet.
-protected ESC :
-'\\' ('t' | 'f' | 'r' | 'n' | '"' | '\'' | '\\' | (DIGIT DIGIT DIGIT) )
-;
-
-ID options { testLiterals=true; }
-: ('a'..'z' | 'A'..'Z' | '_') ('a'..'z' | 'A'..'Z' | '_' | DIGIT)* ;
-
-INT_LITERAL : (DIGIT)+ ;
-
-protected DIGIT : '0'..'9';
-
-WS : (' ' | '\t' | '\f' | '\r' | '\n')+
-{ $setType(Token.SKIP); }
-;
-
-SINGLE_LINE_COMMENT : "//" (~('\n'|'\r'))* ('\n'|'\r')?
-{ $setType(Token.SKIP); }
-;
-
-MULTI_LINE_COMMENT : "/*" ("*/" | (~'!' (~'*' | '*' ~'/')* "*/"))
-{ $setType(Token.SKIP); }
-;
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/GymnastLexer.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/GymnastLexer.java
deleted file mode 100644
index 0316a09..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/GymnastLexer.java
+++ /dev/null
@@ -1,855 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-// $ANTLR : "Gymnast.g" -> "GymnastLexer.java"$
-
-package org.eclipse.gymnast.generator.core.parser;
-import java.io.InputStream;
-import java.io.Reader;
-import java.util.Hashtable;
-
-import antlr.ANTLRHashString;
-import antlr.ByteBuffer;
-import antlr.CharBuffer;
-import antlr.CharStreamException;
-import antlr.CharStreamIOException;
-import antlr.InputBuffer;
-import antlr.LexerSharedInputState;
-import antlr.NoViableAltForCharException;
-import antlr.RecognitionException;
-import antlr.Token;
-import antlr.TokenStream;
-import antlr.TokenStreamException;
-import antlr.TokenStreamIOException;
-import antlr.TokenStreamRecognitionException;
-import antlr.collections.impl.BitSet;
-
-public class GymnastLexer extends antlr.CharScanner implements GymnastParserTokenTypes, TokenStream
- {
-public GymnastLexer(InputStream in) {
- this(new ByteBuffer(in));
-}
-public GymnastLexer(Reader in) {
- this(new CharBuffer(in));
-}
-public GymnastLexer(InputBuffer ib) {
- this(new LexerSharedInputState(ib));
-}
-public GymnastLexer(LexerSharedInputState state) {
- super(state);
- caseSensitiveLiterals = true;
- setCaseSensitive(true);
- literals = new Hashtable();
- literals.put(new ANTLRHashString("container", this), new Integer(15));
- literals.put(new ANTLRHashString("token", this), new Integer(24));
- literals.put(new ANTLRHashString("abstract", this), new Integer(14));
- literals.put(new ANTLRHashString("sequence", this), new Integer(23));
- literals.put(new ANTLRHashString("language", this), new Integer(4));
- literals.put(new ANTLRHashString("interface", this), new Integer(16));
- literals.put(new ANTLRHashString("options", this), new Integer(6));
- literals.put(new ANTLRHashString("list", this), new Integer(20));
-}
-
-public Token nextToken() throws TokenStreamException {
- Token theRetToken=null;
-tryAgain:
- for (;;) {
- Token _token = null;
- int _ttype = Token.INVALID_TYPE;
- resetText();
- try { // for char stream error handling
- try { // for lexical error handling
- switch ( LA(1)) {
- case '{':
- {
- mLCURLY(true);
- theRetToken=_returnToken;
- break;
- }
- case '}':
- {
- mRCURLY(true);
- theRetToken=_returnToken;
- break;
- }
- case '[':
- {
- mLSQUARE(true);
- theRetToken=_returnToken;
- break;
- }
- case ']':
- {
- mRSQUARE(true);
- theRetToken=_returnToken;
- break;
- }
- case '(':
- {
- mLPAREN(true);
- theRetToken=_returnToken;
- break;
- }
- case ')':
- {
- mRPAREN(true);
- theRetToken=_returnToken;
- break;
- }
- case '.':
- {
- mDOT(true);
- theRetToken=_returnToken;
- break;
- }
- case ',':
- {
- mCOMMA(true);
- theRetToken=_returnToken;
- break;
- }
- case ':':
- {
- mCOLON(true);
- theRetToken=_returnToken;
- break;
- }
- case ';':
- {
- mSEMI(true);
- theRetToken=_returnToken;
- break;
- }
- case '|':
- {
- mPIPE(true);
- theRetToken=_returnToken;
- break;
- }
- case '*':
- {
- mSTAR(true);
- theRetToken=_returnToken;
- break;
- }
- case '+':
- {
- mPLUS(true);
- theRetToken=_returnToken;
- break;
- }
- case '=':
- {
- mEQUALS(true);
- theRetToken=_returnToken;
- break;
- }
- case '?':
- {
- mQMARK(true);
- theRetToken=_returnToken;
- break;
- }
- case '!':
- {
- mBANG(true);
- theRetToken=_returnToken;
- break;
- }
- case '"':
- {
- mSTRING_LITERAL(true);
- theRetToken=_returnToken;
- break;
- }
- case 'A': case 'B': case 'C': case 'D':
- case 'E': case 'F': case 'G': case 'H':
- case 'I': case 'J': case 'K': case 'L':
- case 'M': case 'N': case 'O': case 'P':
- case 'Q': case 'R': case 'S': case 'T':
- case 'U': case 'V': case 'W': case 'X':
- case 'Y': case 'Z': case '_': case 'a':
- case 'b': case 'c': case 'd': case 'e':
- case 'f': case 'g': case 'h': case 'i':
- case 'j': case 'k': case 'l': case 'm':
- case 'n': case 'o': case 'p': case 'q':
- case 'r': case 's': case 't': case 'u':
- case 'v': case 'w': case 'x': case 'y':
- case 'z':
- {
- mID(true);
- theRetToken=_returnToken;
- break;
- }
- case '0': case '1': case '2': case '3':
- case '4': case '5': case '6': case '7':
- case '8': case '9':
- {
- mINT_LITERAL(true);
- theRetToken=_returnToken;
- break;
- }
- case '\t': case '\n': case '\u000c': case '\r':
- case ' ':
- {
- mWS(true);
- theRetToken=_returnToken;
- break;
- }
- default:
- if ((LA(1)=='/') && (LA(2)=='/')) {
- mSINGLE_LINE_COMMENT(true);
- theRetToken=_returnToken;
- }
- else if ((LA(1)=='/') && (LA(2)=='*')) {
- mMULTI_LINE_COMMENT(true);
- theRetToken=_returnToken;
- }
- else {
- if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);}
- else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
- }
- }
- if ( _returnToken==null ) continue tryAgain; // found SKIP token
- _ttype = _returnToken.getType();
- _returnToken.setType(_ttype);
- return _returnToken;
- }
- catch (RecognitionException e) {
- throw new TokenStreamRecognitionException(e);
- }
- }
- catch (CharStreamException cse) {
- if ( cse instanceof CharStreamIOException ) {
- throw new TokenStreamIOException(((CharStreamIOException)cse).io);
- }
- else {
- throw new TokenStreamException(cse.getMessage());
- }
- }
- }
-}
-
- public final void mLCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = LCURLY;
- int _saveIndex;
-
- match('{');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mRCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = RCURLY;
- int _saveIndex;
-
- match('}');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mLSQUARE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = LSQUARE;
- int _saveIndex;
-
- match('[');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mRSQUARE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = RSQUARE;
- int _saveIndex;
-
- match(']');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mLPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = LPAREN;
- int _saveIndex;
-
- match('(');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mRPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = RPAREN;
- int _saveIndex;
-
- match(')');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mDOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = DOT;
- int _saveIndex;
-
- match('.');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mCOMMA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = COMMA;
- int _saveIndex;
-
- match(',');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mCOLON(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = COLON;
- int _saveIndex;
-
- match(':');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mSEMI(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = SEMI;
- int _saveIndex;
-
- match(';');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mPIPE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = PIPE;
- int _saveIndex;
-
- match('|');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mSTAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = STAR;
- int _saveIndex;
-
- match('*');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mPLUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = PLUS;
- int _saveIndex;
-
- match('+');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mEQUALS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = EQUALS;
- int _saveIndex;
-
- match('=');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mQMARK(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = QMARK;
- int _saveIndex;
-
- match('?');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mBANG(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = BANG;
- int _saveIndex;
-
- match('!');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mSTRING_LITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = STRING_LITERAL;
- int _saveIndex;
-
- match('"');
- {
- _loop76:
- do {
- if ((LA(1)=='\\')) {
- mESC(false);
- }
- else if ((_tokenSet_0.member(LA(1)))) {
- matchNot('"');
- }
- else {
- break _loop76;
- }
-
- } while (true);
- }
- match('"');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- protected final void mESC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = ESC;
- int _saveIndex;
-
- match('\\');
- {
- switch ( LA(1)) {
- case 't':
- {
- match('t');
- break;
- }
- case 'f':
- {
- match('f');
- break;
- }
- case 'r':
- {
- match('r');
- break;
- }
- case 'n':
- {
- match('n');
- break;
- }
- case '"':
- {
- match('"');
- break;
- }
- case '\'':
- {
- match('\'');
- break;
- }
- case '\\':
- {
- match('\\');
- break;
- }
- case '0': case '1': case '2': case '3':
- case '4': case '5': case '6': case '7':
- case '8': case '9':
- {
- {
- mDIGIT(false);
- mDIGIT(false);
- mDIGIT(false);
- }
- break;
- }
- default:
- {
- throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
- }
- }
- }
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- protected final void mDIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = DIGIT;
- int _saveIndex;
-
- matchRange('0','9');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mID(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = ID;
- int _saveIndex;
-
- {
- switch ( LA(1)) {
- case 'a': case 'b': case 'c': case 'd':
- case 'e': case 'f': case 'g': case 'h':
- case 'i': case 'j': case 'k': case 'l':
- case 'm': case 'n': case 'o': case 'p':
- case 'q': case 'r': case 's': case 't':
- case 'u': case 'v': case 'w': case 'x':
- case 'y': case 'z':
- {
- matchRange('a','z');
- break;
- }
- case 'A': case 'B': case 'C': case 'D':
- case 'E': case 'F': case 'G': case 'H':
- case 'I': case 'J': case 'K': case 'L':
- case 'M': case 'N': case 'O': case 'P':
- case 'Q': case 'R': case 'S': case 'T':
- case 'U': case 'V': case 'W': case 'X':
- case 'Y': case 'Z':
- {
- matchRange('A','Z');
- break;
- }
- case '_':
- {
- match('_');
- break;
- }
- default:
- {
- throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
- }
- }
- }
- {
- _loop83:
- do {
- switch ( LA(1)) {
- case 'a': case 'b': case 'c': case 'd':
- case 'e': case 'f': case 'g': case 'h':
- case 'i': case 'j': case 'k': case 'l':
- case 'm': case 'n': case 'o': case 'p':
- case 'q': case 'r': case 's': case 't':
- case 'u': case 'v': case 'w': case 'x':
- case 'y': case 'z':
- {
- matchRange('a','z');
- break;
- }
- case 'A': case 'B': case 'C': case 'D':
- case 'E': case 'F': case 'G': case 'H':
- case 'I': case 'J': case 'K': case 'L':
- case 'M': case 'N': case 'O': case 'P':
- case 'Q': case 'R': case 'S': case 'T':
- case 'U': case 'V': case 'W': case 'X':
- case 'Y': case 'Z':
- {
- matchRange('A','Z');
- break;
- }
- case '_':
- {
- match('_');
- break;
- }
- case '0': case '1': case '2': case '3':
- case '4': case '5': case '6': case '7':
- case '8': case '9':
- {
- mDIGIT(false);
- break;
- }
- default:
- {
- break _loop83;
- }
- }
- } while (true);
- }
- _ttype = testLiteralsTable(_ttype);
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mINT_LITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = INT_LITERAL;
- int _saveIndex;
-
- {
- int _cnt86=0;
- _loop86:
- do {
- if (((LA(1) >= '0' && LA(1) <= '9'))) {
- mDIGIT(false);
- }
- else {
- if ( _cnt86>=1 ) { break _loop86; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
- }
-
- _cnt86++;
- } while (true);
- }
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mWS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = WS;
- int _saveIndex;
-
- {
- int _cnt90=0;
- _loop90:
- do {
- switch ( LA(1)) {
- case ' ':
- {
- match(' ');
- break;
- }
- case '\t':
- {
- match('\t');
- break;
- }
- case '\u000c':
- {
- match('\f');
- break;
- }
- case '\r':
- {
- match('\r');
- break;
- }
- case '\n':
- {
- match('\n');
- break;
- }
- default:
- {
- if ( _cnt90>=1 ) { break _loop90; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
- }
- }
- _cnt90++;
- } while (true);
- }
- _ttype = Token.SKIP;
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mSINGLE_LINE_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = SINGLE_LINE_COMMENT;
- int _saveIndex;
-
- match("//");
- {
- _loop94:
- do {
- if ((_tokenSet_1.member(LA(1)))) {
- {
- match(_tokenSet_1);
- }
- }
- else {
- break _loop94;
- }
-
- } while (true);
- }
- {
- switch ( LA(1)) {
- case '\n':
- {
- match('\n');
- break;
- }
- case '\r':
- {
- match('\r');
- break;
- }
- default:
- {
- }
- }
- }
- _ttype = Token.SKIP;
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mMULTI_LINE_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = MULTI_LINE_COMMENT;
- int _saveIndex;
-
- match("/*");
- {
- if ((_tokenSet_2.member(LA(1))) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
- {
- matchNot('!');
- {
- _loop100:
- do {
- if ((LA(1)=='*') && (_tokenSet_3.member(LA(2)))) {
- match('*');
- matchNot('/');
- }
- else if ((_tokenSet_4.member(LA(1)))) {
- matchNot('*');
- }
- else {
- break _loop100;
- }
-
- } while (true);
- }
- match("*/");
- }
- }
- else if ((LA(1)=='*') && (LA(2)=='/') && (true)) {
- match("*/");
- }
- else {
- throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
- }
-
- }
- _ttype = Token.SKIP;
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
-
- private static final long[] mk_tokenSet_0() {
- long[] data = new long[8];
- data[0]=-17179869192L;
- data[1]=-268435457L;
- for (int i = 2; i<=3; i++) { data[i]=-1L; }
- return data;
- }
- public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
- private static final long[] mk_tokenSet_1() {
- long[] data = new long[8];
- data[0]=-9224L;
- for (int i = 1; i<=3; i++) { data[i]=-1L; }
- return data;
- }
- public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
- private static final long[] mk_tokenSet_2() {
- long[] data = new long[8];
- data[0]=-8589934600L;
- for (int i = 1; i<=3; i++) { data[i]=-1L; }
- return data;
- }
- public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
- private static final long[] mk_tokenSet_3() {
- long[] data = new long[8];
- data[0]=-140737488355336L;
- for (int i = 1; i<=3; i++) { data[i]=-1L; }
- return data;
- }
- public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
- private static final long[] mk_tokenSet_4() {
- long[] data = new long[8];
- data[0]=-4398046511112L;
- for (int i = 1; i<=3; i++) { data[i]=-1L; }
- return data;
- }
- public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
-
- }
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/GymnastLexer.jj b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/GymnastLexer.jj
deleted file mode 100644
index e89387b..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/GymnastLexer.jj
+++ /dev/null
@@ -1,47 +0,0 @@
-
-TOKEN : { <STRING_LITERAL : "\"" (<ESC> | ~["\""])* "\"" > }
-TOKEN : {
- <#ESC: "\\" ["t","f","r","n","\"","'","\\"] >
-}
-
-TOKEN : {
- <ID : ("~")? (["a"-"z","A"-"Z","_"]) (["a"-"z","A"-"Z","_"] | <DIGIT>)* >
-}
-
-TOKEN : { <INT_LITERAL: (<DIGIT>)+ > }
-TOKEN : { <#DIGIT: ["0"-"9"] > }
-
-TOKEN :
-{ <LCURLY : "{">
-| <RCURLY : "}">
-| <LSQUARE : "[">
-| <RSQUARE : "]">
-| <LPAREN : "(">
-| <RPAREN : ")">
-
-| <DOT : ".">
-| <COMMA : ",">
-| <COLON : ":">
-| <SEMI : ";">
-| <PIPE : "|">
-
-| <STAR : "*">
-| <PLUS : "+">
-| <EQUALS : "=">
-| <QMARK : "?">
-| <BANG : "!">
-}
-
-SKIP :
-{
- " "
-| "\t"
-| "\f"
-| "\r"
-| "\n"
-}
-
-SKIP :
-{ <SINGLE_LINE_COMMENT: "//" (~["\r","\n"])* ["\r","\n"] >
-| <MULTI_LINE_COMMENT: "/*" ("*/" | (~["!"] (~["*"] | ("*" ~["/"]))* "*/")) >
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/GymnastParser.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/GymnastParser.java
deleted file mode 100644
index 71c609b..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/GymnastParser.java
+++ /dev/null
@@ -1,1328 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-// $ANTLR : "Gymnast.g" -> "GymnastParser.java"$
-
-package org.eclipse.gymnast.generator.core.parser;
-import org.eclipse.gymnast.generator.core.ast.AltRule;
-import org.eclipse.gymnast.generator.core.ast.AltRuleBody;
-import org.eclipse.gymnast.generator.core.ast.AltRuleDecl;
-import org.eclipse.gymnast.generator.core.ast.AltRuleKind;
-import org.eclipse.gymnast.generator.core.ast.AltSeq;
-import org.eclipse.gymnast.generator.core.ast.Alts;
-import org.eclipse.gymnast.generator.core.ast.Atom;
-import org.eclipse.gymnast.generator.core.ast.AttrList;
-import org.eclipse.gymnast.generator.core.ast.Attrs;
-import org.eclipse.gymnast.generator.core.ast.CompUnit;
-import org.eclipse.gymnast.generator.core.ast.Expr;
-import org.eclipse.gymnast.generator.core.ast.Grammar;
-import org.eclipse.gymnast.generator.core.ast.HeaderSection;
-import org.eclipse.gymnast.generator.core.ast.Id;
-import org.eclipse.gymnast.generator.core.ast.ListMark;
-import org.eclipse.gymnast.generator.core.ast.ListRule;
-import org.eclipse.gymnast.generator.core.ast.ListRuleBody;
-import org.eclipse.gymnast.generator.core.ast.ListRuleDecl;
-import org.eclipse.gymnast.generator.core.ast.OptSubSeq;
-import org.eclipse.gymnast.generator.core.ast.Option;
-import org.eclipse.gymnast.generator.core.ast.OptionList;
-import org.eclipse.gymnast.generator.core.ast.OptionValue;
-import org.eclipse.gymnast.generator.core.ast.OptionsSection;
-import org.eclipse.gymnast.generator.core.ast.Rule;
-import org.eclipse.gymnast.generator.core.ast.Seq;
-import org.eclipse.gymnast.generator.core.ast.SeqRule;
-import org.eclipse.gymnast.generator.core.ast.SeqRuleDecl;
-import org.eclipse.gymnast.generator.core.ast.SimpleExpr;
-import org.eclipse.gymnast.generator.core.ast.TokenRule;
-import org.eclipse.gymnast.generator.core.ast.TokenRuleDecl;
-import org.eclipse.gymnast.runtime.core.parser.ParseContext;
-import org.eclipse.gymnast.runtime.core.parser.ParseError;
-import org.eclipse.gymnast.runtime.core.parser.ParseWarning;
-
-import antlr.NoViableAltException;
-import antlr.ParserSharedInputState;
-import antlr.RecognitionException;
-import antlr.Token;
-import antlr.TokenBuffer;
-import antlr.TokenStream;
-import antlr.TokenStreamException;
-import antlr.collections.impl.BitSet;
-
-
-public class GymnastParser extends antlr.LLkParser implements GymnastParserTokenTypes
- {
-
- private ParseContext _parseContext;
- public void setParseContext(ParseContext parseContext) {
- _parseContext = parseContext;
- }
-
- public void reportError(RecognitionException ex) {
- if (_parseContext != null) {
- _parseContext.addParseMessage(ParserDriver.createParseError(ex));
- }
- }
-
- public void reportError(String s) {
- if (_parseContext != null) {
- _parseContext.addParseMessage(new ParseError(s, -1));
- }
- }
-
- public void reportWarning(String s) {
- if (_parseContext != null) {
- _parseContext.addParseMessage(new ParseWarning(s, -1));
- }
- }
-
-protected GymnastParser(TokenBuffer tokenBuf, int k) {
- super(tokenBuf,k);
- tokenNames = _tokenNames;
-}
-
-public GymnastParser(TokenBuffer tokenBuf) {
- this(tokenBuf,2);
-}
-
-protected GymnastParser(TokenStream lexer, int k) {
- super(lexer,k);
- tokenNames = _tokenNames;
-}
-
-public GymnastParser(TokenStream lexer) {
- this(lexer,2);
-}
-
-public GymnastParser(ParserSharedInputState state) {
- super(state,2);
- tokenNames = _tokenNames;
-}
-
- public final CompUnit compUnit() throws RecognitionException, TokenStreamException {
- CompUnit retVal = null ;
-
-
- try { // for error handling
- HeaderSection headerSection = null; Grammar grammar = null;
- headerSection=headerSection();
- grammar=grammar();
- match(Token.EOF_TYPE);
- retVal = new CompUnit(headerSection, grammar);
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_0);
- }
- return retVal;
- }
-
- public final HeaderSection headerSection() throws RecognitionException, TokenStreamException {
- HeaderSection retVal = null ;
-
- Token language_KW = null;
- Token semi = null;
-
- try { // for error handling
- Id name = null; OptionsSection optionsSection = null;
- language_KW = LT(1);
- match(LITERAL_language);
- name=id();
- semi = LT(1);
- match(SEMI);
- {
- switch ( LA(1)) {
- case LITERAL_options:
- {
- optionsSection=optionsSection();
- break;
- }
- case EOF:
- case LITERAL_abstract:
- case LITERAL_container:
- case LITERAL_interface:
- case LITERAL_list:
- case LITERAL_sequence:
- case LITERAL_token:
- {
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
- retVal = new HeaderSection(language_KW, name, semi, optionsSection);
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_1);
- }
- return retVal;
- }
-
- public final Grammar grammar() throws RecognitionException, TokenStreamException {
- Grammar retVal = new Grammar() ;
-
-
- try { // for error handling
- Rule rule = null;
- {
- _loop13:
- do {
- if ((_tokenSet_2.member(LA(1)))) {
- rule=rule();
- retVal.addChild(rule);
- }
- else {
- break _loop13;
- }
-
- } while (true);
- }
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_0);
- }
- return retVal;
- }
-
- public final Id id() throws RecognitionException, TokenStreamException {
- Id retVal = null ;
-
- Token tok = LT(1);
-
- try { // for error handling
- {
- switch ( LA(1)) {
- case ID:
- {
- match(ID);
- break;
- }
- case LITERAL_abstract:
- {
- match(LITERAL_abstract);
- break;
- }
- case LITERAL_container:
- {
- match(LITERAL_container);
- break;
- }
- case LITERAL_interface:
- {
- match(LITERAL_interface);
- break;
- }
- case LITERAL_language:
- {
- match(LITERAL_language);
- break;
- }
- case LITERAL_list:
- {
- match(LITERAL_list);
- break;
- }
- case LITERAL_options:
- {
- match(LITERAL_options);
- break;
- }
- case LITERAL_sequence:
- {
- match(LITERAL_sequence);
- break;
- }
- case LITERAL_token:
- {
- match(LITERAL_token);
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
- retVal = new Id(tok);
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_3);
- }
- return retVal;
- }
-
- public final OptionsSection optionsSection() throws RecognitionException, TokenStreamException {
- OptionsSection retVal = null ;
-
- Token options_KW = null;
- Token lcurly = null;
- Token rcurly = null;
-
- try { // for error handling
- OptionList optionList = null;
- options_KW = LT(1);
- match(LITERAL_options);
- lcurly = LT(1);
- match(LCURLY);
- optionList=optionList();
- rcurly = LT(1);
- match(RCURLY);
- retVal = new OptionsSection(options_KW, lcurly, optionList, rcurly);
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_1);
- }
- return retVal;
- }
-
- public final OptionList optionList() throws RecognitionException, TokenStreamException {
- OptionList retVal = new OptionList() ;
-
-
- try { // for error handling
- Option option = null;
- {
- _loop7:
- do {
- if ((_tokenSet_4.member(LA(1)))) {
- option=option();
- retVal.addChild(option);
- }
- else {
- break _loop7;
- }
-
- } while (true);
- }
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_5);
- }
- return retVal;
- }
-
- public final Option option() throws RecognitionException, TokenStreamException {
- Option retVal = null ;
-
- Token equals = null;
- Token semi = null;
-
- try { // for error handling
- Id name = null; OptionValue value = null;
- name=id();
- equals = LT(1);
- match(EQUALS);
- value=optionValue();
- semi = LT(1);
- match(SEMI);
- retVal = new Option(name, equals, value, semi);
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_6);
- }
- return retVal;
- }
-
- public final OptionValue optionValue() throws RecognitionException, TokenStreamException {
- OptionValue retVal = null ;
-
- Token tok = LT(1);
-
- try { // for error handling
- {
- switch ( LA(1)) {
- case ID:
- {
- match(ID);
- break;
- }
- case STRING_LITERAL:
- {
- match(STRING_LITERAL);
- break;
- }
- case INT_LITERAL:
- {
- match(INT_LITERAL);
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
- retVal = new OptionValue(tok);
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_7);
- }
- return retVal;
- }
-
- public final Rule rule() throws RecognitionException, TokenStreamException {
- Rule retVal = null ;
-
-
- try { // for error handling
- {
- switch ( LA(1)) {
- case LITERAL_abstract:
- case LITERAL_container:
- case LITERAL_interface:
- {
- retVal=altRule();
- break;
- }
- case LITERAL_list:
- {
- retVal=listRule();
- break;
- }
- case LITERAL_sequence:
- {
- retVal=seqRule();
- break;
- }
- case LITERAL_token:
- {
- retVal=tokenRule();
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_1);
- }
- return retVal;
- }
-
- public final AltRule altRule() throws RecognitionException, TokenStreamException {
- AltRule retVal = null ;
-
- Token semi = null;
-
- try { // for error handling
- AltRuleDecl decl = null; AltRuleBody body = null;
- decl=altRuleDecl();
- body=altRuleBody();
- semi = LT(1);
- match(SEMI);
- retVal = new AltRule(decl, body, semi);
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_1);
- }
- return retVal;
- }
-
- public final ListRule listRule() throws RecognitionException, TokenStreamException {
- ListRule retVal = null ;
-
- Token semi = null;
-
- try { // for error handling
- ListRuleDecl decl = null; ListRuleBody body = null;
- decl=listRuleDecl();
- body=listRuleBody();
- semi = LT(1);
- match(SEMI);
- retVal = new ListRule(decl, body, semi);
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_1);
- }
- return retVal;
- }
-
- public final SeqRule seqRule() throws RecognitionException, TokenStreamException {
- SeqRule retVal = null ;
-
- Token semi = null;
-
- try { // for error handling
- SeqRuleDecl decl = null; Seq body = null;
- decl=seqRuleDecl();
- body=seq();
- semi = LT(1);
- match(SEMI);
- retVal = new SeqRule(decl, body, semi);
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_1);
- }
- return retVal;
- }
-
- public final TokenRule tokenRule() throws RecognitionException, TokenStreamException {
- TokenRule retVal = null ;
-
- Token semi = null;
-
- try { // for error handling
- TokenRuleDecl decl = null; Alts body = null;
- decl=tokenRuleDecl();
- body=alts();
- semi = LT(1);
- match(SEMI);
- retVal = new TokenRule(decl, body, semi);
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_1);
- }
- return retVal;
- }
-
- public final AltRuleDecl altRuleDecl() throws RecognitionException, TokenStreamException {
- AltRuleDecl retVal = null ;
-
- Token colon = null;
-
- try { // for error handling
- AltRuleKind kind = null; Id name = null; Attrs attrs = null;
- kind=altRuleKind();
- name=id();
- {
- switch ( LA(1)) {
- case LSQUARE:
- {
- attrs=attrs();
- break;
- }
- case COLON:
- {
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
- colon = LT(1);
- match(COLON);
- retVal = new AltRuleDecl(kind, name, attrs, colon);
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_8);
- }
- return retVal;
- }
-
- public final AltRuleBody altRuleBody() throws RecognitionException, TokenStreamException {
- AltRuleBody retVal = null ;
-
-
- try { // for error handling
- AltSeq preSeq = null; Alts alts = null; AltSeq postSeq = null;
- {
- switch ( LA(1)) {
- case LPAREN:
- {
- preSeq=altSeq();
- break;
- }
- case LITERAL_language:
- case LITERAL_options:
- case ID:
- case STRING_LITERAL:
- case LITERAL_abstract:
- case LITERAL_container:
- case LITERAL_interface:
- case LITERAL_list:
- case LITERAL_sequence:
- case LITERAL_token:
- {
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
- alts=alts();
- {
- switch ( LA(1)) {
- case LPAREN:
- {
- postSeq=altSeq();
- break;
- }
- case SEMI:
- {
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
- retVal = new AltRuleBody(preSeq, alts, postSeq);
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_7);
- }
- return retVal;
- }
-
- public final AltRuleKind altRuleKind() throws RecognitionException, TokenStreamException {
- AltRuleKind retVal = null ;
-
- Token tok = LT(1);
-
- try { // for error handling
- {
- switch ( LA(1)) {
- case LITERAL_abstract:
- {
- match(LITERAL_abstract);
- break;
- }
- case LITERAL_container:
- {
- match(LITERAL_container);
- break;
- }
- case LITERAL_interface:
- {
- match(LITERAL_interface);
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
- retVal = new AltRuleKind(tok);
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_4);
- }
- return retVal;
- }
-
- public final Attrs attrs() throws RecognitionException, TokenStreamException {
- Attrs retVal = null ;
-
- Token lsquare = null;
- Token rsquare = null;
-
- try { // for error handling
- AttrList attrList = null;
- lsquare = LT(1);
- match(LSQUARE);
- attrList=attrList();
- rsquare = LT(1);
- match(RSQUARE);
- retVal = new Attrs(lsquare, attrList, rsquare);
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_9);
- }
- return retVal;
- }
-
- public final AltSeq altSeq() throws RecognitionException, TokenStreamException {
- AltSeq retVal = null ;
-
- Token lparen = null;
- Token rparen = null;
-
- try { // for error handling
- Seq seq = null;
- lparen = LT(1);
- match(LPAREN);
- seq=seq();
- rparen = LT(1);
- match(RPAREN);
- retVal = new AltSeq(lparen, seq, rparen);
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_10);
- }
- return retVal;
- }
-
- public final Alts alts() throws RecognitionException, TokenStreamException {
- Alts retVal = new Alts() ;
-
- Token pipe = null;
-
- try { // for error handling
- SimpleExpr se1 = null; SimpleExpr sen = null;
- se1=simpleExpr();
- retVal.addChild(se1);
- {
- _loop26:
- do {
- if ((LA(1)==PIPE)) {
- pipe = LT(1);
- match(PIPE);
- sen=simpleExpr();
- retVal.addChild(pipe); retVal.addChild(sen);
- }
- else {
- break _loop26;
- }
-
- } while (true);
- }
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_11);
- }
- return retVal;
- }
-
- public final SimpleExpr simpleExpr() throws RecognitionException, TokenStreamException {
- SimpleExpr retVal = null ;
-
- Token equals = null;
-
- try { // for error handling
- Id name = null; Atom value = null; Attrs attrs = null;
- {
- if ((_tokenSet_4.member(LA(1))) && (LA(2)==EQUALS)) {
- name=id();
- equals = LT(1);
- match(EQUALS);
- }
- else if ((_tokenSet_12.member(LA(1))) && (_tokenSet_13.member(LA(2)))) {
- }
- else {
- throw new NoViableAltException(LT(1), getFilename());
- }
-
- }
- value=atom();
- {
- switch ( LA(1)) {
- case LSQUARE:
- {
- attrs=attrs();
- break;
- }
- case LITERAL_language:
- case SEMI:
- case LITERAL_options:
- case ID:
- case STRING_LITERAL:
- case LITERAL_abstract:
- case LITERAL_container:
- case LITERAL_interface:
- case PIPE:
- case LPAREN:
- case RPAREN:
- case LITERAL_list:
- case STAR:
- case PLUS:
- case LITERAL_sequence:
- case LITERAL_token:
- {
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
- retVal = new SimpleExpr(name, equals, value, attrs);
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_14);
- }
- return retVal;
- }
-
- public final Seq seq() throws RecognitionException, TokenStreamException {
- Seq retVal = new Seq() ;
-
-
- try { // for error handling
- Expr expr = null;
- {
- int _cnt40=0;
- _loop40:
- do {
- if ((_tokenSet_8.member(LA(1)))) {
- expr=expr();
- retVal.addChild(expr);
- }
- else {
- if ( _cnt40>=1 ) { break _loop40; } else {throw new NoViableAltException(LT(1), getFilename());}
- }
-
- _cnt40++;
- } while (true);
- }
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_15);
- }
- return retVal;
- }
-
- public final ListRuleDecl listRuleDecl() throws RecognitionException, TokenStreamException {
- ListRuleDecl retVal = null ;
-
- Token list_KW = null;
- Token colon = null;
-
- try { // for error handling
- Id name = null; Attrs attrs = null;
- list_KW = LT(1);
- match(LITERAL_list);
- name=id();
- {
- switch ( LA(1)) {
- case LSQUARE:
- {
- attrs=attrs();
- break;
- }
- case COLON:
- {
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
- colon = LT(1);
- match(COLON);
- retVal = new ListRuleDecl(list_KW, name, attrs, colon);
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_12);
- }
- return retVal;
- }
-
- public final ListRuleBody listRuleBody() throws RecognitionException, TokenStreamException {
- ListRuleBody retVal = null ;
-
- Token lparen = null;
- Token rparen = null;
-
- try { // for error handling
- SimpleExpr listExpr = null; SimpleExpr separator = null; SimpleExpr listExpr2 = null; ListMark listMark = null;
- listExpr=simpleExpr();
- {
- switch ( LA(1)) {
- case LPAREN:
- {
- lparen = LT(1);
- match(LPAREN);
- separator=simpleExpr();
- listExpr2=simpleExpr();
- rparen = LT(1);
- match(RPAREN);
- break;
- }
- case STAR:
- case PLUS:
- {
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
- listMark=listMark();
- retVal = new ListRuleBody(listExpr, lparen, separator, listExpr2, rparen, listMark);
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_7);
- }
- return retVal;
- }
-
- public final ListMark listMark() throws RecognitionException, TokenStreamException {
- ListMark retVal = null ;
-
- Token tok = LT(1);
-
- try { // for error handling
- {
- switch ( LA(1)) {
- case STAR:
- {
- match(STAR);
- break;
- }
- case PLUS:
- {
- match(PLUS);
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
- retVal = new ListMark(tok);
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_7);
- }
- return retVal;
- }
-
- public final SeqRuleDecl seqRuleDecl() throws RecognitionException, TokenStreamException {
- SeqRuleDecl retVal = null ;
-
- Token sequence_KW = null;
- Token colon = null;
-
- try { // for error handling
- Id name = null; Attrs attrs = null;
- sequence_KW = LT(1);
- match(LITERAL_sequence);
- name=id();
- {
- switch ( LA(1)) {
- case LSQUARE:
- {
- attrs=attrs();
- break;
- }
- case COLON:
- {
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
- colon = LT(1);
- match(COLON);
- retVal = new SeqRuleDecl(sequence_KW, name, attrs, colon);
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_8);
- }
- return retVal;
- }
-
- public final Expr expr() throws RecognitionException, TokenStreamException {
- Expr retVal = null ;
-
-
- try { // for error handling
- {
- switch ( LA(1)) {
- case LPAREN:
- {
- retVal=optSubSeq();
- break;
- }
- case LITERAL_language:
- case LITERAL_options:
- case ID:
- case STRING_LITERAL:
- case LITERAL_abstract:
- case LITERAL_container:
- case LITERAL_interface:
- case LITERAL_list:
- case LITERAL_sequence:
- case LITERAL_token:
- {
- retVal=simpleExpr();
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_16);
- }
- return retVal;
- }
-
- public final TokenRuleDecl tokenRuleDecl() throws RecognitionException, TokenStreamException {
- TokenRuleDecl retVal = null ;
-
- Token token_KW = null;
- Token colon = null;
-
- try { // for error handling
- Id name = null; Attrs attrs = null;
- token_KW = LT(1);
- match(LITERAL_token);
- name=id();
- {
- switch ( LA(1)) {
- case LSQUARE:
- {
- attrs=attrs();
- break;
- }
- case COLON:
- {
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
- colon = LT(1);
- match(COLON);
- retVal = new TokenRuleDecl(token_KW, name, attrs, colon);
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_12);
- }
- return retVal;
- }
-
- public final OptSubSeq optSubSeq() throws RecognitionException, TokenStreamException {
- OptSubSeq retVal = null ;
-
- Token lparen = null;
- Token rparen = null;
- Token qmark = null;
-
- try { // for error handling
- Seq seq = null;
- lparen = LT(1);
- match(LPAREN);
- seq=seq();
- rparen = LT(1);
- match(RPAREN);
- qmark = LT(1);
- match(QMARK);
- retVal = new OptSubSeq(lparen, seq, rparen, qmark);
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_16);
- }
- return retVal;
- }
-
- public final Atom atom() throws RecognitionException, TokenStreamException {
- Atom retVal = null ;
-
- Token tok = LT(1);
-
- try { // for error handling
- {
- switch ( LA(1)) {
- case ID:
- {
- match(ID);
- break;
- }
- case STRING_LITERAL:
- {
- match(STRING_LITERAL);
- break;
- }
- case LITERAL_abstract:
- {
- match(LITERAL_abstract);
- break;
- }
- case LITERAL_container:
- {
- match(LITERAL_container);
- break;
- }
- case LITERAL_interface:
- {
- match(LITERAL_interface);
- break;
- }
- case LITERAL_language:
- {
- match(LITERAL_language);
- break;
- }
- case LITERAL_list:
- {
- match(LITERAL_list);
- break;
- }
- case LITERAL_options:
- {
- match(LITERAL_options);
- break;
- }
- case LITERAL_sequence:
- {
- match(LITERAL_sequence);
- break;
- }
- case LITERAL_token:
- {
- match(LITERAL_token);
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
- retVal = new Atom(tok);
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_13);
- }
- return retVal;
- }
-
- public final AttrList attrList() throws RecognitionException, TokenStreamException {
- AttrList retVal = new AttrList() ;
-
- Token id1 = null;
- Token comma = null;
- Token idn = null;
-
- try { // for error handling
- id1 = LT(1);
- match(ID);
- retVal.addChild(id1);
- {
- _loop53:
- do {
- if ((LA(1)==COMMA)) {
- comma = LT(1);
- match(COMMA);
- idn = LT(1);
- match(ID);
- retVal.addChild(comma); retVal.addChild(idn);
- }
- else {
- break _loop53;
- }
-
- } while (true);
- }
- }
- catch (RecognitionException ex) {
- reportError(ex);
- consume();
- consumeUntil(_tokenSet_17);
- }
- return retVal;
- }
-
-
- public static final String[] _tokenNames = {
- "<0>",
- "EOF",
- "<2>",
- "NULL_TREE_LOOKAHEAD",
- "\"language\"",
- "SEMI",
- "\"options\"",
- "LCURLY",
- "RCURLY",
- "EQUALS",
- "ID",
- "STRING_LITERAL",
- "INT_LITERAL",
- "COLON",
- "\"abstract\"",
- "\"container\"",
- "\"interface\"",
- "PIPE",
- "LPAREN",
- "RPAREN",
- "\"list\"",
- "STAR",
- "PLUS",
- "\"sequence\"",
- "\"token\"",
- "QMARK",
- "LSQUARE",
- "RSQUARE",
- "COMMA",
- "DOT",
- "BANG",
- "ESC",
- "DIGIT",
- "WS",
- "SINGLE_LINE_COMMENT",
- "MULTI_LINE_COMMENT"
- };
-
- private static final long[] mk_tokenSet_0() {
- long[] data = { 2L, 0L};
- return data;
- }
- public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
- private static final long[] mk_tokenSet_1() {
- long[] data = { 26329090L, 0L};
- return data;
- }
- public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
- private static final long[] mk_tokenSet_2() {
- long[] data = { 26329088L, 0L};
- return data;
- }
- public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
- private static final long[] mk_tokenSet_3() {
- long[] data = { 67117600L, 0L};
- return data;
- }
- public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
- private static final long[] mk_tokenSet_4() {
- long[] data = { 26330192L, 0L};
- return data;
- }
- public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
- private static final long[] mk_tokenSet_5() {
- long[] data = { 256L, 0L};
- return data;
- }
- public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
- private static final long[] mk_tokenSet_6() {
- long[] data = { 26330448L, 0L};
- return data;
- }
- public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
- private static final long[] mk_tokenSet_7() {
- long[] data = { 32L, 0L};
- return data;
- }
- public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
- private static final long[] mk_tokenSet_8() {
- long[] data = { 26594384L, 0L};
- return data;
- }
- public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
- private static final long[] mk_tokenSet_9() {
- long[] data = { 33549424L, 0L};
- return data;
- }
- public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9());
- private static final long[] mk_tokenSet_10() {
- long[] data = { 26332272L, 0L};
- return data;
- }
- public static final BitSet _tokenSet_10 = new BitSet(mk_tokenSet_10());
- private static final long[] mk_tokenSet_11() {
- long[] data = { 262176L, 0L};
- return data;
- }
- public static final BitSet _tokenSet_11 = new BitSet(mk_tokenSet_11());
- private static final long[] mk_tokenSet_12() {
- long[] data = { 26332240L, 0L};
- return data;
- }
- public static final BitSet _tokenSet_12 = new BitSet(mk_tokenSet_12());
- private static final long[] mk_tokenSet_13() {
- long[] data = { 100650096L, 0L};
- return data;
- }
- public static final BitSet _tokenSet_13 = new BitSet(mk_tokenSet_13());
- private static final long[] mk_tokenSet_14() {
- long[] data = { 33541232L, 0L};
- return data;
- }
- public static final BitSet _tokenSet_14 = new BitSet(mk_tokenSet_14());
- private static final long[] mk_tokenSet_15() {
- long[] data = { 524320L, 0L};
- return data;
- }
- public static final BitSet _tokenSet_15 = new BitSet(mk_tokenSet_15());
- private static final long[] mk_tokenSet_16() {
- long[] data = { 27118704L, 0L};
- return data;
- }
- public static final BitSet _tokenSet_16 = new BitSet(mk_tokenSet_16());
- private static final long[] mk_tokenSet_17() {
- long[] data = { 134217728L, 0L};
- return data;
- }
- public static final BitSet _tokenSet_17 = new BitSet(mk_tokenSet_17());
-
- }
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/GymnastParserTokenTypes.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/GymnastParserTokenTypes.java
deleted file mode 100644
index 4436e8b..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/GymnastParserTokenTypes.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-// $ANTLR : "Gymnast.g" -> "GymnastParser.java"$
-
-package org.eclipse.gymnast.generator.core.parser;
-
-public interface GymnastParserTokenTypes {
- int EOF = 1;
- int NULL_TREE_LOOKAHEAD = 3;
- int LITERAL_language = 4;
- int SEMI = 5;
- int LITERAL_options = 6;
- int LCURLY = 7;
- int RCURLY = 8;
- int EQUALS = 9;
- int ID = 10;
- int STRING_LITERAL = 11;
- int INT_LITERAL = 12;
- int COLON = 13;
- int LITERAL_abstract = 14;
- int LITERAL_container = 15;
- int LITERAL_interface = 16;
- int PIPE = 17;
- int LPAREN = 18;
- int RPAREN = 19;
- int LITERAL_list = 20;
- int STAR = 21;
- int PLUS = 22;
- int LITERAL_sequence = 23;
- int LITERAL_token = 24;
- int QMARK = 25;
- int LSQUARE = 26;
- int RSQUARE = 27;
- int COMMA = 28;
- int DOT = 29;
- int BANG = 30;
- int ESC = 31;
- int DIGIT = 32;
- int WS = 33;
- int SINGLE_LINE_COMMENT = 34;
- int MULTI_LINE_COMMENT = 35;
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/GymnastParserTokenTypes.txt b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/GymnastParserTokenTypes.txt
deleted file mode 100644
index 6222a54..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/GymnastParserTokenTypes.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-// $ANTLR : Gymnast.g -> GymnastParserTokenTypes.txt$
-GymnastParser // output token vocab name
-LITERAL_language="language"=4
-SEMI=5
-LITERAL_options="options"=6
-LCURLY=7
-RCURLY=8
-EQUALS=9
-ID=10
-STRING_LITERAL=11
-INT_LITERAL=12
-COLON=13
-LITERAL_abstract="abstract"=14
-LITERAL_container="container"=15
-LITERAL_interface="interface"=16
-PIPE=17
-LPAREN=18
-RPAREN=19
-LITERAL_list="list"=20
-STAR=21
-PLUS=22
-LITERAL_sequence="sequence"=23
-LITERAL_token="token"=24
-QMARK=25
-LSQUARE=26
-RSQUARE=27
-COMMA=28
-DOT=29
-BANG=30
-ESC=31
-DIGIT=32
-WS=33
-SINGLE_LINE_COMMENT=34
-MULTI_LINE_COMMENT=35
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/ParserDriver.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/ParserDriver.java
deleted file mode 100644
index 3cab61a..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/ParserDriver.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generator.core.parser;
-
-import java.io.Reader;
-
-import org.eclipse.gymnast.generator.core.ast.CompUnit;
-import org.eclipse.gymnast.runtime.core.parser.IParser;
-import org.eclipse.gymnast.runtime.core.parser.ParseContext;
-import org.eclipse.gymnast.runtime.core.parser.ParseError;
-import org.eclipse.gymnast.runtime.core.parser.ParseMessage;
-
-import antlr.MismatchedCharException;
-import antlr.MismatchedTokenException;
-import antlr.NoViableAltException;
-import antlr.NoViableAltForCharException;
-import antlr.RecognitionException;
-
-
-/**
- * @author cjdaly@us.ibm.com
- *
- */
-public class ParserDriver implements IParser {
-
- public ParseContext parse(Reader input) {
- GymnastLexer lexer = new GymnastLexer(input);
- lexer.setColumn(0);
- lexer.setTabSize(1);
-
- GymnastParser parser = new GymnastParser(lexer);
- ParseContext parseContext = new ParseContext();
- parser.setParseContext(parseContext);
-
- try{
- CompUnit compUnit = parser.compUnit();
- if (compUnit != null) {
- parseContext.setParseRoot(compUnit);
- }
-
- if (parseContext.getMessageCount() == 0) {
- System.out.println("Parse OK!");
- }
- else {
- ParseMessage[] msgs = parseContext.getMessages();
- for (int i = 0; i < msgs.length; i++) {
- System.err.println(msgs[i].getMessage());
- }
- }
- }
- catch (Exception ex){
- ex.printStackTrace();
- }
-
- return parseContext;
- }
-
- static ParseError createParseError(RecognitionException ex) {
- String message = ex.getMessage();
- int offset = ex.getColumn();
- int length = 0;
-
- if (ex instanceof MismatchedCharException) {
- length = 1;
- } else if (ex instanceof MismatchedTokenException) {
- MismatchedTokenException ex2 = (MismatchedTokenException) ex;
- if ((ex2.token != null) && (ex2.token.getText() != null)) {
- length = ex2.token.getText().length();
- }
- } else if (ex instanceof NoViableAltException) {
- NoViableAltException ex2 = (NoViableAltException) ex;
- if ((ex2.token != null) && (ex2.token.getText() != null)) {
- length = ex2.token.getText().length();
- }
- } else if (ex instanceof NoViableAltForCharException) {
- length = 1;
- }
-
- return new ParseError(message, offset, length);
- }
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/gymnast.ast b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/gymnast.ast
deleted file mode 100644
index 0ba1823..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/parser/gymnast.ast
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-language Gymnast;
-
-options { k=2; }
-
-sequence compUnit [entry] : headerSection grammar ;
-
-sequence headerSection : "language" name=id SEMI (optionsSection)? ;
-
-sequence optionsSection : "options" LCURLY optionList RCURLY ;
-list optionList : option* ;
-sequence option : name=id EQUALS value=optionValue SEMI ;
-token optionValue : ID | STRING_LITERAL | INT_LITERAL ;
-
-list grammar : rule* ;
-abstract rule : altRule | listRule | seqRule | tokenRule ;
-
-sequence altRule : decl=altRuleDecl body=altRuleBody SEMI ;
-sequence altRuleDecl : kind=altRuleKind name=id (attrs)? COLON ;
-token altRuleKind : "abstract" | "container" | "interface" ;
-sequence altRuleBody : (preSeq=altSeq)? alts (postSeq=altSeq)? ;
-list alts : se1=simpleExpr (PIPE sen=simpleExpr)* ;
-sequence altSeq : LPAREN seq RPAREN ;
-
-sequence listRule : decl=listRuleDecl body=listRuleBody SEMI ;
-sequence listRuleDecl : "list" name=id (attrs)? COLON ;
-sequence listRuleBody : listExpr=simpleExpr (LPAREN separator=simpleExpr listExpr2=simpleExpr RPAREN)? listMark ;
-token listMark : STAR | PLUS ;
-
-sequence seqRule : decl=seqRuleDecl body=seq SEMI ;
-sequence seqRuleDecl : "sequence" name=id (attrs)? COLON ;
-list seq : expr+ ;
-
-sequence tokenRule : decl=tokenRuleDecl body=alts SEMI ;
-sequence tokenRuleDecl : "token" name=id (attrs)? COLON ;
-
-abstract expr : optSubSeq | simpleExpr ;
-sequence optSubSeq : LPAREN seq RPAREN QMARK ;
-sequence simpleExpr : (name=id EQUALS)? value=atom (attrs)? ;
-
-sequence attrs : LSQUARE attrList RSQUARE ;
-list attrList : id1=ID (COMMA idn=ID)* ;
-
-token atom
-: ID
-| STRING_LITERAL
-| "abstract"
-| "container"
-| "interface"
-| "language"
-| "list"
-| "options"
-| "sequence"
-| "token"
-;
-
-token id
-: ID
-| "abstract"
-| "container"
-| "interface"
-| "language"
-| "list"
-| "options"
-| "sequence"
-| "token"
-; \ No newline at end of file
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/registry/ASTGenerator.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/registry/ASTGenerator.java
deleted file mode 100644
index d984183..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/registry/ASTGenerator.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generator.core.registry;
-
-import org.eclipse.gymnast.generator.core.generator.GeneratorContext;
-
-public abstract class ASTGenerator {
-
- public abstract void generateAST(GeneratorContext context) throws Exception;
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/registry/ASTGeneratorDescriptor.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/registry/ASTGeneratorDescriptor.java
deleted file mode 100644
index 71eebf2..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/registry/ASTGeneratorDescriptor.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generator.core.registry;
-
-public class ASTGeneratorDescriptor {
-
- private final String _id;
- private final String _description;
- private final ASTGenerator _astGenerator;
-
- ASTGeneratorDescriptor(String id, String description, ASTGenerator astGenerator) {
- _id = id;
- _description = description;
- _astGenerator = astGenerator;
- }
-
- public String getId() {
- return _id;
- }
-
- public String getDescription() {
- return _description;
- }
-
- public ASTGenerator getASTGenerator() {
- return _astGenerator;
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/registry/GeneratorRegistry.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/registry/GeneratorRegistry.java
deleted file mode 100644
index 0ae8e7c..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/registry/GeneratorRegistry.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generator.core.registry;
-
-import java.util.Collection;
-import java.util.HashMap;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.Platform;
-
-public class GeneratorRegistry {
-
- private static final String PARSER_GENERATORS_EXTENSION_POINT_ID = "org.eclipse.gymnast.generator.core.parserGenerators";
- private static final String PARSER_GENERATOR_ELEMENT_NAME = "parserGenerator";
-
- private static final String AST_GENERATORS_EXTENSION_POINT_ID = "org.eclipse.gymnast.generator.core.astGenerators";
- private static final String AST_GENERATOR_ELEMENT_NAME = "astGenerator";
-
- private static final String ID_ATTR_NAME = "id";
- private static final String ID_ATTR_DESCRIPTION = "description";
- private static final String CLASS_ATTR_NAME = "class";
-
- private static GeneratorRegistry _instance;
-
- private final HashMap _idToASTGeneratorDescriptor;
- private final HashMap _idToParserGeneratorDescriptor;
-
-
- private GeneratorRegistry() {
- _idToASTGeneratorDescriptor = new HashMap();
- _idToParserGeneratorDescriptor = new HashMap();
- init();
- }
-
- public static GeneratorRegistry getInstance() {
- if (_instance == null) {
- _instance = new GeneratorRegistry();
- }
- return _instance;
- }
-
- public ASTGeneratorDescriptor getASTGeneratorDescriptor(String id) {
- return (ASTGeneratorDescriptor)_idToASTGeneratorDescriptor.get(id);
- }
-
- public ASTGeneratorDescriptor[] getASTGeneratorDescriptors() {
- Collection values = _idToASTGeneratorDescriptor.values();
- return (ASTGeneratorDescriptor[]) values.toArray(new ASTGeneratorDescriptor[values.size()]);
- }
-
- public ParserGeneratorDescriptor getParserGeneratorDescriptor(String id) {
- return (ParserGeneratorDescriptor)_idToParserGeneratorDescriptor.get(id);
- }
-
- public ParserGeneratorDescriptor[] getParserGeneratorDescriptors() {
- Collection values = _idToParserGeneratorDescriptor.values();
- return (ParserGeneratorDescriptor[]) values.toArray(new ParserGeneratorDescriptor[values.size()]);
- }
-
- private void init() {
- IExtensionRegistry registry = Platform.getExtensionRegistry();
-
- IConfigurationElement[] astGeneratorElements =
- registry.getConfigurationElementsFor(AST_GENERATORS_EXTENSION_POINT_ID);
-
- for (int i = 0; i < astGeneratorElements.length; i++) {
- IConfigurationElement element = astGeneratorElements[i];
- if (AST_GENERATOR_ELEMENT_NAME.equals(element.getName())) {
- initASTGenerator(element);
- }
- }
-
- IConfigurationElement[] parserGeneratorElements =
- registry.getConfigurationElementsFor(PARSER_GENERATORS_EXTENSION_POINT_ID);
-
- for (int i = 0; i < parserGeneratorElements.length; i++) {
- IConfigurationElement element = parserGeneratorElements[i];
- if (PARSER_GENERATOR_ELEMENT_NAME.equals(element.getName())) {
- initParserGenerator(element);
- }
- }
- }
-
- private void initASTGenerator(IConfigurationElement astGeneratorElement) {
- String id = astGeneratorElement.getAttribute(ID_ATTR_NAME);
- if (id == null) {
- // TODO: report error!
- return;
- }
-
- String description = astGeneratorElement.getAttribute(ID_ATTR_DESCRIPTION);
-
- try {
- ASTGenerator generator = (ASTGenerator)astGeneratorElement.createExecutableExtension(CLASS_ATTR_NAME);
- ASTGeneratorDescriptor descriptor = new ASTGeneratorDescriptor(id, description, generator);
- _idToASTGeneratorDescriptor.put(id, descriptor);
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- private void initParserGenerator(IConfigurationElement parserGeneratorElement) {
- String id = parserGeneratorElement.getAttribute(ID_ATTR_NAME);
- if (id == null) {
- // TODO: report error!
- return;
- }
-
- String description = parserGeneratorElement.getAttribute(ID_ATTR_DESCRIPTION);
-
- try {
- ParserGenerator generator = (ParserGenerator)parserGeneratorElement.createExecutableExtension(CLASS_ATTR_NAME);
- ParserGeneratorDescriptor descriptor = new ParserGeneratorDescriptor(id, description, generator);
- _idToParserGeneratorDescriptor.put(id, descriptor);
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/registry/ParserGenerator.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/registry/ParserGenerator.java
deleted file mode 100644
index 77debe4..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/registry/ParserGenerator.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generator.core.registry;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.gymnast.generator.core.generator.GeneratorContext;
-
-public abstract class ParserGenerator {
-
- public abstract void generateParser(GeneratorContext context) throws Exception;
-
-
- protected void writeFile(IFile file, String fileText) throws CoreException {
- InputStream input = new ByteArrayInputStream(fileText.getBytes());
- writeFile(file, input);
- }
-
- protected void writeFile(IFile file, InputStream input) throws CoreException {
- if (file.exists()) {
- file.setContents(input, true, false, null);
- }
- else {
- file.create(input, true, null);
- }
- }
-}
diff --git a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/registry/ParserGeneratorDescriptor.java b/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/registry/ParserGeneratorDescriptor.java
deleted file mode 100644
index 568f035..0000000
--- a/plugins/org.eclipse.gymnast.generator.core/src/org/eclipse/gymnast/generator/core/registry/ParserGeneratorDescriptor.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generator.core.registry;
-
-public class ParserGeneratorDescriptor {
-
- private final String _id;
- private final String _description;
- private final ParserGenerator _parserGenerator;
-
- ParserGeneratorDescriptor(String id, String description, ParserGenerator parserGenerator) {
- _id = id;
- _description = description;
- _parserGenerator = parserGenerator;
- }
-
- public String getId() {
- return _id;
- }
-
- public String getDescription() {
- return _description;
- }
-
- public ParserGenerator getParserGenerator() {
- return _parserGenerator;
- }
-}
diff --git a/plugins/org.eclipse.gymnast.generator.ui/.classpath b/plugins/org.eclipse.gymnast.generator.ui/.classpath
deleted file mode 100644
index 065ac06..0000000
--- a/plugins/org.eclipse.gymnast.generator.ui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.gymnast.generator.ui/.cvsignore b/plugins/org.eclipse.gymnast.generator.ui/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/plugins/org.eclipse.gymnast.generator.ui/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/plugins/org.eclipse.gymnast.generator.ui/.project b/plugins/org.eclipse.gymnast.generator.ui/.project
deleted file mode 100644
index 03fbc09..0000000
--- a/plugins/org.eclipse.gymnast.generator.ui/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.gymnast.generator.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/plugins/org.eclipse.gymnast.generator.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.gymnast.generator.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index f213106..0000000
--- a/plugins/org.eclipse.gymnast.generator.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,28 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Plugin.name (Incubation)
-Bundle-SymbolicName: org.eclipse.gymnast.generator.ui;singleton:=true
-Bundle-Version: 0.3.0.qualifier
-Bundle-ClassPath: .
-Bundle-Activator: org.eclipse.gymnast.generator.ui.GymnastUIPlugin
-Bundle-Vendor: Eclipse.org
-Bundle-Localization: plugin
-Export-Package: org.eclipse.gymnast.generator.ui,
- org.eclipse.gymnast.generator.ui.actions,
- org.eclipse.gymnast.generator.ui.editor,
- org.eclipse.gymnast.generator.ui.editor.syntax
-Require-Bundle: org.eclipse.ui,
- org.antlr,
- org.eclipse.core.resources,
- org.eclipse.ui.console,
- org.eclipse.ui.editors,
- org.eclipse.ui.ide,
- org.eclipse.ui.views,
- org.eclipse.ui.workbench.texteditor,
- org.eclipse.jface.text,
- org.eclipse.core.runtime,
- org.eclipse.gymnast.runtime.core,
- org.eclipse.gymnast.runtime.ui,
- org.eclipse.gymnast.generator.core,
- org.eclipse.emf.ecore
-Eclipse-LazyStart: true
diff --git a/plugins/org.eclipse.gymnast.generator.ui/build.properties b/plugins/org.eclipse.gymnast.generator.ui/build.properties
deleted file mode 100644
index d24082b..0000000
--- a/plugins/org.eclipse.gymnast.generator.ui/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.properties,\
- plugin.xml,\
- icons/
diff --git a/plugins/org.eclipse.gymnast.generator.ui/icons/obj16/gymnast.gif b/plugins/org.eclipse.gymnast.generator.ui/icons/obj16/gymnast.gif
deleted file mode 100644
index 4771987..0000000
--- a/plugins/org.eclipse.gymnast.generator.ui/icons/obj16/gymnast.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.gymnast.generator.ui/plugin.properties b/plugins/org.eclipse.gymnast.generator.ui/plugin.properties
deleted file mode 100644
index 25c54e0..0000000
--- a/plugins/org.eclipse.gymnast.generator.ui/plugin.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#/**
-# * <copyright>
-# *
-# * Copyright (c) 2004,2006 IBM Corporation and others.
-# * All rights reserved. This program and the accompanying materials
-# * are made available under the terms of the Eclipse Public License v1.0
-# * which accompanies this distribution, and is available at
-# * http://www.eclipse.org/legal/epl-v10.html
-# *
-# * Contributors:
-# * IBM - Initial API and implementation
-# *
-# * </copyright>
-# *
-# * $Id: plugin.properties,v 1.1 2008/01/15 06:21:13 cdaly Exp $
-# */
-
-# NLS_MESSAGEFORMAT_VAR
-
-# ==============================================================================
-# Do not change the properties between this line and the last line containing:
-# %%% END OF TRANSLATED PROPERTIES %%%
-# Instead, either redefine an existing property, or create a new property,
-# append it to the end of the file, and change the code to use the new name.
-# ==============================================================================
-
-# ==============================================================================
-# %%% END OF TRANSLATED PROPERTIES %%%
-# The above properties have been shipped for translation.
-# ==============================================================================
-
-Plugin.name = Gymnast Generator UI
-Plugin.providerName = Eclipse.org
diff --git a/plugins/org.eclipse.gymnast.generator.ui/plugin.xml b/plugins/org.eclipse.gymnast.generator.ui/plugin.xml
deleted file mode 100644
index f8c5342..0000000
--- a/plugins/org.eclipse.gymnast.generator.ui/plugin.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension
- point="org.eclipse.ui.editors">
- <editor
- name="Gymnast Editor"
- extensions="ast"
- icon="icons/obj16/gymnast.gif"
- class="org.eclipse.gymnast.generator.ui.editor.GymnastEditor"
- contributorClass="org.eclipse.gymnast.generator.ui.editor.GymnastEditorActionContributor"
- id="org.eclipse.gymnast.generator.ui.editor.GymnastEditor">
- </editor>
- </extension>
- <extension
- point="org.eclipse.ui.popupMenus">
- <objectContribution
- objectClass="org.eclipse.core.resources.IFile"
- nameFilter="*.ast"
- id="org.eclipse.gymnast.generator.ui.GymnastPopupActions">
- <action
- label="Generate AST"
- icon="icons/obj16/gymnast.gif"
- class="org.eclipse.gymnast.generator.ui.actions.GenerateAST"
- menubarPath="additions"
- enablesFor="1"
- id="GenerateAST">
- </action>
- </objectContribution>
- </extension>
-
-</plugin>
diff --git a/plugins/org.eclipse.gymnast.generator.ui/src/org/eclipse/gymnast/generator/ui/GymnastUIPlugin.java b/plugins/org.eclipse.gymnast.generator.ui/src/org/eclipse/gymnast/generator/ui/GymnastUIPlugin.java
deleted file mode 100644
index 2855163..0000000
--- a/plugins/org.eclipse.gymnast.generator.ui/src/org/eclipse/gymnast/generator/ui/GymnastUIPlugin.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generator.ui;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class GymnastUIPlugin extends AbstractUIPlugin {
- //The shared instance.
- private static GymnastUIPlugin plugin;
- //Resource bundle.
- private ResourceBundle resourceBundle;
-
- /**
- * The constructor.
- */
- public GymnastUIPlugin() {
- plugin = this;
- try {
- resourceBundle = ResourceBundle.getBundle("org.eclipse.gymnast.generator.ui.GymnastUIPluginResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- }
-
- /**
- * Returns the shared instance.
- */
- public static GymnastUIPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String key) {
- ResourceBundle bundle = GymnastUIPlugin.getDefault().getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- return resourceBundle;
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.ui/src/org/eclipse/gymnast/generator/ui/actions/GenerateAST.java b/plugins/org.eclipse.gymnast.generator.ui/src/org/eclipse/gymnast/generator/ui/actions/GenerateAST.java
deleted file mode 100644
index 5ddb886..0000000
--- a/plugins/org.eclipse.gymnast.generator.ui/src/org/eclipse/gymnast/generator/ui/actions/GenerateAST.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generator.ui.actions;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceDescription;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.gymnast.generator.core.generator.Generator;
-import org.eclipse.gymnast.runtime.core.util.IReporter;
-import org.eclipse.gymnast.runtime.ui.views.console.ReporterConsole;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-
-
-/**
- * @author cjdaly@us.ibm.com
- *
- */
-public class GenerateAST implements IObjectActionDelegate {
-
- private IFile _file;
- private GenerateASTJob _job;
-
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection sel = (IStructuredSelection)selection;
- Object selElem = sel.getFirstElement();
- if (selElem instanceof IFile) {
- _file = (IFile)selElem;
- }
- }
- }
-
- public void run(IAction action) {
- if (_job == null) {
- _job = new GenerateASTJob();
- _job.schedule();
- }
- }
-
- private class GenerateASTJob extends Job {
-
- private IReporter _reporter;
-
- private GenerateASTJob() {
- super("Generating AST for " + _file.getName());
-
- _reporter = new ReporterConsole("Generate AST");
- }
-
- protected IStatus run(IProgressMonitor monitor) {
-
- setAutoBuilding(false);
-
- Generator generator = new Generator();
- generator.generate(_file, monitor, _reporter);
- monitor.done();
- _job = null;
-
- setAutoBuilding(true);
-
- return Status.OK_STATUS;
- }
-
- private void setAutoBuilding(boolean value) {
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IWorkspaceDescription desc = workspace.getDescription();
- desc.setAutoBuilding(value);
-
- try {
- workspace.setDescription(desc);
- }
- catch (Exception ex) {
- _reporter.reportError(ex);
- }
- }
-
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.ui/src/org/eclipse/gymnast/generator/ui/editor/GymnastEditor.java b/plugins/org.eclipse.gymnast.generator.ui/src/org/eclipse/gymnast/generator/ui/editor/GymnastEditor.java
deleted file mode 100644
index eca7095..0000000
--- a/plugins/org.eclipse.gymnast.generator.ui/src/org/eclipse/gymnast/generator/ui/editor/GymnastEditor.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generator.ui.editor;
-
-import org.eclipse.gymnast.runtime.ui.editor.LDTEditor;
-import org.eclipse.gymnast.runtime.ui.editor.LDTSourceViewerConfiguration;
-
-/**
- * @author cjdaly@us.ibm.com
- *
- */
-public class GymnastEditor extends LDTEditor {
-
- public GymnastEditor( ) {
- // addParseTreeChangedListener(new GymnastParseTreeChangeListener(this));
- }
-
- protected LDTSourceViewerConfiguration createSourceViewerConfiguration() {
- return new GymnastSourceViewerConfiguration(this);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.ui/src/org/eclipse/gymnast/generator/ui/editor/GymnastEditorActionContributor.java b/plugins/org.eclipse.gymnast.generator.ui/src/org/eclipse/gymnast/generator/ui/editor/GymnastEditorActionContributor.java
deleted file mode 100644
index 8f6452e..0000000
--- a/plugins/org.eclipse.gymnast.generator.ui/src/org/eclipse/gymnast/generator/ui/editor/GymnastEditorActionContributor.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generator.ui.editor;
-
-import org.eclipse.gymnast.runtime.ui.editor.LDTEditorActionContributor;
-
-/**
- *
- * @author cjdaly@us.ibm.com
- */
-public class GymnastEditorActionContributor extends LDTEditorActionContributor {
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.ui/src/org/eclipse/gymnast/generator/ui/editor/GymnastSourceViewerConfiguration.java b/plugins/org.eclipse.gymnast.generator.ui/src/org/eclipse/gymnast/generator/ui/editor/GymnastSourceViewerConfiguration.java
deleted file mode 100644
index 537aa16..0000000
--- a/plugins/org.eclipse.gymnast.generator.ui/src/org/eclipse/gymnast/generator/ui/editor/GymnastSourceViewerConfiguration.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generator.ui.editor;
-
-import org.eclipse.gymnast.generator.core.parser.ParserDriver;
-import org.eclipse.gymnast.generator.ui.editor.syntax.GymnastCodeScanner;
-import org.eclipse.gymnast.runtime.core.parser.IParser;
-import org.eclipse.gymnast.runtime.ui.editor.LDTCodeScanner;
-import org.eclipse.gymnast.runtime.ui.editor.LDTEditor;
-import org.eclipse.gymnast.runtime.ui.editor.LDTSourceViewerConfiguration;
-
-
-/**
- * @author cjdaly@us.ibm.com
- *
- */
-public class GymnastSourceViewerConfiguration extends LDTSourceViewerConfiguration {
-
- public GymnastSourceViewerConfiguration(LDTEditor editor) {
- super(editor);
- }
-
- public LDTCodeScanner createCodeScanner() {
- return new GymnastCodeScanner();
- }
-
- public IParser getParser() {
- return new ParserDriver();
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generator.ui/src/org/eclipse/gymnast/generator/ui/editor/syntax/GymnastCodeScanner.java b/plugins/org.eclipse.gymnast.generator.ui/src/org/eclipse/gymnast/generator/ui/editor/syntax/GymnastCodeScanner.java
deleted file mode 100644
index 4755dc3..0000000
--- a/plugins/org.eclipse.gymnast.generator.ui/src/org/eclipse/gymnast/generator/ui/editor/syntax/GymnastCodeScanner.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generator.ui.editor.syntax;
-
-import org.eclipse.gymnast.runtime.ui.editor.LDTCodeScanner;
-import org.eclipse.gymnast.runtime.ui.util.LDTColorProvider;
-import org.eclipse.swt.SWT;
-
-
-/**
- * @author cjdaly@us.ibm.com
- *
- */
-public class GymnastCodeScanner extends LDTCodeScanner {
-
- public void initKeywords() {
- addKeywords(new String[]{"language", "options"}, LDTColorProvider.BLUE);
-
- addKeywords(
- new String[]{"abstract", "container", "interface", "list", "sequence", "token"},
- LDTColorProvider.RED,
- LDTColorProvider.YELLOW,
- SWT.BOLD
- );
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generators.ast.primordial/.classpath b/plugins/org.eclipse.gymnast.generators.ast.primordial/.classpath
deleted file mode 100644
index 751c8f2..0000000
--- a/plugins/org.eclipse.gymnast.generators.ast.primordial/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.gymnast.generators.ast.primordial/.cvsignore b/plugins/org.eclipse.gymnast.generators.ast.primordial/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/plugins/org.eclipse.gymnast.generators.ast.primordial/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/plugins/org.eclipse.gymnast.generators.ast.primordial/.project b/plugins/org.eclipse.gymnast.generators.ast.primordial/.project
deleted file mode 100644
index e837d6d..0000000
--- a/plugins/org.eclipse.gymnast.generators.ast.primordial/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.gymnast.generators.ast.primordial</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/plugins/org.eclipse.gymnast.generators.ast.primordial/META-INF/MANIFEST.MF b/plugins/org.eclipse.gymnast.generators.ast.primordial/META-INF/MANIFEST.MF
deleted file mode 100644
index 65f4ad1..0000000
--- a/plugins/org.eclipse.gymnast.generators.ast.primordial/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,23 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Primordial AST Generator Plug-in (Incubation)
-Bundle-SymbolicName: org.eclipse.gymnast.generators.ast.primordial;singleton:=true
-Bundle-Version: 0.3.0.qualifier
-Bundle-Activator: org.eclipse.gymnast.generators.ast.primordial.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.ui,
- org.eclipse.ui.editors,
- org.eclipse.ui.workbench.texteditor,
- org.eclipse.jface.text,
- org.eclipse.text,
- org.eclipse.jdt.core,
- org.eclipse.gymnast.generator.core,
- org.eclipse.gymnast.runtime.core
-Eclipse-LazyStart: true
-Bundle-ClassPath: .
-Export-Package: org.eclipse.gymnast.generators.ast.primordial,
- org.eclipse.gymnast.generators.ast.primordial.templates,
- org.eclipse.gymnast.generators.ast.primordial.ui
-Bundle-Vendor: Eclipse.org
diff --git a/plugins/org.eclipse.gymnast.generators.ast.primordial/build.properties b/plugins/org.eclipse.gymnast.generators.ast.primordial/build.properties
deleted file mode 100644
index 2fd90e1..0000000
--- a/plugins/org.eclipse.gymnast.generators.ast.primordial/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- templates/
diff --git a/plugins/org.eclipse.gymnast.generators.ast.primordial/plugin.xml b/plugins/org.eclipse.gymnast.generators.ast.primordial/plugin.xml
deleted file mode 100644
index f3b2090..0000000
--- a/plugins/org.eclipse.gymnast.generators.ast.primordial/plugin.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension
- point="org.eclipse.gymnast.generator.core.astGenerators">
- <astGenerator
- class="org.eclipse.gymnast.generators.ast.primordial.PrimordialASTGenerator"
- id="primordial"/>
- </extension>
-
- <extension
- point="org.eclipse.ui.editors.templates">
- <include
- file="templates/javaGen.xml">
- </include>
- </extension>
-
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="Code Templates"
- category="org.eclipse.gymnast.runtime.ui.preferences.GymnastMainPreferencePage"
- class="org.eclipse.gymnast.generators.ast.primordial.ui.GymnastTemplatePreferencePage"
- id="org.eclipse.gymnast.generators.ast.primordial.ui.GymnastTemplatePreferencePage">
- </page>
- </extension>
-
-</plugin>
diff --git a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/ASTCompUnitBuilder.java b/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/ASTCompUnitBuilder.java
deleted file mode 100644
index 09b00f2..0000000
--- a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/ASTCompUnitBuilder.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generators.ast.primordial;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.gymnast.generator.core.generator.GeneratorContext;
-
-/**
- *
- * @author cjdaly@us.ibm.com
- */
-public class ASTCompUnitBuilder extends JavaCompUnitBuilder {
-
- public ASTCompUnitBuilder(String typeName, String templateTypeID, GeneratorContext context) {
- super(typeName, templateTypeID, context);
- }
-
- public IFile getCompUnit() throws Exception {
- IFolder astFolder = (IFolder)_context.getASTPackage().getResource();
- IFile compUnit = astFolder.getFile(getTypeName() + ".java");
- return compUnit;
- }
-
- public void buildDone() {
- _util.ruleDone();
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/ASTRuleCompUnitBuilder.java b/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/ASTRuleCompUnitBuilder.java
deleted file mode 100644
index ac45d9e..0000000
--- a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/ASTRuleCompUnitBuilder.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generators.ast.primordial;
-
-import org.eclipse.gymnast.generator.core.ast.Rule;
-import org.eclipse.gymnast.generator.core.generator.ASTUtil;
-import org.eclipse.gymnast.generator.core.generator.GeneratorContext;
-import org.eclipse.gymnast.generators.ast.primordial.templates.JavaCompUnitTemplateContext;
-import org.eclipse.gymnast.generators.ast.primordial.templates.JavaRuleCompUnitTemplateContext;
-
-
-/**
- *
- * @author cjdaly@us.ibm.com
- */
-public class ASTRuleCompUnitBuilder extends ASTCompUnitBuilder{
-
- private final Rule _rule;
-
- public ASTRuleCompUnitBuilder(Rule rule, GeneratorContext context) {
- super(null, null, context);
- _rule = rule;
- }
-
- public Rule getRule() {
- return _rule;
- }
-
- public String getTypeName() {
- return _util.toUppercaseName(getRuleName());
- }
-
- public String getTemplateTypeID() {
-
- if (ASTUtil.isAbstract(_rule)) {
- return "ASTAbstractRule.cu";
- }
- else if (ASTUtil.isContainer(_rule)) {
- return "ASTContainerRule.cu";
- }
- else if (ASTUtil.isList(_rule)) {
- return "ASTListRule.cu";
- }
- else if (ASTUtil.isSequence(_rule)) {
- return "ASTSequenceRule.cu";
- }
- else if (ASTUtil.isToken(_rule)) {
- return "ASTTokenRule.cu";
- }
- else {
- throw new RuntimeException("Unknown rule type: " + ASTUtil.getName(_rule));
- }
- }
-
- public String getRuleName() {
- return ASTUtil.getName(_rule);
- }
-
- protected JavaCompUnitTemplateContext createTemplateContext() {
- return new JavaRuleCompUnitTemplateContext(getTemplateTypeID(), this, _context);
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/Activator.java b/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/Activator.java
deleted file mode 100644
index c6cf87c..0000000
--- a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/Activator.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package org.eclipse.gymnast.generators.ast.primordial;
-
-import java.io.IOException;
-
-import org.eclipse.gymnast.generators.ast.primordial.templates.GymnastContextType;
-import org.eclipse.jface.text.templates.ContextTypeRegistry;
-import org.eclipse.jface.text.templates.persistence.TemplateStore;
-import org.eclipse.ui.editors.text.templates.ContributionTemplateStore;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.gymnast.generators.ast.primordial";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- private static final String CUSTOM_TEMPLATES_KEY = "org.eclipse.gymnast.generators.ast.primordial.preferences.templates";
-
- public TemplateStore getTemplateStore() {
-
- TemplateStore templateStore = new ContributionTemplateStore(getContextTypeRegistry(), getDefault()
- .getPreferenceStore(), CUSTOM_TEMPLATES_KEY);
-
- try {
- templateStore.load();
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- return templateStore;
- }
-
- private ContextTypeRegistry _contextTypeRegistry;
- public ContextTypeRegistry getContextTypeRegistry() {
- if (_contextTypeRegistry == null) {
- _contextTypeRegistry = new ContextTypeRegistry();
- _contextTypeRegistry.addContextType(GymnastContextType.JavaMethod);
- _contextTypeRegistry.addContextType(GymnastContextType.JavaCompUnit);
- _contextTypeRegistry.addContextType(GymnastContextType.JavaRuleCompUnit);
- }
- return _contextTypeRegistry;
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/BuildManager.java b/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/BuildManager.java
deleted file mode 100644
index 6023bb4..0000000
--- a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/BuildManager.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generators.ast.primordial;
-
-import java.util.ArrayList;
-
-import org.eclipse.gymnast.generator.core.ast.Rule;
-import org.eclipse.gymnast.generator.core.generator.GeneratorContext;
-
-public class BuildManager {
-
- private final GeneratorContext _context;
- private final ArrayList _compUnitBuilderList;
-
- public BuildManager(GeneratorContext context) {
- _context = context;
- _compUnitBuilderList = new ArrayList();
- }
-
- public void createBuilders() throws Exception {
-
- addBuilder(new ASTCompUnitBuilder(_context.getASTBaseClassName(),
- "ASTBaseClass.cu", _context));
- addBuilder(new ASTCompUnitBuilder(_context.getASTTokenClassName(),
- "ASTTokenClass.cu", _context));
- addBuilder(new ASTCompUnitBuilder(_context.getASTVisitorClassName(),
- "ASTVisitorClass.cu", _context));
-
- Rule[] rules = _context.getGrammarInfo().getRules();
- for (int i = 0; i < rules.length; i++) {
- Rule rule = rules[i];
- ASTRuleCompUnitBuilder builder = new ASTRuleCompUnitBuilder(rule, _context);
- addBuilder(builder);
- }
- }
-
- private void addBuilder(JavaCompUnitBuilder builder) {
- _compUnitBuilderList.add(builder);
- }
-
- public void build() throws Exception {
- _context.getUtil().beginRules(_compUnitBuilderList.size());
-
- for (int i = 0; i < _compUnitBuilderList.size(); i++) {
- JavaCompUnitBuilder builder = (JavaCompUnitBuilder)_compUnitBuilderList.get(i);
- builder.build();
- }
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/JavaCompUnitBuilder.java b/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/JavaCompUnitBuilder.java
deleted file mode 100644
index 8977af5..0000000
--- a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/JavaCompUnitBuilder.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generators.ast.primordial;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.gymnast.generator.core.generator.GeneratorContext;
-import org.eclipse.gymnast.generator.core.generator.GeneratorUtil;
-import org.eclipse.gymnast.generators.ast.primordial.templates.JavaCompUnitTemplateContext;
-
-
-
-/**
- *
- * @author cjdaly@us.ibm.com
- */
-public abstract class JavaCompUnitBuilder {
-
- private final String _typeName;
- private final String _templateTypeID;
- protected final GeneratorContext _context;
- protected final GeneratorUtil _util;
-
- public JavaCompUnitBuilder(String typeName, String templateTypeID, GeneratorContext context) {
- _typeName = typeName;
- _templateTypeID = templateTypeID;
- _context = context;
- _util = context.getUtil();
- }
-
- public String getTypeName() {
- return _typeName;
- }
-
- public String getTemplateTypeID() {
- return _templateTypeID;
- }
-
-
- public abstract IFile getCompUnit() throws Exception;
-
- public void build() throws Exception {
- _util.report("Building Type: " + getTypeName());
-
- IFile compUnit = getCompUnit();
-
- String text = evalTemplate();
- if (text == null) {
- _util.reportError("failed to evaluate template!");
- }
- else {
- InputStream inputStream = new ByteArrayInputStream(text.getBytes());
-
- if (compUnit.exists()) {
- compUnit.setContents(inputStream, true, false, null);
- }
- else {
- compUnit.create(inputStream, true, null);
- }
- }
-
- buildDone();
- }
-
- public void buildDone() {
- }
-
- private String evalTemplate() {
- try {
- JavaCompUnitTemplateContext tc = createTemplateContext();
- String s = tc.eval();
- return s;
- }
- catch (Exception ex) {
- _util.reportError(ex);
- return null;
- }
- }
-
- protected JavaCompUnitTemplateContext createTemplateContext() {
- return new JavaCompUnitTemplateContext(getTemplateTypeID(), this, _context);
- }
-}
diff --git a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/PrimordialASTGenerator.java b/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/PrimordialASTGenerator.java
deleted file mode 100644
index b8e0a06..0000000
--- a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/PrimordialASTGenerator.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generators.ast.primordial;
-
-import org.eclipse.gymnast.generator.core.generator.GeneratorContext;
-import org.eclipse.gymnast.generator.core.registry.ASTGenerator;
-
-public class PrimordialASTGenerator extends ASTGenerator {
-
- public void generateAST(GeneratorContext context) throws Exception {
-
- BuildManager buildManager = new BuildManager(context);
- buildManager.createBuilders();
- buildManager.build();
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/ForeachChildElement.java b/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/ForeachChildElement.java
deleted file mode 100644
index efa0a2f..0000000
--- a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/ForeachChildElement.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generators.ast.primordial.templates;
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-import org.eclipse.gymnast.generator.core.generator.GeneratorContext;
-import org.eclipse.gymnast.generator.core.generator.RuleRefCollector;
-import org.eclipse.gymnast.runtime.core.templates.ext.ExtTemplateContext;
-import org.eclipse.gymnast.runtime.core.templates.ext.ExtTemplateContextType;
-import org.eclipse.gymnast.runtime.core.templates.ext.ExtTemplateVariableResolver;
-import org.eclipse.jface.text.templates.TemplateContext;
-
-
-
-/**
- *
- * @author cjdaly@us.ibm.com
- */
-public class ForeachChildElement {
-
- public static final String ID = "foreach_ChildElement";
-
- public static class Resolver extends ExtTemplateVariableResolver.NestedIterator {
- Resolver() {
- super("^"+ID, "iterate over keyword literals in the rule");
- }
-
- protected ExtTemplateContext getNestedContext(TemplateContext outerContext, Iterator iterator, Object iteratorObject) {
- JavaRuleCompUnitTemplateContext c = (JavaRuleCompUnitTemplateContext)outerContext;
- GeneratorContext gc = c.getGeneratorContext();
- RuleRefCollector refs = gc.getGrammarInfo().getRuleRefCollector(c.getRule());
-
- String label = (String)iteratorObject;
- String type = refs.getType(label);
- String childType;
- String childTypeOrToken;
- String initExpr;
- if (gc.getUtil().isTokenReference(type)) {
- childType = gc.getASTTokenClassName();
- childTypeOrToken = "TokenInfo";
- initExpr = "new " + gc.getASTTokenClassName() + "(" + label + ")";
- }
- else {
- childType = gc.getUtil().toUppercaseName(type);
- childTypeOrToken = childType;
- initExpr = label;
- }
-
- Context nc = new Context();
- nc.setVariable("childName", label);
- nc.setVariable("childName_UC", gc.getUtil().toUppercaseName(label));
- nc.setVariable("childType", childType);
- nc.setVariable("childTypeOrToken", childTypeOrToken);
- nc.setVariable("initExpr", initExpr);
- nc.setVariable("comma", iterator.hasNext() ? "," : "");
-
-
- return nc;
- }
-
- protected Iterator getIterator(TemplateContext outerContext) {
- if (!(outerContext instanceof JavaRuleCompUnitTemplateContext)) {
- return null;
- }
-
- JavaRuleCompUnitTemplateContext c = (JavaRuleCompUnitTemplateContext)outerContext;
- GeneratorContext gc = c.getGeneratorContext();
- RuleRefCollector refs = gc.getGrammarInfo().getRuleRefCollector(c.getRule());
- String[] labels = refs.getLabels();
-
- return Arrays.asList(labels).iterator();
- }
- }
-
- public static class Context extends ExtTemplateContext {
- public Context() {
- super(ContextType);
- }
- }
-
- public static final ExtTemplateContextType ContextType =
- new GymnastContextType(ID, ID) {
-
- protected void addResolvers() {
-
- }
- };
-
-}
diff --git a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/ForeachKeywordLiteral.java b/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/ForeachKeywordLiteral.java
deleted file mode 100644
index 8caca4e..0000000
--- a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/ForeachKeywordLiteral.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generators.ast.primordial.templates;
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-import org.eclipse.gymnast.generator.core.generator.GeneratorContext;
-import org.eclipse.gymnast.generator.core.generator.LiteralCollector;
-import org.eclipse.gymnast.runtime.core.templates.ext.ExtTemplateContext;
-import org.eclipse.gymnast.runtime.core.templates.ext.ExtTemplateContextType;
-import org.eclipse.gymnast.runtime.core.templates.ext.ExtTemplateVariableResolver;
-import org.eclipse.jface.text.templates.TemplateContext;
-
-
-
-/**
- *
- * @author cjdaly@us.ibm.com
- */
-public class ForeachKeywordLiteral {
-
- public static final String ID = "foreach_KeywordLiteral";
-
- public static class Resolver extends ExtTemplateVariableResolver.NestedIterator {
- Resolver() {
- super("^"+ID, "iterate over keyword literals in the rule");
- }
-
- protected ExtTemplateContext getNestedContext(TemplateContext outerContext, Iterator iterator, Object iteratorObject) {
- JavaRuleCompUnitTemplateContext c = (JavaRuleCompUnitTemplateContext)outerContext;
- GeneratorContext gc = c.getGeneratorContext();
-
- String literal = (String)iteratorObject;
- String unquoted = gc.getUtil().removeSurroundingQuotes(literal);
-
- Context nc = new Context();
- nc.setVariable("literal", unquoted);
- nc.setVariable("literal_UC", unquoted.toUpperCase());
-
- return nc;
- }
-
- protected Iterator getIterator(TemplateContext outerContext) {
- if (!(outerContext instanceof JavaRuleCompUnitTemplateContext)) {
- return null;
- }
-
- JavaRuleCompUnitTemplateContext c = (JavaRuleCompUnitTemplateContext)outerContext;
- GeneratorContext gc = c.getGeneratorContext();
- String[] literals = new LiteralCollector(c.getRule(), gc).getLiterals();
-
- return Arrays.asList(literals).iterator();
- }
- }
-
- public static class Context extends ExtTemplateContext {
- public Context() {
- super(ContextType);
- }
- }
-
- public static final ExtTemplateContextType ContextType =
- new GymnastContextType(ID, ID) {
-
- protected void addResolvers() {
-
- }
- };
-
-}
diff --git a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/ForeachRule.java b/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/ForeachRule.java
deleted file mode 100644
index 7d099df..0000000
--- a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/ForeachRule.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generators.ast.primordial.templates;
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-import org.eclipse.gymnast.generator.core.ast.Rule;
-import org.eclipse.gymnast.generator.core.generator.ASTUtil;
-import org.eclipse.gymnast.generator.core.generator.GeneratorContext;
-import org.eclipse.gymnast.runtime.core.templates.ext.ExtTemplateContext;
-import org.eclipse.gymnast.runtime.core.templates.ext.ExtTemplateContextType;
-import org.eclipse.gymnast.runtime.core.templates.ext.ExtTemplateVariableResolver;
-import org.eclipse.jface.text.templates.TemplateContext;
-
-
-
-/**
- *
- * @author cjdaly@us.ibm.com
- */
-public class ForeachRule {
-
- public static final String ID = "foreach_Rule";
-
- public static class Resolver extends ExtTemplateVariableResolver.NestedIterator {
- Resolver() {
- super("^"+ID, "iterate over rules in the language");
- }
-
- protected ExtTemplateContext getNestedContext(TemplateContext outerContext, Iterator iterator, Object iteratorObject) {
- JavaCompUnitTemplateContext c = (JavaCompUnitTemplateContext)outerContext;
- GeneratorContext gc = c.getGeneratorContext();
-
- Rule rule = (Rule)iteratorObject;
- String ruleName = ASTUtil.getName(rule);
-
- Context nc = new Context();
- nc.setVariable("ruleName", gc.getUtil().toUppercaseName(ruleName));
- nc.setVariable("ruleName_LC", ruleName);
- nc.setVariable("ruleName_UC", gc.getUtil().toUppercaseName(ruleName));
-
- String ruleBaseClassName = gc.getUtil().getRuleBaseClassName(rule);
- nc.setVariable("ruleBaseClassName", ruleBaseClassName);
- return nc;
- }
-
- protected Iterator getIterator(TemplateContext outerContext) {
- if (!(outerContext instanceof JavaCompUnitTemplateContext)) {
- return null;
- }
-
- JavaCompUnitTemplateContext c = (JavaCompUnitTemplateContext)outerContext;
- GeneratorContext gc = c.getGeneratorContext();
-
- Rule[] rules = gc.getGrammarInfo().getRules();
- return Arrays.asList(rules).iterator();
- }
- }
-
- public static class Context extends ExtTemplateContext {
- public Context() {
- super(ContextType);
- }
- }
-
- public static final ExtTemplateContextType ContextType =
- new GymnastContextType(ID, ID) {
-
- protected void addResolvers() {
-
- }
- };
-
-}
diff --git a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/GymnastContextType.java b/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/GymnastContextType.java
deleted file mode 100644
index 8e153a9..0000000
--- a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/GymnastContextType.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generators.ast.primordial.templates;
-
-import org.eclipse.gymnast.runtime.core.templates.ext.ExtTemplateContextType;
-import org.eclipse.jface.text.templates.GlobalTemplateVariables;
-
-
-/**
- * @author cjdaly@us.ibm.com
- *
- */
-public abstract class GymnastContextType extends ExtTemplateContextType {
-
- public static final String ID_PREFIX = "org.eclipse.gymnast.generators.ast.primordial.templates";
-
- protected GymnastContextType(String idSuffix, String name) {
- super(ID_PREFIX + "." + idSuffix, name);
-
- addResolvers();
- }
-
- protected abstract void addResolvers();
-
- public static final GymnastContextType JavaMethod = new GymnastContextType(
- "JavaMethod", "Java Method") {
-
- protected void addResolvers() {
-
- addResolver(new GymnastTemplateContext.ToolNameResolver());
- addResolver(new GymnastTemplateContext.GeneratedByResolver());
- addResolver(new GymnastTemplateContext.BeginTimeResolver());
- addResolver(new GymnastTemplateContext.ASTFileNameResolver());
- addResolver(new GymnastTemplateContext.ASTNameResolver());
- addResolver(new GymnastTemplateContext.ParserPackageNameResolver());
- addResolver(new GymnastTemplateContext.ASTPackageNameResolver());
- addResolver(new GymnastTemplateContext.ASTBaseClassNameResolver());
- addResolver(new GymnastTemplateContext.ASTBaseClassBaseNameResolver());
- addResolver(new GymnastTemplateContext.ASTTokenClassNameResolver());
- addResolver(new GymnastTemplateContext.ASTVisitorClassNameResolver());
- addResolver(new GymnastTemplateContext.LDT_ASTNodePackageNameResolver());
- addResolver(new GymnastTemplateContext.LDT_ASTNodeClassNameResolver());
- addResolver(new GymnastTemplateContext.LDT_ParserPackageNameResolver());
- addResolver(new GymnastTemplateContext.EntryRuleNameResolver());
- addResolver(new GymnastTemplateContext.EntryRuleClassNameResolver());
-
- addResolver(new JavaMethodTemplateContext.MethodNameResolver());
- addResolver(new JavaMethodTemplateContext.TypeNameResolver());
-
- addResolver(new GlobalTemplateVariables.User());
- addResolver(new GlobalTemplateVariables.Dollar());
- }
- };
-
- public static final GymnastContextType JavaCompUnit = new GymnastContextType(
- "JavaCompUnit", "Java CompilationUnit") {
-
- protected void addResolvers() {
- addResolver(new GymnastTemplateContext.ToolNameResolver());
- addResolver(new GymnastTemplateContext.GeneratedByResolver());
- addResolver(new GymnastTemplateContext.BeginTimeResolver());
- addResolver(new GymnastTemplateContext.ASTFileNameResolver());
- addResolver(new GymnastTemplateContext.ASTNameResolver());
- addResolver(new GymnastTemplateContext.ParserPackageNameResolver());
- addResolver(new GymnastTemplateContext.ASTPackageNameResolver());
- addResolver(new GymnastTemplateContext.ASTBaseClassNameResolver());
- addResolver(new GymnastTemplateContext.ASTBaseClassBaseNameResolver());
- addResolver(new GymnastTemplateContext.ASTTokenClassNameResolver());
- addResolver(new GymnastTemplateContext.ASTVisitorClassNameResolver());
- addResolver(new GymnastTemplateContext.LDT_ASTNodePackageNameResolver());
- addResolver(new GymnastTemplateContext.LDT_ASTNodeClassNameResolver());
- addResolver(new GymnastTemplateContext.LDT_ParserPackageNameResolver());
- addResolver(new GymnastTemplateContext.EntryRuleNameResolver());
- addResolver(new GymnastTemplateContext.EntryRuleClassNameResolver());
-
- addResolver(new JavaCompUnitTemplateContext.TypeNameResolver());
- addResolver(new JavaCompUnitTemplateContext.Visitor_acceptImpl_Resolver());
-
- addResolver(new ForeachRule.Resolver());
-
- addResolver(new GlobalTemplateVariables.User());
- addResolver(new GlobalTemplateVariables.Dollar());
- }
- };
-
- public static final GymnastContextType JavaRuleCompUnit = new GymnastContextType(
- "JavaRuleCompUnit", "Java CompilationUnit for grammar rules") {
-
- protected void addResolvers() {
- addResolver(new GymnastTemplateContext.ToolNameResolver());
- addResolver(new GymnastTemplateContext.GeneratedByResolver());
- addResolver(new GymnastTemplateContext.BeginTimeResolver());
- addResolver(new GymnastTemplateContext.ASTFileNameResolver());
- addResolver(new GymnastTemplateContext.ASTNameResolver());
- addResolver(new GymnastTemplateContext.ParserPackageNameResolver());
- addResolver(new GymnastTemplateContext.ASTPackageNameResolver());
- addResolver(new GymnastTemplateContext.ASTBaseClassNameResolver());
- addResolver(new GymnastTemplateContext.ASTBaseClassBaseNameResolver());
- addResolver(new GymnastTemplateContext.ASTTokenClassNameResolver());
- addResolver(new GymnastTemplateContext.ASTVisitorClassNameResolver());
- addResolver(new GymnastTemplateContext.LDT_ASTNodePackageNameResolver());
- addResolver(new GymnastTemplateContext.LDT_ASTNodeClassNameResolver());
- addResolver(new GymnastTemplateContext.LDT_ParserPackageNameResolver());
- addResolver(new GymnastTemplateContext.EntryRuleNameResolver());
- addResolver(new GymnastTemplateContext.EntryRuleClassNameResolver());
-
- addResolver(new JavaCompUnitTemplateContext.TypeNameResolver());
- addResolver(new JavaCompUnitTemplateContext.Visitor_acceptImpl_Resolver());
-
- addResolver(new JavaRuleCompUnitTemplateContext.ExtendsResolver());
- addResolver(new JavaRuleCompUnitTemplateContext.ImplementsResolver());
- addResolver(new JavaRuleCompUnitTemplateContext.TypeKindResolver());
-
- addResolver(new ForeachKeywordLiteral.Resolver());
- addResolver(new ForeachChildElement.Resolver());
-
- addResolver(new GlobalTemplateVariables.User());
- addResolver(new GlobalTemplateVariables.Dollar());
- }
- };
-
-}
diff --git a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/GymnastTemplateContext.java b/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/GymnastTemplateContext.java
deleted file mode 100644
index a8da620..0000000
--- a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/GymnastTemplateContext.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generators.ast.primordial.templates;
-
-import org.eclipse.gymnast.generator.core.generator.GeneratorContext;
-import org.eclipse.gymnast.generators.ast.primordial.Activator;
-import org.eclipse.gymnast.runtime.core.templates.ext.ExtTemplateContext;
-import org.eclipse.jface.text.templates.Template;
-import org.eclipse.jface.text.templates.TemplateBuffer;
-import org.eclipse.jface.text.templates.TemplateContext;
-import org.eclipse.jface.text.templates.TemplateContextType;
-import org.eclipse.jface.text.templates.TemplateVariableResolver;
-import org.eclipse.jface.text.templates.persistence.TemplateStore;
-
-
-/**
- * @author cjdaly@us.ibm.com
- *
- */
-public abstract class GymnastTemplateContext extends ExtTemplateContext {
-
- private final String _templateID;
- private final GeneratorContext _generatorContext;
-
- protected GymnastTemplateContext(TemplateContextType contextType, String templateID, GeneratorContext generatorContext) {
- super(contextType);
-
- _templateID = templateID;
- _generatorContext = generatorContext;
- }
-
- public String getTemplateID() {
- return _templateID;
- }
-
- public GeneratorContext getGeneratorContext() {
- return _generatorContext;
- }
-
- public String eval() {
- String result = null;
-
- try {
- Template template = getTemplate(_templateID);
- TemplateBuffer buf = evaluate(template);
- result = buf.getString();
- }
- catch (Exception ex) {
- _generatorContext.getUtil().reportError(ex);
- }
-
- return result;
- }
-
- private Template getTemplate(String templateId) {
- TemplateStore templateStore = Activator.getDefault().getTemplateStore();
- return templateStore.findTemplateById(templateId);
- }
-
- static abstract class Resolver extends TemplateVariableResolver {
- Resolver(String type, String description) {
- super(type, description);
- }
-
- protected String resolve(TemplateContext context) {
- String text = null;
- if (context instanceof GymnastTemplateContext) {
- GymnastTemplateContext c = (GymnastTemplateContext)context;
- GeneratorContext gc = c.getGeneratorContext();
- text = resolve(c, gc);
- }
-
- if (text == null) {
- return "${" + this.getType() + "}";
- }
- else {
- return text;
- }
- }
-
- protected abstract String resolve(GymnastTemplateContext c, GeneratorContext gc);
-
- }
-
- static class ToolNameResolver extends Resolver {
- ToolNameResolver() {
- super("toolName", "name of the code generation tool");
- }
-
- protected String resolve(GymnastTemplateContext c, GeneratorContext gc) {
- return gc.getToolName();
- }
- }
-
- static class GeneratedByResolver extends Resolver {
- GeneratedByResolver() {
- super("generatedBy", "\"generated by ...\" message for doc comments");
- }
-
- protected String resolve(GymnastTemplateContext c, GeneratorContext gc) {
- return gc.getGeneratedByText();
- }
- }
-
- static class BeginTimeResolver extends Resolver {
- BeginTimeResolver() {
- super("beginTime", "timestamp indicating when code generation began");
- }
-
- protected String resolve(GymnastTemplateContext c, GeneratorContext gc) {
- return gc.getBeginTimestamp();
- }
- }
-
- static class ASTFileNameResolver extends Resolver {
- ASTFileNameResolver() {
- super("astFileName", "name of the ast input file");
- }
-
- protected String resolve(GymnastTemplateContext c, GeneratorContext gc) {
- return gc.getASTFile().getName();
- }
- }
-
- static class ASTNameResolver extends Resolver {
- ASTNameResolver() {
- super("astName", "name of the AST language");
- }
-
- protected String resolve(GymnastTemplateContext c, GeneratorContext gc) {
- return gc.getASTName();
- }
- }
-
- static class ParserPackageNameResolver extends Resolver {
- ParserPackageNameResolver() {
- super("parserPackageName", "name of the Java package where the parser resides");
- }
-
- protected String resolve(GymnastTemplateContext c, GeneratorContext gc) {
- return gc.getParserPackageName();
- }
- }
-
- static class ASTPackageNameResolver extends Resolver {
- ASTPackageNameResolver() {
- super("astPackageName", "name of the Java package for the AST class heirarchy");
- }
-
- protected String resolve(GymnastTemplateContext c, GeneratorContext gc) {
- return gc.getASTPackageName();
- }
- }
-
- static class ASTBaseClassNameResolver extends Resolver {
- ASTBaseClassNameResolver() {
- super("astBaseClassName", "name of the common base class for members of the AST");
- }
-
- protected String resolve(GymnastTemplateContext c, GeneratorContext gc) {
- return gc.getASTBaseClassName();
- }
- }
-
- static class ASTBaseClassBaseNameResolver extends Resolver {
- ASTBaseClassBaseNameResolver() {
- super("astBaseClassBaseName", "name of the base class for the astBaseClass");
- }
-
- protected String resolve(GymnastTemplateContext c, GeneratorContext gc) {
- return gc.getASTBaseClassBaseName();
- }
- }
-
- static class ASTTokenClassNameResolver extends Resolver {
- ASTTokenClassNameResolver() {
- super("astTokenClassName", "name of the base class for token classes");
- }
-
- protected String resolve(GymnastTemplateContext c, GeneratorContext gc) {
- return gc.getASTTokenClassName();
- }
- }
-
- static class ASTVisitorClassNameResolver extends Resolver {
- ASTVisitorClassNameResolver() {
- super("astVisitorClassName", "name of the visitor class stub");
- }
-
- protected String resolve(GymnastTemplateContext c, GeneratorContext gc) {
- return gc.getASTVisitorClassName();
- }
- }
-
- static class LDT_ASTNodePackageNameResolver extends Resolver {
- LDT_ASTNodePackageNameResolver() {
- super("ldtASTNodePackageName", "name of the package where the LDT ASTNode class resides");
- }
-
- protected String resolve(GymnastTemplateContext c, GeneratorContext gc) {
- return gc.getLDT_ASTNodePackageName();
- }
- }
-
- static class LDT_ASTNodeClassNameResolver extends Resolver {
- LDT_ASTNodeClassNameResolver() {
- super("ldtASTNodeClassName", "name of the LDT ASTNode class");
- }
-
- protected String resolve(GymnastTemplateContext c, GeneratorContext gc) {
- return gc.getLDT_ASTNodePackageName();
- }
- }
-
- static class LDT_ParserPackageNameResolver extends Resolver {
- LDT_ParserPackageNameResolver() {
- super("ldtParserPackageName", "name of the package where the LDT parser class resides");
- }
-
- protected String resolve(GymnastTemplateContext c, GeneratorContext gc) {
- return gc.getLDT_ParserPackageName();
- }
- }
-
- static class EntryRuleNameResolver extends Resolver {
- EntryRuleNameResolver() {
- super("entryRuleName", "name of the rule that represents the entry (parser start) rule");
- }
-
- protected String resolve(GymnastTemplateContext c, GeneratorContext gc) {
- return gc.getEntryRuleName();
- }
- }
-
- static class EntryRuleClassNameResolver extends Resolver {
- EntryRuleClassNameResolver() {
- super("entryRuleClassName", "name of the class that represents the entry (parser start) rule");
- }
-
- protected String resolve(GymnastTemplateContext c, GeneratorContext gc) {
- return gc.getEntryRuleClassName();
- }
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/JavaCompUnitTemplateContext.java b/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/JavaCompUnitTemplateContext.java
deleted file mode 100644
index 50116cd..0000000
--- a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/JavaCompUnitTemplateContext.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generators.ast.primordial.templates;
-
-import org.eclipse.gymnast.generator.core.generator.GeneratorContext;
-import org.eclipse.gymnast.generators.ast.primordial.JavaCompUnitBuilder;
-import org.eclipse.jface.text.templates.TemplateContext;
-import org.eclipse.jface.text.templates.TemplateContextType;
-import org.eclipse.jface.text.templates.TemplateVariableResolver;
-
-
-
-/**
- *
- * @author cjdaly@us.ibm.com
- */
-public class JavaCompUnitTemplateContext extends GymnastTemplateContext {
-
- private final JavaCompUnitBuilder _compUnitBuilder;
-
- public JavaCompUnitTemplateContext(String typeID, JavaCompUnitBuilder compUnitBuilder, GeneratorContext generatorContext) {
- super(GymnastContextType.JavaCompUnit, typeID, generatorContext);
-
- _compUnitBuilder = compUnitBuilder;
- }
-
- public JavaCompUnitTemplateContext(TemplateContextType contextType, String typeID, JavaCompUnitBuilder compUnitBuilder, GeneratorContext generatorContext) {
- super(contextType, typeID, generatorContext);
-
- _compUnitBuilder = compUnitBuilder;
- }
-
- public JavaCompUnitBuilder getCompUnitBuilder() {
- return _compUnitBuilder;
- }
- public String getTypeName() {
- return getCompUnitBuilder().getTypeName();
- }
-
- //
- //
- //
-
- static abstract class Resolver extends TemplateVariableResolver {
- Resolver(String type, String description) {
- super(type, description);
- }
-
- protected String resolve(TemplateContext context) {
- String text = null;
- if (context instanceof JavaCompUnitTemplateContext) {
- JavaCompUnitTemplateContext c = (JavaCompUnitTemplateContext)context;
- GeneratorContext gc = c.getGeneratorContext();
- text = resolve(c, gc);
- }
-
- if (text == null) {
- return "${" + this.getType() + "}";
- }
- else {
- return text;
- }
- }
-
- protected abstract String resolve(JavaCompUnitTemplateContext c, GeneratorContext gc);
- }
-
- static class TypeNameResolver extends Resolver {
-
- TypeNameResolver() {
- super("typeName", "Name of this type");
- }
-
- protected String resolve(JavaCompUnitTemplateContext c, GeneratorContext gc) {
- return c.getTypeName();
- }
- }
-
- static class Visitor_acceptImpl_Resolver extends Resolver {
-
- Visitor_acceptImpl_Resolver() {
- super("ASTVisitorClass_acceptImpl", "acceptImpl method for the visitor framework");
- }
-
- protected String resolve(JavaCompUnitTemplateContext c, GeneratorContext gc) {
- try {
- JavaMethodTemplateContext tc = new JavaMethodTemplateContext(getType(), c.getTypeName(), "acceptImpl", gc);
- String s = tc.eval();
- return s;
- }
- catch (Exception ex) {
- return "";
- }
- }
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/JavaMethodTemplateContext.java b/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/JavaMethodTemplateContext.java
deleted file mode 100644
index 829ca76..0000000
--- a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/JavaMethodTemplateContext.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generators.ast.primordial.templates;
-
-import org.eclipse.gymnast.generator.core.generator.GeneratorContext;
-import org.eclipse.jface.text.templates.TemplateContext;
-import org.eclipse.jface.text.templates.TemplateVariableResolver;
-
-
-/**
- *
- * @author cjdaly@us.ibm.com
- */
-public class JavaMethodTemplateContext extends GymnastTemplateContext {
-
- private final String _typeName;
- private final String _methodName;
-
- public JavaMethodTemplateContext(String templateID, String typeName, String methodName, GeneratorContext generatorContext) {
- super(GymnastContextType.JavaMethod, templateID, generatorContext);
-
- _typeName = typeName;
- _methodName = methodName;
- }
-
- public String getTypeName() {
- return _typeName;
- }
- public String getMethodName() {
- return "ctor".equals(_methodName) ? getTypeName() : _methodName ;
- }
-
- //
- //
- //
-
- static abstract class Resolver extends TemplateVariableResolver {
- Resolver(String type, String description) {
- super(type, description);
- }
-
- protected String resolve(TemplateContext context) {
- String text = null;
- if (context instanceof JavaMethodTemplateContext) {
- JavaMethodTemplateContext c = (JavaMethodTemplateContext)context;
- GeneratorContext gc = c.getGeneratorContext();
- text = resolve(c, gc);
- }
-
- if (text == null) {
- return "${" + this.getType() + "}";
- }
- else {
- return text;
- }
- }
-
- protected abstract String resolve(JavaMethodTemplateContext c, GeneratorContext gc);
- }
-
- static class MethodNameResolver extends Resolver {
-
- MethodNameResolver() {
- super("methodName", "Name of this method");
- }
-
- protected String resolve(JavaMethodTemplateContext c, GeneratorContext gc) {
- return c.getMethodName();
- }
- }
-
- static class TypeNameResolver extends Resolver {
-
- TypeNameResolver() {
- super("typeName", "Name of the type containing this method");
- }
-
- protected String resolve(JavaMethodTemplateContext c, GeneratorContext gc) {
- return c.getTypeName();
- }
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/JavaRuleCompUnitTemplateContext.java b/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/JavaRuleCompUnitTemplateContext.java
deleted file mode 100644
index 930404b..0000000
--- a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/templates/JavaRuleCompUnitTemplateContext.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generators.ast.primordial.templates;
-
-import org.eclipse.gymnast.generator.core.ast.Rule;
-import org.eclipse.gymnast.generator.core.generator.ASTUtil;
-import org.eclipse.gymnast.generator.core.generator.GeneratorContext;
-import org.eclipse.gymnast.generator.core.generator.GeneratorUtil;
-import org.eclipse.gymnast.generators.ast.primordial.ASTRuleCompUnitBuilder;
-import org.eclipse.jface.text.templates.TemplateContext;
-import org.eclipse.jface.text.templates.TemplateVariableResolver;
-
-
-
-/**
- *
- * @author cjdaly@us.ibm.com
- */
-public class JavaRuleCompUnitTemplateContext extends JavaCompUnitTemplateContext {
-
- private ASTRuleCompUnitBuilder _ruleCompUnitBuilder;
- private String _baseClassName;
- private String[] _baseInterfaceNames;
-
- public JavaRuleCompUnitTemplateContext(String typeID, ASTRuleCompUnitBuilder ruleCompUnitBuilder, GeneratorContext generatorContext) {
- super(GymnastContextType.JavaRuleCompUnit, typeID, ruleCompUnitBuilder, generatorContext);
-
- _ruleCompUnitBuilder = ruleCompUnitBuilder;
-
-
- GeneratorContext context = generatorContext;
- GeneratorUtil util = context.getUtil();
- Rule rule = ruleCompUnitBuilder.getRule();
-
- _baseClassName = util.getRuleBaseClassName(rule);
- _baseInterfaceNames = util.getRuleBaseInterfaceNames(rule);
- }
-
- public ASTRuleCompUnitBuilder getRuleCompUnitBuilder() {
- return _ruleCompUnitBuilder;
- }
-
- public Rule getRule() {
- return _ruleCompUnitBuilder.getRule();
- }
-
- public String getRuleName() {
- return _ruleCompUnitBuilder.getRuleName();
- }
-
- public String getBaseClassName() {
- return _baseClassName;
- }
-
- public String[] getBaseInterfaceNames() {
- if (_baseInterfaceNames == null) return null;
- else return (String[])_baseInterfaceNames.clone();
- }
-
- public boolean isAbstract() {
- return ASTUtil.isAbstract(getRule());
- }
- public boolean isInterface() {
- return ASTUtil.isInterface(getRule());
- }
-
- //
- //
- //
-
- static abstract class Resolver extends TemplateVariableResolver {
- Resolver(String type, String description) {
- super(type, description);
- }
-
- protected String resolve(TemplateContext context) {
- String text = null;
- if (context instanceof JavaRuleCompUnitTemplateContext) {
- JavaRuleCompUnitTemplateContext c = (JavaRuleCompUnitTemplateContext)context;
- GeneratorContext gc = c.getGeneratorContext();
- text = resolve(c, gc);
- }
-
- if (text == null) {
- return "${" + this.getType() + "}";
- }
- else {
- return text;
- }
- }
-
- protected abstract String resolve(JavaRuleCompUnitTemplateContext c, GeneratorContext gc);
- }
-
- static class ExtendsResolver extends Resolver {
-
- ExtendsResolver() {
- super("extends", "auto calculate the extends clause");
- }
-
- protected String resolve(JavaRuleCompUnitTemplateContext c, GeneratorContext gc) {
- String baseClassName = c.getBaseClassName();
- if ((baseClassName == null) || "".equals(baseClassName)) {
- return "";
- }
- else {
- return "extends " + baseClassName;
- }
- }
- }
-
- static class ImplementsResolver extends Resolver {
-
- ImplementsResolver() {
- super("implements", "auto calculate the implements clause");
- }
-
- protected String resolve(JavaRuleCompUnitTemplateContext c, GeneratorContext gc) {
- String[] baseInterfaceNames = c.getBaseInterfaceNames();
-
- if ((baseInterfaceNames == null) ||(baseInterfaceNames.length == 0)) {
- return "";
- }
- else {
- StringBuffer sb = new StringBuffer("implements ");
- sb.append(baseInterfaceNames[0]);
- for (int i = 1; i < baseInterfaceNames.length; i++) {
- sb.append(", " + baseInterfaceNames[i]);
- }
- return sb.toString();
- }
- }
- }
-
- static class TypeKindResolver extends Resolver {
-
- TypeKindResolver() {
- super("typeKind", "auto calculate whether the type is an abstract class, normal class or interface");
- }
-
- protected String resolve(JavaRuleCompUnitTemplateContext c, GeneratorContext gc) {
- if (c.isInterface()) {
- return "interface";
- }
- else {
- if (c.isAbstract()) {
- return "abstract class";
- }
- else {
- return "class";
- }
- }
- }
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/ui/GymnastTemplatePreferencePage.java b/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/ui/GymnastTemplatePreferencePage.java
deleted file mode 100644
index ff99d19..0000000
--- a/plugins/org.eclipse.gymnast.generators.ast.primordial/src/org/eclipse/gymnast/generators/ast/primordial/ui/GymnastTemplatePreferencePage.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.gymnast.generators.ast.primordial.ui;
-
-import org.eclipse.gymnast.generators.ast.primordial.Activator;
-import org.eclipse.ui.texteditor.templates.TemplatePreferencePage;
-
-
-/**
- * @author cjdaly@us.ibm.com
- *
- */
-public class GymnastTemplatePreferencePage extends TemplatePreferencePage {
-
- public GymnastTemplatePreferencePage() {
- super();
-
- setPreferenceStore(Activator.getDefault().getPreferenceStore());
- setTemplateStore(Activator.getDefault().getTemplateStore());
- setContextTypeRegistry(Activator.getDefault().getContextTypeRegistry());
- }
-
- protected boolean isShowFormatterSetting() {
- return false;
- }
-
- public boolean performOk() {
- boolean ok = super.performOk();
-
- Activator.getDefault().savePluginPreferences();
-
- return ok;
- }
-
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- setTitle("Gymnast Code Templates");
- }
- }
-
-}
diff --git a/plugins/org.eclipse.gymnast.generators.ast.primordial/templates/javaGen.xml b/plugins/org.eclipse.gymnast.generators.ast.primordial/templates/javaGen.xml
deleted file mode 100644
index 5a07cd6..0000000
--- a/plugins/org.eclipse.gymnast.generators.ast.primordial/templates/javaGen.xml
+++ /dev/null
@@ -1,470 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<templates><template id="ASTAbstractRule.cu" name="ASTAbstractRule.cu" description="ASTAbstractRule CompilationUnit template" context="org.eclipse.gymnast.generators.ast.primordial.templates.JavaRuleCompUnit" enabled="true" deleted="false" autoinsert="true">package ${astPackageName};&#13;
-&#13;
-/**&#13;
- *&#13;
- * ${generatedBy}&#13;
- */&#13;
-public abstract class ${typeName} ${extends} {&#13;
- /**&#13;
- * Construct a new ${typeName}.&#13;
- */&#13;
- public ${typeName}() {&#13;
- super();&#13;
- }&#13;
-&#13;
-${ASTVisitorClass_acceptImpl}&#13;
-&#13;
-}</template><template id="ASTBaseClass.cu" name="ASTBaseClass.cu" description="ASTBaseClass CompilationUnit template" context="org.eclipse.gymnast.generators.ast.primordial.templates.JavaCompUnit" enabled="true" deleted="false" autoinsert="true">package ${astPackageName};&#13;
-&#13;
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;&#13;
-import org.eclipse.gymnast.runtime.core.ast.ASTNodeImpl;&#13;
-import org.eclipse.gymnast.runtime.core.ast.TokenInfo;&#13;
-&#13;
-/**&#13;
- * The superclass of all ASTNodes for language ${astName}.&#13;
- *&#13;
- * ${generatedBy}&#13;
- */&#13;
-public abstract class ${astBaseClassName} extends ${astBaseClassBaseName} {&#13;
-&#13;
- protected ${astBaseClassName} _parent;&#13;
-&#13;
- /**&#13;
- * @return the parent of this ASTNode or null if this is the root node of a tree&#13;
- */&#13;
- public ASTNode getParent() {&#13;
- return _parent;&#13;
- }&#13;
-&#13;
- /**&#13;
- * Construct a new ${astBaseClassName}.&#13;
- */&#13;
- public ${astBaseClassName}() {&#13;
- super();&#13;
- }&#13;
-&#13;
- /**&#13;
- * Construct a new ${astBaseClassName}.&#13;
- *&#13;
- * @param token a Token to initialize the offset and text for this node.&#13;
- */&#13;
- public ${astBaseClassName}(TokenInfo tokenInfo) {&#13;
- super(tokenInfo);&#13;
- }&#13;
-&#13;
- /**&#13;
- * The external entry point used to initiate the visitor on this node.&#13;
- * &#13;
- * @param visitor the Visitor to visit this node tree&#13;
- */&#13;
- public final void accept(${astVisitorClassName} visitor) {&#13;
- visitor.preVisit(this);&#13;
- acceptImpl(visitor);&#13;
- visitor.postVisit(this);&#13;
- }&#13;
-&#13;
- /**&#13;
- * This method can be overridden by subclasses which should provide exactly&#13;
- * the same implementation. Here &lt;code&gt;this&lt;/code&gt; refers to the generic node&#13;
- * class, but in the subclass implementations &lt;code&gt;this&lt;/code&gt; will refer to&#13;
- * the specific subclass type. Thus the correct specific &lt;code&gt;beginVisit&lt;/code&gt;&#13;
- * and &lt;code&gt;endVisit&lt;/code&gt; methods will be invoked for each subclass and the&#13;
- * generic methods will be invoked for subclasses that don't need specific visitor&#13;
- * behavior.&#13;
- */&#13;
- public void acceptImpl(${astVisitorClassName} visitor) {&#13;
- boolean visitChildren = visitor.beginVisit(this);&#13;
- if (visitChildren) visitChildren(visitor);&#13;
- visitor.endVisit(this);&#13;
- }&#13;
-&#13;
- /**&#13;
- * Iterate through the children of this node and accept the visitor on each.&#13;
- */&#13;
- protected void visitChildren(${astVisitorClassName} visitor) {&#13;
- for (int i = 0; i &lt; getChildCount(); i++) {&#13;
- ASTNode child = getChild(i);&#13;
- if (child instanceof ${astBaseClassName}) {&#13;
- ${astBaseClassName} c = (${astBaseClassName})child;&#13;
- c.accept(visitor);&#13;
- }&#13;
- }&#13;
- }&#13;
-&#13;
-}&#13;
-</template><template id="ASTContainerRule.cu" name="ASTContainerRule.cu" description="ASTContainerRule CompilationUnit template" context="org.eclipse.gymnast.generators.ast.primordial.templates.JavaRuleCompUnit" enabled="true" deleted="false" autoinsert="true">package ${astPackageName};&#13;
-&#13;
-import org.eclipse.gymnast.runtime.core.ast.ASTNode;&#13;
-&#13;
-/**&#13;
- *&#13;
- * ${generatedBy}&#13;
- */&#13;
-public ${typeKind} ${typeName} ${extends} ${implements} {&#13;
-&#13;
-${^foreach_KeywordLiteral} public static final String KW_${literal_UC} = "${literal}";&#13;
-${^END}&#13;
-${^foreach_ChildElement} private ${childType} _${childName};&#13;
-${^END}&#13;
-${^foreach_ChildElement} public ${childType} getAs${childName_UC}() {&#13;
- return _${childName};&#13;
- }&#13;
-${^END}&#13;
-&#13;
-${^foreach_ChildElement} public boolean isChild${childName_UC}() {&#13;
- return _${childName} != null;&#13;
- }&#13;
-${^END}&#13;
-&#13;
- /**&#13;
- * @return the number of children of this ASTNode&#13;
- */&#13;
- public int getChildCount() {&#13;
- int count = 0;&#13;
-${^foreach_ChildElement} if (_${childName} != null) count++;&#13;
-${^END}&#13;
- return count;&#13;
- }&#13;
-&#13;
- /**&#13;
- * @param index the index of a child ASTNode to get&#13;
- * @return the child ASTNode at the given index&#13;
- * @throws IndexOutOfBoundsException when the index is out of bounds&#13;
- */&#13;
- public ASTNode getChild(int index) {&#13;
- if (index != 0) throw new IndexOutOfBoundsException();&#13;
-${^foreach_ChildElement} if (_${childName} != null) return _${childName};&#13;
-${^END}&#13;
- throw new IndexOutOfBoundsException();&#13;
- }&#13;
- &#13;
- /**&#13;
- * Construct a new ${typeName}.&#13;
- */&#13;
- public ${typeName}() {&#13;
- super();&#13;
- }&#13;
- &#13;
-${^foreach_ChildElement} public void initAs${childName_UC}(${childTypeOrToken} ${childName}) {&#13;
- if (_${childName}._parent != null) throw new RuntimeException();&#13;
- _${childName}._parent = this;&#13;
- _${childName} = ${childName};&#13;
- }&#13;
-${^END}&#13;
-&#13;
-${ASTVisitorClass_acceptImpl}&#13;
-&#13;
-}&#13;
-</template><template id="ASTListRule.cu" name="ASTListRule.cu" description="ASTListRule CompilationUnit template" context="org.eclipse.gymnast.generators.ast.primordial.templates.JavaRuleCompUnit" enabled="true" deleted="false" aut