// $ANTLR start "project"
// /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteAST.g:50:1: project returns [ToolPlan newPlan] : ^( PROJECT projName= IDENTIFIER planType ( supplierPlans )? ( forward )* ( constantDeclaration[true] )* ( forward )* ( cDataTypeDeclatation[$projName.text] )* ( objectTypeDeclaration[$projName.text] )* ( serviceDeclaration[$projName.text] )* ( cursorDeclaration[$projName.text] )* ( methodImplementation )* ( project_property )* ( include )* ) ;
public final ToolPlan project() throws RecognitionException {
project_stack.push(new project_scope());
ToolPlan newPlan = null;
CommonTree projName=null;
try {
// /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteAST.g:61:3: ( ^( PROJECT projName= IDENTIFIER planType ( supplierPlans )? ( forward )* ( constantDeclaration[true] )* ( forward )* ( cDataTypeDeclatation[$projName.text] )* ( objectTypeDeclaration[$projName.text] )* ( serviceDeclaration[$projName.text] )* ( cursorDeclaration[$projName.text] )* ( methodImplementation )* ( project_property )* ( include )* ) )
// /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteAST.g:61:5: ^( PROJECT projName= IDENTIFIER planType ( supplierPlans )? ( forward )* ( constantDeclaration[true] )* ( forward )* ( cDataTypeDeclatation[$projName.text] )* ( objectTypeDeclaration[$projName.text] )* ( serviceDeclaration[$projName.text] )* ( cursorDeclaration[$projName.text] )* ( methodImplementation )* ( project_property )* ( include )* )
{
match(input,PROJECT,FOLLOW_PROJECT_in_project80); if (state.failed) return newPlan;
match(input, Token.DOWN, null); if (state.failed) return newPlan;
projName=(CommonTree)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_project84); if (state.failed) return newPlan;
if ( state.backtracking==0 ) {
System.out.println("=== ToolPlan: " + (projName!=null?projName.getText():null));
((project_scope)project_stack.peek()).currentPlan = new ToolPlan((projName!=null?projName.getText():null));
((project_scope)project_stack.peek()).currentPlan.setFile((IFile)this.sourceResource);
//addPlanToProject(((project_scope)project_stack.peek()).currentPlan);
}
pushFollow(FOLLOW_planType_in_project95);