net.sourceforge.pmd.lang.modelica.ast.Modelica.jj Maven / Gradle / Ivy
The newest version!
/*@bgen(jjtree) Generated By:JJTree: Do not edit this line. Modelica.jj */
/*@egen*//*
BSD-style license; for more info see http://pmd.sourceforge.net/license.html
Based on Antlr4 Modelica grammar downloaded from https://github.com/antlr/grammars-v4
License of the original modelica.g4:
[The "BSD licence"]
Copyright (c) 2012 Tom Everett
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
options {
CACHE_TOKENS=true;
STATIC = false;
USER_CHAR_STREAM = true;
JDK_VERSION = "1.5";
SUPPORT_CLASS_VISIBILITY_PUBLIC=false;
UNICODE_INPUT = true;
}
PARSER_BEGIN(ModelicaParserImpl)
package net.sourceforge.pmd.lang.modelica.ast;
class ModelicaParserImpl/*@bgen(jjtree)*/implements ModelicaParserImplTreeConstants/*@egen*/ {/*@bgen(jjtree)*/
protected JJTModelicaParserImplState jjtree = new JJTModelicaParserImplState();
/*@egen*/
}
PARSER_END(ModelicaParserImpl)
TOKEN: {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| " >
| =" >
|
| " >
|
|
|
|
|
|
|
|
|
|
}
TOKEN: {
( | )*) | >
| <#Q_IDENT: "\'" ( | )+ "\'">
| <#S_CHAR: ~["\"", "\\"] >
| <#NONDIGIT: [ "_", "a" - "z", "A" - "Z" ]>
| | )* "\"">
| <#Q_CHAR: | | [ "!", "#", "$", "%", "&", "(", ")", "*", "+", ",", "-", ".", "/", ":", ";", "<", ">", "=", "?", "@", "[", "]", "^", "{", "}", "|", "~" ] >
| <#S_ESCAPE: "\\" [ "\u2019", "\'", "\"", "?", "\\", "a", "b", "f", "n", "r", "t", "v" ] >
| <#DIGIT: ["0" - "9"]>
| <#UNSIGNED_INTEGER: ()+ >
| ("." ()?)? (["e", "E"] (["+", "-"])? )?>
}
SKIP: {
|
}
// Copyed from cpp.jj
MORE:
{ "/*" : IN_MULTI_LINE_COMMENT }
SPECIAL_TOKEN:
{ : DEFAULT }
MORE:
{ < ~[] > }
ASTStoredDefinition StoredDefinition(): {/*@bgen(jjtree) StoredDefinition */
ASTStoredDefinition jjtn000 = new ASTStoredDefinition(JJTSTOREDDEFINITION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/}
{/*@bgen(jjtree) StoredDefinition */
try {
/*@egen*/
( {jjtn000.markHasBOM(); } )?
(/*@bgen(jjtree) WithinClause */
{
ASTWithinClause jjtn001 = new ASTWithinClause(JJTWITHINCLAUSE);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
}
try {
/*@egen*/( (Name())? )/*@bgen(jjtree)*/
} catch (Throwable jjte001) {
if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
jjtree.popNode();
}
if (jjte001 instanceof RuntimeException) {
throw (RuntimeException)jjte001;
}
if (jjte001 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte001;
}
throw (Error)jjte001;
} finally {
if (jjtc001) {
jjtree.closeNodeScope(jjtn001, true);
}
}
/*@egen*/ )*
(()? ClassDefinition() )*
/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{ return jjtn000; }/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
void ClassDefinition(): {/*@bgen(jjtree) ClassDefinition */
ASTClassDefinition jjtn000 = new ASTClassDefinition(JJTCLASSDEFINITION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/}
{/*@bgen(jjtree) ClassDefinition */
try {
/*@egen*/
(/*@bgen(jjtree) EncapsulatedClause */
{
ASTEncapsulatedClause jjtn001 = new ASTEncapsulatedClause(JJTENCAPSULATEDCLAUSE);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
}
try {
/*@egen*//*@bgen(jjtree)*/
} finally {
if (jjtc001) {
jjtree.closeNodeScope(jjtn001, true);
}
}
/*@egen*/ )?
ClassPrefixes()
ClassSpecifier()/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
void ClassSpecifier(): {/*@bgen(jjtree) ClassSpecifier */
ASTClassSpecifier jjtn000 = new ASTClassSpecifier(JJTCLASSSPECIFIER);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/}
{/*@bgen(jjtree) ClassSpecifier */
try {
/*@egen*/
LOOKAHEAD(2) LongClassSpecifier()
| LOOKAHEAD(3) DerClassSpecifier()
| ShortClassSpecifier()/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
void ClassPrefixes(): {/*@bgen(jjtree) ClassPrefixes */
ASTClassPrefixes jjtn000 = new ASTClassPrefixes(JJTCLASSPREFIXES);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/}
{/*@bgen(jjtree) ClassPrefixes */
try {
/*@egen*/
(/*@bgen(jjtree) PartialClause */
{
ASTPartialClause jjtn001 = new ASTPartialClause(JJTPARTIALCLAUSE);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
}
try {
/*@egen*//*@bgen(jjtree)*/
} finally {
if (jjtc001) {
jjtree.closeNodeScope(jjtn001, true);
}
}
/*@egen*/ )?
(/*@bgen(jjtree) ClassClause */
{
ASTClassClause jjtn002 = new ASTClassClause(JJTCLASSCLAUSE);
boolean jjtc002 = true;
jjtree.openNodeScope(jjtn002);
}
try {
/*@egen*/
/*@bgen(jjtree)*/
} finally {
if (jjtc002) {
jjtree.closeNodeScope(jjtn002, true);
}
}
/*@egen*/
|/*@bgen(jjtree) ModelClause */
{
ASTModelClause jjtn003 = new ASTModelClause(JJTMODELCLAUSE);
boolean jjtc003 = true;
jjtree.openNodeScope(jjtn003);
}
try {
/*@egen*/ /*@bgen(jjtree)*/
} finally {
if (jjtc003) {
jjtree.closeNodeScope(jjtn003, true);
}
}
/*@egen*/
|/*@bgen(jjtree) RecordClause */
{
ASTRecordClause jjtn004 = new ASTRecordClause(JJTRECORDCLAUSE);
boolean jjtc004 = true;
jjtree.openNodeScope(jjtn004);
}
try {
/*@egen*/ /*@bgen(jjtree)*/
} finally {
if (jjtc004) {
jjtree.closeNodeScope(jjtn004, true);
}
}
/*@egen*/
| LOOKAHEAD(2) (/*@bgen(jjtree) OperatorRecordClause */
{
ASTOperatorRecordClause jjtn005 = new ASTOperatorRecordClause(JJTOPERATORRECORDCLAUSE);
boolean jjtc005 = true;
jjtree.openNodeScope(jjtn005);
}
try {
/*@egen*/ /*@bgen(jjtree)*/
} finally {
if (jjtc005) {
jjtree.closeNodeScope(jjtn005, true);
}
}
/*@egen*/ )
|/*@bgen(jjtree) BlockClause */
{
ASTBlockClause jjtn006 = new ASTBlockClause(JJTBLOCKCLAUSE);
boolean jjtc006 = true;
jjtree.openNodeScope(jjtn006);
}
try {
/*@egen*/ /*@bgen(jjtree)*/
} finally {
if (jjtc006) {
jjtree.closeNodeScope(jjtn006, true);
}
}
/*@egen*/
| LOOKAHEAD(2) (/*@bgen(jjtree) ExpandableConnectorClause */
{
ASTExpandableConnectorClause jjtn007 = new ASTExpandableConnectorClause(JJTEXPANDABLECONNECTORCLAUSE);
boolean jjtc007 = true;
jjtree.openNodeScope(jjtn007);
}
try {
/*@egen*/ /*@bgen(jjtree)*/
} finally {
if (jjtc007) {
jjtree.closeNodeScope(jjtn007, true);
}
}
/*@egen*/ )
|/*@bgen(jjtree) ConnectorClause */
{
ASTConnectorClause jjtn008 = new ASTConnectorClause(JJTCONNECTORCLAUSE);
boolean jjtc008 = true;
jjtree.openNodeScope(jjtn008);
}
try {
/*@egen*/ /*@bgen(jjtree)*/
} finally {
if (jjtc008) {
jjtree.closeNodeScope(jjtn008, true);
}
}
/*@egen*/
|/*@bgen(jjtree) TypeClause */
{
ASTTypeClause jjtn009 = new ASTTypeClause(JJTTYPECLAUSE);
boolean jjtc009 = true;
jjtree.openNodeScope(jjtn009);
}
try {
/*@egen*/ /*@bgen(jjtree)*/
} finally {
if (jjtc009) {
jjtree.closeNodeScope(jjtn009, true);
}
}
/*@egen*/
|/*@bgen(jjtree) PackageClause */
{
ASTPackageClause jjtn010 = new ASTPackageClause(JJTPACKAGECLAUSE);
boolean jjtc010 = true;
jjtree.openNodeScope(jjtn010);
}
try {
/*@egen*/ /*@bgen(jjtree)*/
} finally {
if (jjtc010) {
jjtree.closeNodeScope(jjtn010, true);
}
}
/*@egen*/
| LOOKAHEAD(3)/*@bgen(jjtree) FunctionClause */
{
ASTFunctionClause jjtn014 = new ASTFunctionClause(JJTFUNCTIONCLAUSE);
boolean jjtc014 = true;
jjtree.openNodeScope(jjtn014);
}
try {
/*@egen*/ ((/*@bgen(jjtree) PureClause */
{
ASTPureClause jjtn011 = new ASTPureClause(JJTPURECLAUSE);
boolean jjtc011 = true;
jjtree.openNodeScope(jjtn011);
}
try {
/*@egen*//*@bgen(jjtree)*/
} finally {
if (jjtc011) {
jjtree.closeNodeScope(jjtn011, true);
}
}
/*@egen*/ |/*@bgen(jjtree) ImpureClause */
{
ASTImpureClause jjtn012 = new ASTImpureClause(JJTIMPURECLAUSE);
boolean jjtc012 = true;
jjtree.openNodeScope(jjtn012);
}
try {
/*@egen*/ /*@bgen(jjtree)*/
} finally {
if (jjtc012) {
jjtree.closeNodeScope(jjtn012, true);
}
}
/*@egen*/ )? (/*@bgen(jjtree) OperatorClause */
{
ASTOperatorClause jjtn013 = new ASTOperatorClause(JJTOPERATORCLAUSE);
boolean jjtc013 = true;
jjtree.openNodeScope(jjtn013);
}
try {
/*@egen*//*@bgen(jjtree)*/
} finally {
if (jjtc013) {
jjtree.closeNodeScope(jjtn013, true);
}
}
/*@egen*/ )? )/*@bgen(jjtree)*/
} finally {
if (jjtc014) {
jjtree.closeNodeScope(jjtn014, true);
}
}
/*@egen*/
|/*@bgen(jjtree) Operator */
{
ASTOperator jjtn015 = new ASTOperator(JJTOPERATOR);
boolean jjtc015 = true;
jjtree.openNodeScope(jjtn015);
}
try {
/*@egen*/ /*@bgen(jjtree)*/
} finally {
if (jjtc015) {
jjtree.closeNodeScope(jjtn015, true);
}
}
/*@egen*/
)/*@bgen(jjtree)*/
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
void LongClassSpecifier() : {}
{/*@bgen(jjtree) SimpleLongClassSpecifier */
{
ASTSimpleLongClassSpecifier jjtn001 = new ASTSimpleLongClassSpecifier(JJTSIMPLELONGCLASSSPECIFIER);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
}
try {
/*@egen*/
(
SimpleName()
StringComment()
Composition()
SimpleName()
)/*@bgen(jjtree)*/
} catch (Throwable jjte001) {
if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
jjtree.popNode();
}
if (jjte001 instanceof RuntimeException) {
throw (RuntimeException)jjte001;
}
if (jjte001 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte001;
}
throw (Error)jjte001;
} finally {
if (jjtc001) {
jjtree.closeNodeScope(jjtn001, true);
}
}
/*@egen*/
|/*@bgen(jjtree) ExtendingLongClassSpecifier */
{
ASTExtendingLongClassSpecifier jjtn002 = new ASTExtendingLongClassSpecifier(JJTEXTENDINGLONGCLASSSPECIFIER);
boolean jjtc002 = true;
jjtree.openNodeScope(jjtn002);
}
try {
/*@egen*/ (
SimpleName()
(ClassModification())?
StringComment()
Composition()
SimpleName()
)/*@bgen(jjtree)*/
} catch (Throwable jjte002) {
if (jjtc002) {
jjtree.clearNodeScope(jjtn002);
jjtc002 = false;
} else {
jjtree.popNode();
}
if (jjte002 instanceof RuntimeException) {
throw (RuntimeException)jjte002;
}
if (jjte002 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte002;
}
throw (Error)jjte002;
} finally {
if (jjtc002) {
jjtree.closeNodeScope(jjtn002, true);
}
}
/*@egen*/
}
void ShortClassSpecifier() : {}
{
LOOKAHEAD(3)/*@bgen(jjtree) SimpleShortClassSpecifier */
{
ASTSimpleShortClassSpecifier jjtn001 = new ASTSimpleShortClassSpecifier(JJTSIMPLESHORTCLASSSPECIFIER);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
}
try {
/*@egen*/ (
SimpleName()
BasePrefix()
Name()
(ArraySubscripts())?
(ClassModification())?
Comment()
)/*@bgen(jjtree)*/
} catch (Throwable jjte001) {
if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
jjtree.popNode();
}
if (jjte001 instanceof RuntimeException) {
throw (RuntimeException)jjte001;
}
if (jjte001 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte001;
}
throw (Error)jjte001;
} finally {
if (jjtc001) {
jjtree.closeNodeScope(jjtn001, true);
}
}
/*@egen*/
|/*@bgen(jjtree) EnumerationShortClassSpecifier */
{
ASTEnumerationShortClassSpecifier jjtn002 = new ASTEnumerationShortClassSpecifier(JJTENUMERATIONSHORTCLASSSPECIFIER);
boolean jjtc002 = true;
jjtree.openNodeScope(jjtn002);
}
try {
/*@egen*/ (
SimpleName()
(
| (EnumList())?
)
Comment()
)/*@bgen(jjtree)*/
} catch (Throwable jjte002) {
if (jjtc002) {
jjtree.clearNodeScope(jjtn002);
jjtc002 = false;
} else {
jjtree.popNode();
}
if (jjte002 instanceof RuntimeException) {
throw (RuntimeException)jjte002;
}
if (jjte002 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte002;
}
throw (Error)jjte002;
} finally {
if (jjtc002) {
jjtree.closeNodeScope(jjtn002, true);
}
}
/*@egen*/
}
void DerClassSpecifier(): {/*@bgen(jjtree) DerClassSpecifier */
ASTDerClassSpecifier jjtn000 = new ASTDerClassSpecifier(JJTDERCLASSSPECIFIER);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/}
{/*@bgen(jjtree) DerClassSpecifier */
try {
/*@egen*/
SimpleName()
/*@bgen(jjtree) DerClause */
{
ASTDerClause jjtn001 = new ASTDerClause(JJTDERCLAUSE);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
}
try {
/*@egen*/
(
Name()
(
SimpleName()
)*
)/*@bgen(jjtree)*/
} catch (Throwable jjte001) {
if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
jjtree.popNode();
}
if (jjte001 instanceof RuntimeException) {
throw (RuntimeException)jjte001;
}
if (jjte001 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte001;
}
throw (Error)jjte001;
} finally {
if (jjtc001) {
jjtree.closeNodeScope(jjtn001, true);
}
}
/*@egen*/
Comment()/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
void BasePrefix(): {/*@bgen(jjtree) BasePrefix */
ASTBasePrefix jjtn000 = new ASTBasePrefix(JJTBASEPREFIX);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/}
{/*@bgen(jjtree) BasePrefix */
try {
/*@egen*/
TypePrefix()/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
void EnumList(): {/*@bgen(jjtree) EnumList */
ASTEnumList jjtn000 = new ASTEnumList(JJTENUMLIST);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/}
{/*@bgen(jjtree) EnumList */
try {
/*@egen*/
EnumerationLiteral()
(
EnumerationLiteral()
)*/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
void EnumerationLiteral(): {/*@bgen(jjtree) EnumerationLiteral */
ASTEnumerationLiteral jjtn000 = new ASTEnumerationLiteral(JJTENUMERATIONLITERAL);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/}
{/*@bgen(jjtree) EnumerationLiteral */
try {
/*@egen*/
SimpleName()
Comment()/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
void Composition(): {/*@bgen(jjtree) Composition */
ASTComposition jjtn000 = new ASTComposition(JJTCOMPOSITION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/}
{/*@bgen(jjtree) Composition */
try {
/*@egen*/
ElementList(Visibility.UNSPEC)
(
( ElementList(Visibility.PUBLIC))
| ( ElementList(Visibility.PROTECTED))
| LOOKAHEAD(2) EquationSection()
| LOOKAHEAD(2) AlgorithmSection()
)*
(/*@bgen(jjtree) ExternalClause */
{
ASTExternalClause jjtn001 = new ASTExternalClause(JJTEXTERNALCLAUSE);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
}
try {
/*@egen*/(
(LanguageSpecification())?
(ExternalFunctionCall())?
(Annotation())?
)/*@bgen(jjtree)*/
} catch (Throwable jjte001) {
if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
jjtree.popNode();
}
if (jjte001 instanceof RuntimeException) {
throw (RuntimeException)jjte001;
}
if (jjte001 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte001;
}
throw (Error)jjte001;
} finally {
if (jjtc001) {
jjtree.closeNodeScope(jjtn001, true);
}
}
/*@egen*/ )?
(
Annotation()
)?/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
void LanguageSpecification():
{/*@bgen(jjtree) LanguageSpecification */
ASTLanguageSpecification jjtn000 = new ASTLanguageSpecification(JJTLANGUAGESPECIFICATION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/
net.sourceforge.pmd.lang.ast.impl.javacc.JavaccToken t;
}
{/*@bgen(jjtree) LanguageSpecification */
try {
/*@egen*/
t = /*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{ jjtn000.setExternalLanguage(t.getImage()); }/*@bgen(jjtree)*/
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
void ExternalFunctionCall(): {/*@bgen(jjtree) ExternalFunctionCall */
ASTExternalFunctionCall jjtn000 = new ASTExternalFunctionCall(JJTEXTERNALFUNCTIONCALL);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/}
{/*@bgen(jjtree) ExternalFunctionCall */
try {
/*@egen*/
(
LOOKAHEAD(2) ComponentReference()
)?
SimpleName()
(ExpressionList())?
/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
void ElementList(Visibility v): {/*@bgen(jjtree) ElementList */
ASTElementList jjtn000 = new ASTElementList(JJTELEMENTLIST);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/}
{/*@bgen(jjtree) ElementList */
try {
/*@egen*/
{ jjtn000.setVisibility(v); }
(
Element()
)*/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
void Element() : {}
{
ImportClause()
| ExtendsClause()
|/*@bgen(jjtree) RegularElement */
{
ASTRegularElement jjtn006 = new ASTRegularElement(JJTREGULARELEMENT);
boolean jjtc006 = true;
jjtree.openNodeScope(jjtn006);
}
try {
/*@egen*/ (
(/*@bgen(jjtree) RedeclareClause */
{
ASTRedeclareClause jjtn001 = new ASTRedeclareClause(JJTREDECLARECLAUSE);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
}
try {
/*@egen*//*@bgen(jjtree)*/
} finally {
if (jjtc001) {
jjtree.closeNodeScope(jjtn001, true);
}
}
/*@egen*/ )?
(/*@bgen(jjtree) FinalClause */
{
ASTFinalClause jjtn002 = new ASTFinalClause(JJTFINALCLAUSE);
boolean jjtc002 = true;
jjtree.openNodeScope(jjtn002);
}
try {
/*@egen*//*@bgen(jjtree)*/
} finally {
if (jjtc002) {
jjtree.closeNodeScope(jjtn002, true);
}
}
/*@egen*/ )?
(/*@bgen(jjtree) InnerClause */
{
ASTInnerClause jjtn003 = new ASTInnerClause(JJTINNERCLAUSE);
boolean jjtc003 = true;
jjtree.openNodeScope(jjtn003);
}
try {
/*@egen*//*@bgen(jjtree)*/
} finally {
if (jjtc003) {
jjtree.closeNodeScope(jjtn003, true);
}
}
/*@egen*/ )?
(/*@bgen(jjtree) OuterClause */
{
ASTOuterClause jjtn004 = new ASTOuterClause(JJTOUTERCLAUSE);
boolean jjtc004 = true;
jjtree.openNodeScope(jjtn004);
}
try {
/*@egen*//*@bgen(jjtree)*/
} finally {
if (jjtc004) {
jjtree.closeNodeScope(jjtn004, true);
}
}
/*@egen*/ )?
(
(ClassDefinition() | ComponentClause())
|/*@bgen(jjtree) ReplaceableClause */
{
ASTReplaceableClause jjtn005 = new ASTReplaceableClause(JJTREPLACEABLECLAUSE);
boolean jjtc005 = true;
jjtree.openNodeScope(jjtn005);
}
try {
/*@egen*/ ( (ClassDefinition() | ComponentClause()) (ConstrainingClause() Comment())?)/*@bgen(jjtree)*/
} catch (Throwable jjte005) {
if (jjtc005) {
jjtree.clearNodeScope(jjtn005);
jjtc005 = false;
} else {
jjtree.popNode();
}
if (jjte005 instanceof RuntimeException) {
throw (RuntimeException)jjte005;
}
if (jjte005 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte005;
}
throw (Error)jjte005;
} finally {
if (jjtc005) {
jjtree.closeNodeScope(jjtn005, true);
}
}
/*@egen*/
)
)/*@bgen(jjtree)*/
} catch (Throwable jjte006) {
if (jjtc006) {
jjtree.clearNodeScope(jjtn006);
jjtc006 = false;
} else {
jjtree.popNode();
}
if (jjte006 instanceof RuntimeException) {
throw (RuntimeException)jjte006;
}
if (jjte006 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte006;
}
throw (Error)jjte006;
} finally {
if (jjtc006) {
jjtree.closeNodeScope(jjtn006, true);
}
}
/*@egen*/
}
void ImportClause(): {/*@bgen(jjtree) ImportClause */
ASTImportClause jjtn000 = new ASTImportClause(JJTIMPORTCLAUSE);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/}
{/*@bgen(jjtree) ImportClause */
try {
/*@egen*/
(
LOOKAHEAD(2)/*@bgen(jjtree) RenamingImportClause */
{
ASTRenamingImportClause jjtn001 = new ASTRenamingImportClause(JJTRENAMINGIMPORTCLAUSE);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
}
try {
/*@egen*/ (SimpleName() Name())/*@bgen(jjtree)*/
} catch (Throwable jjte001) {
if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
jjtree.popNode();
}
if (jjte001 instanceof RuntimeException) {
throw (RuntimeException)jjte001;
}
if (jjte001 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte001;
}
throw (Error)jjte001;
} finally {
if (jjtc001) {
jjtree.closeNodeScope(jjtn001, true);
}
}
/*@egen*/
| LOOKAHEAD(Name() (( ) | ))/*@bgen(jjtree) UnqualifiedImportClause */
{
ASTUnqualifiedImportClause jjtn002 = new ASTUnqualifiedImportClause(JJTUNQUALIFIEDIMPORTCLAUSE);
boolean jjtc002 = true;
jjtree.openNodeScope(jjtn002);
}
try {
/*@egen*/ (Name() (( ) | ))/*@bgen(jjtree)*/
} catch (Throwable jjte002) {
if (jjtc002) {
jjtree.clearNodeScope(jjtn002);
jjtc002 = false;
} else {
jjtree.popNode();
}
if (jjte002 instanceof RuntimeException) {
throw (RuntimeException)jjte002;
}
if (jjte002 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte002;
}
throw (Error)jjte002;
} finally {
if (jjtc002) {
jjtree.closeNodeScope(jjtn002, true);
}
}
/*@egen*/
| LOOKAHEAD(Name() )/*@bgen(jjtree) MultipleDefinitionImportClause */
{
ASTMultipleDefinitionImportClause jjtn003 = new ASTMultipleDefinitionImportClause(JJTMULTIPLEDEFINITIONIMPORTCLAUSE);
boolean jjtc003 = true;
jjtree.openNodeScope(jjtn003);
}
try {
/*@egen*/ ((Name() ImportList()) )/*@bgen(jjtree)*/
} catch (Throwable jjte003) {
if (jjtc003) {
jjtree.clearNodeScope(jjtn003);
jjtc003 = false;
} else {
jjtree.popNode();
}
if (jjte003 instanceof RuntimeException) {
throw (RuntimeException)jjte003;
}
if (jjte003 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte003;
}
throw (Error)jjte003;
} finally {
if (jjtc003) {
jjtree.closeNodeScope(jjtn003, true);
}
}
/*@egen*/
|/*@bgen(jjtree) SingleDefinitionImportClause */
{
ASTSingleDefinitionImportClause jjtn004 = new ASTSingleDefinitionImportClause(JJTSINGLEDEFINITIONIMPORTCLAUSE);
boolean jjtc004 = true;
jjtree.openNodeScope(jjtn004);
}
try {
/*@egen*/ Name()/*@bgen(jjtree)*/
} catch (Throwable jjte004) {
if (jjtc004) {
jjtree.clearNodeScope(jjtn004);
jjtc004 = false;
} else {
jjtree.popNode();
}
if (jjte004 instanceof RuntimeException) {
throw (RuntimeException)jjte004;
}
if (jjte004 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte004;
}
throw (Error)jjte004;
} finally {
if (jjtc004) {
jjtree.closeNodeScope(jjtn004, true);
}
}
/*@egen*/
)
Comment()/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
void ImportList(): {/*@bgen(jjtree) ImportList */
ASTImportList jjtn000 = new ASTImportList(JJTIMPORTLIST);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/}
{/*@bgen(jjtree) ImportList */
try {
/*@egen*/
SimpleName()
(
SimpleName()
)*/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
void ExtendsClause(): {/*@bgen(jjtree) ExtendsClause */
ASTExtendsClause jjtn000 = new ASTExtendsClause(JJTEXTENDSCLAUSE);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/}
{/*@bgen(jjtree) ExtendsClause */
try {
/*@egen*/
Name()
(ClassModification())?
(Annotation())?/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
void ConstrainingClause(): {/*@bgen(jjtree) ConstrainingClause */
ASTConstrainingClause jjtn000 = new ASTConstrainingClause(JJTCONSTRAININGCLAUSE);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/}
{/*@bgen(jjtree) ConstrainingClause */
try {
/*@egen*/
Name()
(ClassModification())?/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
void ComponentClause(): {/*@bgen(jjtree) ComponentClause */
ASTComponentClause jjtn000 = new ASTComponentClause(JJTCOMPONENTCLAUSE);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/}
{/*@bgen(jjtree) ComponentClause */
try {
/*@egen*/
TypePrefix()
TypeSpecifier()
(ArraySubscripts())?
ComponentList()/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
void TypePrefix(): {/*@bgen(jjtree) TypePrefix */
ASTTypePrefix jjtn000 = new ASTTypePrefix(JJTTYPEPREFIX);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/}
{/*@bgen(jjtree) TypePrefix */
try {
/*@egen*/
(/*@bgen(jjtree) FlowClause */
{
ASTFlowClause jjtn001 = new ASTFlowClause(JJTFLOWCLAUSE);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
}
try {
/*@egen*//*@bgen(jjtree)*/
} finally {
if (jjtc001) {
jjtree.closeNodeScope(jjtn001, true);
}
}
/*@egen*/ |/*@bgen(jjtree) StreamClause */
{
ASTStreamClause jjtn002 = new ASTStreamClause(JJTSTREAMCLAUSE);
boolean jjtc002 = true;
jjtree.openNodeScope(jjtn002);
}
try {
/*@egen*/ /*@bgen(jjtree)*/
} finally {
if (jjtc002) {
jjtree.closeNodeScope(jjtn002, true);
}
}
/*@egen*/ )?
(/*@bgen(jjtree) DiscreteClause */
{
ASTDiscreteClause jjtn003 = new ASTDiscreteClause(JJTDISCRETECLAUSE);
boolean jjtc003 = true;
jjtree.openNodeScope(jjtn003);
}
try {
/*@egen*//*@bgen(jjtree)*/
} finally {
if (jjtc003) {
jjtree.closeNodeScope(jjtn003, true);
}
}
/*@egen*/ |/*@bgen(jjtree) ParameterClause */
{
ASTParameterClause jjtn004 = new ASTParameterClause(JJTPARAMETERCLAUSE);
boolean jjtc004 = true;
jjtree.openNodeScope(jjtn004);
}
try {
/*@egen*/ /*@bgen(jjtree)*/
} finally {
if (jjtc004) {
jjtree.closeNodeScope(jjtn004, true);
}
}
/*@egen*/ |/*@bgen(jjtree) ConstantClause */
{
ASTConstantClause jjtn005 = new ASTConstantClause(JJTCONSTANTCLAUSE);
boolean jjtc005 = true;
jjtree.openNodeScope(jjtn005);
}
try {
/*@egen*/ /*@bgen(jjtree)*/
} finally {
if (jjtc005) {
jjtree.closeNodeScope(jjtn005, true);
}
}
/*@egen*/ )?
(/*@bgen(jjtree) InputClause */
{
ASTInputClause jjtn006 = new ASTInputClause(JJTINPUTCLAUSE);
boolean jjtc006 = true;
jjtree.openNodeScope(jjtn006);
}
try {
/*@egen*//*@bgen(jjtree)*/
} finally {
if (jjtc006) {
jjtree.closeNodeScope(jjtn006, true);
}
}
/*@egen*/ |/*@bgen(jjtree) OutputClause */
{
ASTOutputClause jjtn007 = new ASTOutputClause(JJTOUTPUTCLAUSE);
boolean jjtc007 = true;
jjtree.openNodeScope(jjtn007);
}
try {
/*@egen*/