gnucemitter.java
来自「plugin for eclipse」· Java 代码 · 共 2,964 行 · 第 1/5 页
JAVA
2,964 行
enumerator(_t);
_t = _retTree;
{
_loop2623:
do {
if (_t==null) _t=ASTNULL;
if ((_t.getType()==ID)) {
if ( inputState.guessing==0 ) {
print(",");
}
enumerator(_t);
_t = _retTree;
}
else {
break _loop2623;
}
} 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 enumerator(AST _t) throws RecognitionException {
TNode enumerator_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
TNode i = null;
TNode b = 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 ASSIGN:
{
b = (TNode)_t;
match(_t,ASSIGN);
_t = _t.getNextSibling();
if ( inputState.guessing==0 ) {
print( b );
}
expr(_t);
_t = _retTree;
break;
}
case RCURLY:
case ID:
{
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 initDecl(AST _t) throws RecognitionException {
TNode initDecl_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
TNode a = null;
TNode b = null;
String declName = "";
try { // for error handling
AST __t2635 = _t;
TNode tmp9_AST_in = (TNode)_t;
match(_t,NInitDecl);
_t = _t.getFirstChild();
declarator(_t);
_t = _retTree;
{
_loop2637:
do {
if (_t==null) _t=ASTNULL;
if ((_t.getType()==NAsmAttribute||_t.getType()==LITERAL___attribute)) {
attributeDecl(_t);
_t = _retTree;
}
else {
break _loop2637;
}
} while (true);
}
{
if (_t==null) _t=ASTNULL;
switch ( _t.getType()) {
case ASSIGN:
{
a = (TNode)_t;
match(_t,ASSIGN);
_t = _t.getNextSibling();
if ( inputState.guessing==0 ) {
print( a );
}
initializer(_t);
_t = _retTree;
break;
}
case COLON:
{
b = (TNode)_t;
match(_t,COLON);
_t = _t.getNextSibling();
if ( inputState.guessing==0 ) {
print( b );
}
expr(_t);
_t = _retTree;
break;
}
case 3:
{
break;
}
default:
{
throw new NoViableAltException(_t);
}
}
}
_t = __t2635;
_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 initializer(AST _t) throws RecognitionException {
TNode initializer_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
try { // for error handling
if (_t==null) _t=ASTNULL;
switch ( _t.getType()) {
case NInitializer:
{
AST __t2649 = _t;
TNode tmp10_AST_in = (TNode)_t;
match(_t,NInitializer);
_t = _t.getFirstChild();
{
if (_t==null) _t=ASTNULL;
switch ( _t.getType()) {
case NInitializerElementLabel:
{
initializerElementLabel(_t);
_t = _retTree;
break;
}
case ID:
case ASSIGN:
case STAR:
case LPAREN:
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 QUESTION:
case LOR:
case LAND:
case BOR:
case BXOR:
case BAND:
case EQUAL:
case NOT_EQUAL:
case LT:
case LTE:
case GT:
case GTE:
case LSHIFT:
case RSHIFT:
case PLUS:
case MINUS:
case DIV:
case MOD:
case INC:
case DEC:
case LITERAL_sizeof:
case CharLiteral:
case NCast:
case NExpressionGroup:
case NInitializer:
case NEmptyExpression:
case NCommaExpr:
case NUnaryExpr:
case NPostfixExpr:
case NRangeExpr:
case NStringSeq:
case NLcurlyInitializer:
case NGnuAsmExpr:
case Number:
case LITERAL___alignof:
{
break;
}
default:
{
throw new NoViableAltException(_t);
}
}
}
expr(_t);
_t = _retTree;
_t = __t2649;
_t = _t.getNextSibling();
break;
}
case NLcurlyInitializer:
{
lcurlyInitializer(_t);
_t = _retTree;
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 pointerGroup(AST _t) throws RecognitionException {
TNode pointerGroup_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
TNode a = null;
try { // for error handling
AST __t2640 = _t;
TNode tmp11_AST_in = (TNode)_t;
match(_t,NPointerGroup);
_t = _t.getFirstChild();
{
int _cnt2644=0;
_loop2644:
do {
if (_t==null) _t=ASTNULL;
if ((_t.getType()==STAR)) {
a = (TNode)_t;
match(_t,STAR);
_t = _t.getNextSibling();
if ( inputState.guessing==0 ) {
print( a );
}
{
_loop2643:
do {
if (_t==null) _t=ASTNULL;
if ((_t.getType()==LITERAL_volatile||_t.getType()==LITERAL_const)) {
typeQualifier(_t);
_t = _retTree;
}
else {
break _loop2643;
}
} while (true);
}
}
else {
if ( _cnt2644>=1 ) { break _loop2644; } else {throw new NoViableAltException(_t);}
}
_cnt2644++;
} while (true);
}
_t = __t2640;
_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 idList(AST _t) throws RecognitionException {
TNode idList_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
TNode i = null;
TNode c = null;
TNode id = null;
try { // for error handling
i = (TNode)_t;
match(_t,ID);
_t = _t.getNextSibling();
if ( inputState.guessing==0 ) {
print( i );
}
{
_loop2647:
do {
if (_t==null) _t=ASTNULL;
if ((_t.getType()==COMMA)) {
c = (TNode)_t;
match(_t,COMMA);
_t = _t.getNextSibling();
if ( inputState.guessing==0 ) {
print( c );
}
id = (TNode)_t;
match(_t,ID);
_t = _t.getNextSibling();
if ( inputState.guessing==0 ) {
print( id );
}
}
else {
break _loop2647;
}
} 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 initializerElementLabel(AST _t) throws RecognitionException {
TNode initializerElementLabel_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
TNode l = null;
TNode r = null;
TNode a1 = null;
TNode i1 = null;
TNode c = null;
TNode d = null;
TNode i2 = null;
TNode a2 = null;
try { // for error handling
AST __t2652 = _t;
TNode tmp12_AST_in = (TNode)_t;
match(_t,NInitializerElementLabel);
_t = _t.getFirstChild();
{
if (_t==null) _t=ASTNULL;
switch ( _t.getType()) {
case LBRACKET:
{
{
l = (TNode)_t;
match(_t,LBRACKET);
_t = _t.getNextSibling();
if ( inputState.guessing==0 ) {
print( l );
}
expr(_t);
_t = _retTree;
r = (TNode)_t;
match(_t,RBRACKET);
_t = _t.getNextSibling();
if ( inputState.guessing==0 ) {
print( r );
}
{
if (_t==null) _t=ASTNULL;
switch ( _t.getType()) {
case ASSIGN:
{
a1 = (TNode)_t;
match(_t,ASSIGN);
_t = _t.getNextSibling();
if ( inputState.guessing==0 ) {
print( a1 );
}
break;
}
case 3:
{
break;
}
default:
{
throw new NoViableAltException(_t);
}
}
}
}
break;
}
case ID:
{
i1 = (TNode)_t;
match(_t,ID);
_t = _t.getNextSibling();
c = (TNode)_t;
match(_t,COLON);
_t = _t.getNextSibling();
if ( inputState.guessing==0 ) {
print( i1 ); print( c );
}
break;
}
case DOT:
{
d = (TNode)_t;
match(_t,DOT);
_t = _t.getNextSibling();
i2 = (TNode)_t;
match(_t,ID);
_t = _t.getNextSibling();
a2 = (TNode)_t;
match(_t,ASSIGN);
_t = _t.getNextSibling();
if ( inputState.guessing==0 ) {
print( d ); print( i2 ); print( a2 );
}
break;
}
default:
{
throw new NoViableAltException(_t);
}
}
}
_t = __t2652;
_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 lcurlyInitializer(AST _t) throws RecognitionException {
TNode lcurlyInitializer_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
TNode n = null;
TNode rc = null;
try { // for error handling
AST __t2657 = _t;
n = _t==ASTNULL ? null :(TNode)_t;
match(_t,NLcurlyInitializer);
_t = _t.getFirstChild();
if ( inputState.guessing==0 ) {
print( n ); tabs++;
}
initializerList(_t);
_t = _retTree;
rc = (TNode)_t;
match(_t,RCURLY);
_t = _t.getNextSibling();
if ( inputState.guessing==0 ) {
tabs--; print( rc );
}
_t = __t2657;
_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 initializerList(AST _t) throws RecognitionException {
TNode initializerList_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
TNode i = null;
try { // for error handling
{
_loop2660:
do {
if (_t==null) _t=ASTNULL;
if ((_t.getType()==NInitializer||_t.getType()==NLcurlyInitializer)) {
i = _t==ASTNULL ? null : (TNode)_t;
initializer(_t);
_t = _retTree;
if ( inputState.guessing==0 ) {
commaSep( i );
}
}
else {
break _loop2660;
}
} 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 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 _cnt2674=0;
_loop2674:
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;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?