nescemitter.java

来自「plugin for eclipse」· Java 代码 · 共 2,918 行 · 第 1/5 页

JAVA
2,918
字号
			}
			{
			int _cnt1107=0;
			_loop1107:
			do {
				if (_t==null) _t=ASTNULL;
				if ((_t.getType()==SEMI)) {
					s = (TNode)_t;
					match(_t,SEMI);
					_t = _t.getNextSibling();
					if ( inputState.guessing==0 ) {
						print( s );  newline();
					}
				}
				else {
					if ( _cnt1107>=1 ) { break _loop1107; } else {throw new NoViableAltException(_t);}
				}
				
				_cnt1107++;
			} while (true);
			}
			_t = __t1104;
			_t = _t.getNextSibling();
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				if (_t!=null) {_t = _t.getNextSibling();}
			} else {
			  throw ex;
			}
		}
		_retTree = _t;
	}
	
	public final void interfaceIdentifier(AST _t) throws RecognitionException {
		
		TNode interfaceIdentifier_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
		TNode i = null;
		TNode a = null;
		TNode r = null;
		
		try {      // for error handling
			{
			i = (TNode)_t;
			match(_t,ID);
			_t = _t.getNextSibling();
			if ( inputState.guessing==0 ) {
				print( i );
			}
			{
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case LITERAL_as:
			{
				a = (TNode)_t;
				match(_t,LITERAL_as);
				_t = _t.getNextSibling();
				if ( inputState.guessing==0 ) {
					print( a );
				}
				r = (TNode)_t;
				match(_t,ID);
				_t = _t.getNextSibling();
				if ( inputState.guessing==0 ) {
					print( r );
				}
				break;
			}
			case 3:
			case RCURLY:
			case LBRACKET:
			case NDeclaration:
			case LITERAL_interface:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
			}
			}
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				if (_t!=null) {_t = _t.getNextSibling();}
			} else {
			  throw ex;
			}
		}
		_retTree = _t;
	}
	
	public final void interfaceParameters(AST _t) throws RecognitionException {
		
		TNode interfaceParameters_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
		TNode l = null;
		TNode r = null;
		
		try {      // for error handling
			l = (TNode)_t;
			match(_t,LBRACKET);
			_t = _t.getNextSibling();
			if ( inputState.guessing==0 ) {
				print( l );
			}
			parameterTypeList(_t);
			_t = _retTree;
			r = (TNode)_t;
			match(_t,RBRACKET);
			_t = _t.getNextSibling();
			if ( inputState.guessing==0 ) {
				print( r );
			}
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				if (_t!=null) {_t = _t.getNextSibling();}
			} else {
			  throw ex;
			}
		}
		_retTree = _t;
	}
	
	public final void parameterTypeList(AST _t) throws RecognitionException {
		
		TNode parameterTypeList_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
		TNode c = null;
		TNode s = null;
		TNode v = null;
		
		try {      // for error handling
			{
			int _cnt1215=0;
			_loop1215:
			do {
				if (_t==null) _t=ASTNULL;
				if ((_t.getType()==NParameterDeclaration)) {
					parameterDeclaration(_t);
					_t = _retTree;
					{
					if (_t==null) _t=ASTNULL;
					switch ( _t.getType()) {
					case COMMA:
					{
						c = (TNode)_t;
						match(_t,COMMA);
						_t = _t.getNextSibling();
						if ( inputState.guessing==0 ) {
							print( c );
						}
						break;
					}
					case SEMI:
					{
						s = (TNode)_t;
						match(_t,SEMI);
						_t = _t.getNextSibling();
						if ( inputState.guessing==0 ) {
							print( s );
						}
						break;
					}
					case RPAREN:
					case RBRACKET:
					case VARARGS:
					case NParameterDeclaration:
					{
						break;
					}
					default:
					{
						throw new NoViableAltException(_t);
					}
					}
					}
				}
				else {
					if ( _cnt1215>=1 ) { break _loop1215; } else {throw new NoViableAltException(_t);}
				}
				
				_cnt1215++;
			} while (true);
			}
			{
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case VARARGS:
			{
				v = (TNode)_t;
				match(_t,VARARGS);
				_t = _t.getNextSibling();
				if ( inputState.guessing==0 ) {
					print( v );
				}
				break;
			}
			case RPAREN:
			case RBRACKET:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
			}
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				if (_t!=null) {_t = _t.getNextSibling();}
			} else {
			  throw ex;
			}
		}
		_retTree = _t;
	}
	
	public final void externalDef(AST _t) throws RecognitionException {
		
		TNode externalDef_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
		TNode s = null;
		
		try {      // for error handling
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case NDeclaration:
			{
				declaration(_t);
				_t = _retTree;
				break;
			}
			case NFunctionDef:
			{
				functionDef(_t);
				_t = _retTree;
				break;
			}
			case LITERAL_asm:
			{
				asm_expr(_t);
				_t = _retTree;
				break;
			}
			case NTypeMissing:
			{
				typelessDeclaration(_t);
				_t = _retTree;
				break;
			}
			case SEMI:
			{
				s = (TNode)_t;
				match(_t,SEMI);
				_t = _t.getNextSibling();
				if ( inputState.guessing==0 ) {
					print( s );  newline();
				}
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				if (_t!=null) {_t = _t.getNextSibling();}
			} else {
			  throw ex;
			}
		}
		_retTree = _t;
	}
	
	public final void textNode(AST _t) throws RecognitionException {
		
		TNode textNode_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
		TNode n = null;
		
		try {      // for error handling
			n = (TNode)_t;
			match(_t,NText);
			_t = _t.getNextSibling();
			if ( inputState.guessing==0 ) {
				print( n );
			}
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				if (_t!=null) {_t = _t.getNextSibling();}
			} else {
			  throw ex;
			}
		}
		_retTree = _t;
	}
	
	public final void functionDef(AST _t) throws RecognitionException {
		
		TNode functionDef_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
		TNode v = null;
		
		try {      // for error handling
			AST __t1221 = _t;
			TNode tmp6_AST_in = (TNode)_t;
			match(_t,NFunctionDef);
			_t = _t.getFirstChild();
			{
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case LITERAL_volatile:
			case LITERAL_struct:
			case LITERAL_union:
			case LITERAL_enum:
			case LITERAL_extern:
			case LITERAL_static:
			case LITERAL_const:
			case LITERAL_void:
			case LITERAL_char:
			case LITERAL_short:
			case LITERAL_int:
			case LITERAL_long:
			case LITERAL_float:
			case LITERAL_double:
			case LITERAL_signed:
			case LITERAL_unsigned:
			case LITERAL_default:
			case NTypedefName:
			case LITERAL_inline:
			case LITERAL_typeof:
			case LITERAL___complex:
			case LITERAL_async:
			case LITERAL_command:
			case LITERAL_event:
			case LITERAL_task:
			{
				functionDeclSpecifiers(_t);
				_t = _retTree;
				break;
			}
			case NDeclarator:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
			}
			declarator(_t);
			_t = _retTree;
			{
			_loop1224:
			do {
				if (_t==null) _t=ASTNULL;
				switch ( _t.getType()) {
				case NDeclaration:
				{
					declaration(_t);
					_t = _retTree;
					break;
				}
				case VARARGS:
				{
					v = (TNode)_t;
					match(_t,VARARGS);
					_t = _t.getNextSibling();
					if ( inputState.guessing==0 ) {
						print( v );
					}
					break;
				}
				default:
				{
					break _loop1224;
				}
				}
			} while (true);
			}
			{
			_loop1226:
			do {
				if (_t==null) _t=ASTNULL;
				if ((_t.getType()==NAsmAttribute||_t.getType()==LITERAL___attribute)) {
					attributeDecl(_t);
					_t = _retTree;
				}
				else {
					break _loop1226;
				}
				
			} while (true);
			}
			compoundStatement(_t);
			_t = _retTree;
			_t = __t1221;
			_t = _t.getNextSibling();
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				if (_t!=null) {_t = _t.getNextSibling();}
			} else {
			  throw ex;
			}
		}
		_retTree = _t;
	}
	
	public final void asm_expr(AST _t) throws RecognitionException {
		
		TNode asm_expr_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
		TNode a = null;
		TNode v = null;
		TNode lc = null;
		TNode rc = null;
		TNode s = null;
		
		try {      // for error handling
			AST __t1101 = _t;
			a = _t==ASTNULL ? null :(TNode)_t;
			match(_t,LITERAL_asm);
			_t = _t.getFirstChild();
			if ( inputState.guessing==0 ) {
				print( a );
			}
			{
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case LITERAL_volatile:
			{
				v = (TNode)_t;
				match(_t,LITERAL_volatile);
				_t = _t.getNextSibling();
				if ( inputState.guessing==0 ) {
					print( v );
				}
				break;
			}
			case LCURLY:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
			}
			lc = (TNode)_t;
			match(_t,LCURLY);
			_t = _t.getNextSibling();
			if ( inputState.guessing==0 ) {
				print( lc );  newline(); tabs++;
			}
			expr(_t);
			_t = _retTree;
			rc = (TNode)_t;
			match(_t,RCURLY);
			_t = _t.getNextSibling();
			if ( inputState.guessing==0 ) {
				tabs--; print( rc );  newline();
			}
			s = (TNode)_t;
			match(_t,SEMI);
			_t = _t.getNextSibling();
			if ( inputState.guessing==0 ) {
				print( s );  newline();
			}
			_t = __t1101;
			_t = _t.getNextSibling();
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				if (_t!=null) {_t = _t.getNextSibling();}
			} else {
			  throw ex;
			}
		}
		_retTree = _t;
	}
	
	public final void typelessDeclaration(AST _t) throws RecognitionException {
		
		TNode typelessDeclaration_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
		TNode s = null;
		
		try {      // for error handling
			AST __t1099 = _t;
			TNode tmp7_AST_in = (TNode)_t;
			match(_t,NTypeMissing);
			_t = _t.getFirstChild();
			initDeclList(_t);
			_t = _retTree;
			s = (TNode)_t;
			match(_t,SEMI);
			_t = _t.getNextSibling();
			_t = __t1099;
			_t = _t.getNextSibling();
			if ( inputState.guessing==0 ) {
				print( s );  newline();
			}
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				if (_t!=null) {_t = _t.getNextSibling();}
			} else {
			  throw ex;
			}
		}
		_retTree = _t;
	}
	
	public final void initDeclList(AST _t) throws RecognitionException {
		
		TNode initDeclList_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
		
		try {      // for error handling
			initDecl(_t);
			_t = _retTree;
			{
			_loop1169:
			do {
				if (_t==null) _t=ASTNULL;
				if ((_t.getType()==NInitDecl)) {
					if ( inputState.guessing==0 ) {
						print( "," );
					}
					initDecl(_t);
					_t = _retTree;
				}
				else {
					break _loop1169;
				}
				
			} while (true);
			}
		}
		catch (RecognitionException ex) {
			if (inputState.guessing==0) {
				reportError(ex);
				if (_t!=null) {_t = _t.getNextSibling();}
			} else {
			  throw ex;
			}
		}
		_retTree = _t;
	}
	
	public final void expr(AST _t) throws RecognitionException {
		
		TNode expr_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
		
		try {      // for error handling
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case ASSIGN:
			case STAR:
			case DIV_ASSIGN:
			case PLUS_ASSIGN:
			case MINUS_ASSIGN:
			case STAR_ASSIGN:
			case MOD_ASSIGN:
			case RSHIFT_ASSIGN:
			case LSHIFT_ASSIGN:
			case BAND_ASSIGN:
			case BOR_ASSIGN:
			case BXOR_ASSIGN:
			case LOR:
			case LAND:

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?