public final FastSimpleGenericEdifactDirectXMLParser.tag_index_id_return tag_index_id() throws RecognitionException { FastSimpleGenericEdifactDirectXMLParser.tag_index_id_return retval = new FastSimpleGenericEdifactDirectXMLParser.tag_index_id_return(); retval.start = input.LT( 1 ); FastSimpleGenericEdifactDirectXMLParser.tag_index_id_val_return tag_index_id_val4 = null; try { // C:\\workspace-sts\\Kettle trunk - // restruct\\engine\\src\\org\\pentaho\\di\\trans\\steps\\edi2xml\\grammar\\ // FastSimpleGenericEdifactDirectXML.g:115:15: // ( tag_index_id_val ) // C:\\workspace-sts\\Kettle trunk - // restruct\\engine\\src\\org\\pentaho\\di\\trans\\steps\\edi2xml\\grammar\\ // FastSimpleGenericEdifactDirectXML.g:115:17: // tag_index_id_val pushFollow( FOLLOW_tag_index_id_val_in_tag_index_id249 ); tag_index_id_val4 = tag_index_id_val(); state._fsp--; tagIndexes.add( ( tag_index_id_val4 != null ? input.toString( tag_index_id_val4.start, tag_index_id_val4.stop ) : null ) ); retval.stop = input.LT( -1 ); } catch ( RecognitionException e ) { // do not try to recover from parse errors, propagate the error instead throw e; } return retval; }
public final FastSimpleGenericEdifactDirectXMLParser.tag_return tag() throws RecognitionException { FastSimpleGenericEdifactDirectXMLParser.tag_return retval = new FastSimpleGenericEdifactDirectXMLParser.tag_return(); retval.start = input.LT( 1 ); int LA7_0 = input.LA( 1 ); retval.name = ( tag_name3 != null ? input.toString( tag_name3.start, tag_name3.stop ) : null ).trim(); retval.stop = input.LT( -1 );
public final XPathEnhancerParser.absoluteLocationPathNoroot_return absoluteLocationPathNoroot() throws RecognitionException { XPathEnhancerParser.absoluteLocationPathNoroot_return retval = new XPathEnhancerParser.absoluteLocationPathNoroot_return(); retval.start = input.LT(1); new STAttrMap().put("sharesPrefix", sharesPrefix(input.toString(retval.start,input.LT(-1))) ).put("commonPrefix", prefix ).put("index", index ).put("remainingSuffix", remainingSuffix(input.toString(retval.start,input.LT(-1))) ).put("originalPath", input.toString(retval.start,input.LT(-1)) )); ((Token)retval.start).getTokenIndex(), input.LT(-1).getTokenIndex(), retval.st);
/** * Matches a conditional || expression * * @return * @throws RecognitionException */ public String conditionalOrExpression() throws RecognitionException { int first = input.index(); exprParser.conditionalOrExpression(); if ( state.failed ) return null; if ( state.backtracking == 0 && input.index() > first ) { // expression consumed something String expr = input.toString( first, input.LT( -1 ).getTokenIndex() ); return expr; } return null; }
int LA67_0 = input.LA(1); if ( ((LA67_0 >= ARRAY_B && LA67_0 <= ARRAY_J)||(LA67_0 >= ARRAY_S && LA67_0 <= ARRAY_Z)||LA67_0==OBJECT_TYPE||LA67_0==PARRAY_TYPE) ) { alt67=1; int LA66_0 = input.LA(1); if ( ((LA66_0 >= ARRAY_B && LA66_0 <= ARRAY_J)||(LA66_0 >= ARRAY_S && LA66_0 <= ARRAY_Z)||LA66_0==PARRAY_TYPE) ) { alt66=1; state._fsp--; desc =unEscape((a!=null?input.toString(a.start,a.stop):null)); state._fsp--; desc = "L"+unEscape((c!=null?input.toString(c.start,c.stop):null))+";";
public final void localVariableDeclaration() throws RecognitionException { VarDecl_stack.push(new VarDecl_scope()); int localVariableDeclaration_StartIndex = input.index(); JavaParser.variableModifier_return variableModifier1 = null; do { int alt106=2; int LA106_0 = input.LA(1); ((VarDecl_scope)VarDecl_stack.peek()).descr.addModifier( (variableModifier1!=null?input.toString(variableModifier1.start,variableModifier1.stop):null) ); ((VarDecl_scope)VarDecl_stack.peek()).descr.setType( (type2!=null?input.toString(type2.start,type2.stop):null) ); ((VarDecl_scope)VarDecl_stack.peek()).descr.setEnd( ((CommonToken)(type2!=null?((Token)type2.stop):null)).getStopIndex() );
public final JavaParser.ellipsisParameterDecl_return ellipsisParameterDecl() throws RecognitionException { JavaParser.ellipsisParameterDecl_return retval = new JavaParser.ellipsisParameterDecl_return(); retval.start = input.LT(1); int ellipsisParameterDecl_StartIndex = input.index(); if (!isBacktracking()) { log("Start EllipsisParameterDeclarationDesc"); retval.param = new EllipsisParameterDescr(input.toString(retval.start,input.LT(-1)), start((CommonToken)(retval.start)), -1, line((retval.start)), position((retval.start))); context.push(retval.param); retval.stop = input.LT(-1); updateOnAfter(retval.param, input.toString(retval.start,input.LT(-1)), (CommonToken)(retval.stop)); } else {
/** * nestedConstraint := ( ID ( DOT | HASH ) )* ID DOT LEFT_PAREN constraints RIGHT_PAREN * @param pattern * @throws RecognitionException */ private void nestedConstraint( PatternDescrBuilder< ? > pattern, String prefix ) throws RecognitionException { int prefixLenght = getNestedConstraintPrefixLenght(); int prefixStart = input.index(); prefix += input.toString( prefixStart, prefixStart + prefixLenght - 2 ); for (int i = 0; i < prefixLenght; i++) { input.consume(); } constraints( pattern, prefix ); match( input, DRLLexer.RIGHT_PAREN, null, null, DroolsEditorType.SYMBOL ); }
@Override public String getText() { String badText = null; if (start != null) { int i = start.getTokenIndex(); int j = stop.getTokenIndex(); if (stop.getType() == Token.EOF) { j = input.size(); } badText = ((TokenStream)input).toString(i, j); } else { // people should subclass if they alter the tree type so this // next one is for sure correct. badText = "<unknown>"; } return badText; }
/** * Matches a conditional expression * * @return * @throws RecognitionException */ public String conditionalExpression() throws RecognitionException { int first = input.index(); exprParser.conditionalExpression(); if ( state.failed ) return null; if ( state.backtracking == 0 && input.index() > first ) { // expression consumed something String expr = input.toString( first, input.LT( -1 ).getTokenIndex() ); return expr; } return null; }
public final JasminParser.sOwnerAndName_return sOwnerAndName() throws RecognitionException { JasminParser.sOwnerAndName_return retval = new JasminParser.sOwnerAndName_return(); retval.start = input.LT(1); switch ( input.LA(1) ) { case ARRAY_B: case ARRAY_C: case PARRAY_TYPE: int LA70_1 = input.LA(2); if ( (LA70_1==145) ) { alt70=1; case UP_Z: state._fsp--; if((x!=null?input.toString(x.start,x.stop):null).contains("/")){ throw new RecognitionException(input);} retval.ownerInternalName =unEscape((a!=null?input.toString(a.start,a.stop):null)); retval.memberName =unEscape((x!=null?input.toString(x.start,x.stop):null)); state._fsp--; if((x!=null?input.toString(x.start,x.stop):null).contains("/")){ throw new RecognitionException(input);} retval.ownerInternalName =Type.getType(unEscape((b!=null?input.toString(b.start,b.stop):null))).getInternalName(); retval.memberName =unEscape((x!=null?input.toString(x.start,x.stop):null)); state._fsp--; String cstr=(c!=null?input.toString(c.start,c.stop):null); int idx=cstr.lastIndexOf('/'); if(idx<=0) { throw new RecognitionException(input); } retval.ownerInternalName =unEscape(cstr.substring(0,idx)); retval.memberName =unEscape(cstr.substring(idx+1)); retval.stop = input.LT(-1);
int LA5_0 = input.LA( 1 ); String property = ( property13 != null ? input.toString( property13.start, property13.stop ) : null ); String direction = ( direction14 != null ? input.toString( direction14.start, direction14.stop ) : null ); SortPredicate sort = new SortPredicate( property, direction ); query.addSort( sort );
public final FastSimpleGenericEdifactDirectXMLParser.composite_data_item_return composite_data_item() throws RecognitionException { FastSimpleGenericEdifactDirectXMLParser.composite_data_item_return retval = new FastSimpleGenericEdifactDirectXMLParser.composite_data_item_return(); retval.start = input.LT( 1 ); FastSimpleGenericEdifactDirectXMLParser.composite_data_item_val_return composite_data_item_val2 = null; try { // C:\\workspace-sts\\Kettle trunk - // restruct\\engine\\src\\org\\pentaho\\di\\trans\\steps\\edi2xml\\grammar\\ // FastSimpleGenericEdifactDirectXML.g:102:21: // ( composite_data_item_val ) // C:\\workspace-sts\\Kettle trunk - // restruct\\engine\\src\\org\\pentaho\\di\\trans\\steps\\edi2xml\\grammar\\ // FastSimpleGenericEdifactDirectXML.g:102:23: // composite_data_item_val pushFollow( FOLLOW_composite_data_item_val_in_composite_data_item180 ); composite_data_item_val2 = composite_data_item_val(); state._fsp--; buf.append( TAG_VALUE ); buf.append( sanitizeText( ( composite_data_item_val2 != null ? input.toString( composite_data_item_val2.start, composite_data_item_val2.stop ) : null ) ) ); buf.append( TAG_VALUE_END ); retval.stop = input.LT( -1 ); } catch ( RecognitionException e ) { // do not try to recover from parse errors, propagate the error instead throw e; } return retval; }
public final void forInit() throws RecognitionException { int forInit_StartIndex = input.index(); JavaParser.variableModifier_return variableModifier11 = null; do { int alt136=2; int LA136_0 = input.LA(1); ((VarDecl_scope)VarDecl_stack.peek()).descr.addModifier( (variableModifier11!=null?input.toString(variableModifier11.start,variableModifier11.stop):null) ); ((VarDecl_scope)VarDecl_stack.peek()).descr.setType( (type12!=null?input.toString(type12.start,type12.stop):null) ); ((VarDecl_scope)VarDecl_stack.peek()).descr.setEnd( ((CommonToken)(type12!=null?((Token)type12.stop):null)).getStopIndex() );
public final JavaParser.elementValuePair_return elementValuePair() throws RecognitionException { JavaParser.elementValuePair_return retval = new JavaParser.elementValuePair_return(); retval.start = input.LT(1); int elementValuePair_StartIndex = input.index(); if (!isBacktracking()) { log("Start elementValuePair declaration"); retval.valuePair = new ElementValuePairDescr(input.toString(retval.start,input.LT(-1)), start((CommonToken)(retval.start)), -1, line((retval.start)), position((retval.start))); retval.stop = input.LT(-1); updateOnAfter(retval.valuePair, input.toString(retval.start,input.LT(-1)), (CommonToken)(retval.stop)); } else {
public final XPathEnhancerParser.absoluteLocationPathNoroot_return absoluteLocationPathNoroot() throws RecognitionException { XPathEnhancerParser.absoluteLocationPathNoroot_return retval = new XPathEnhancerParser.absoluteLocationPathNoroot_return(); retval.start = input.LT(1); new STAttrMap().put("sharesPrefix", sharesPrefix(input.toString(retval.start,input.LT(-1))) ).put("commonPrefix", prefix ).put("index", index ).put("remainingSuffix", remainingSuffix(input.toString(retval.start,input.LT(-1))) ).put("originalPath", input.toString(retval.start,input.LT(-1)) )); ((Token)retval.start).getTokenIndex(), input.LT(-1).getTokenIndex(), retval.st);
@Override public String getText() { String badText = null; if (start != null) { int i = start.getTokenIndex(); int j = stop.getTokenIndex(); if (stop.getType() == Token.EOF) { j = input.size(); } badText = ((TokenStream)input).toString(i, j); } else { // people should subclass if they alter the tree type so this // next one is for sure correct. badText = "<unknown>"; } return badText; }
private String getConsequenceCode( int first ) { while ( input.LA( 1 ) != DRLLexer.EOF && !helper.validateIdentifierKey( DroolsSoftKeywords.END ) && !helper.validateIdentifierKey( DroolsSoftKeywords.THEN ) ) { helper.emit( input.LT(1), DroolsEditorType.CODE_CHUNK ); input.consume(); } int last = input.LT(1).getTokenIndex(); if ( last <= first ) { return ""; } String chunk = input.toString( first, last ); if ( chunk.endsWith( DroolsSoftKeywords.END ) ) { chunk = chunk.substring( 0, chunk.length() - DroolsSoftKeywords.END.length() ); } else if ( chunk.endsWith( DroolsSoftKeywords.THEN ) ) { chunk = chunk.substring( 0, chunk.length() - DroolsSoftKeywords.THEN.length() ); } return chunk; }
public final JasminParser.sMethodObject_return sMethodObject() throws RecognitionException { JasminParser.sMethodObject_return retval = new JasminParser.sMethodObject_return(); retval.start = input.LT(1); switch ( input.LA(1) ) { case ARRAY_B: case ARRAY_C: case PARRAY_TYPE: case UP_Z: state._fsp--; if((x!=null?input.toString(x.start,x.stop):null).contains("/")){ throw new RecognitionException(input);} retval.ownerInternalName =unEscape((a!=null?input.toString(a.start,a.stop):null)); retval.memberName =unEscape((x!=null?input.toString(x.start,x.stop):null)); state._fsp--; if((x!=null?input.toString(x.start,x.stop):null).contains("/")){ throw new RecognitionException(input);} retval.ownerInternalName =Type.getType(unEscape((b!=null?input.toString(b.start,b.stop):null))).getInternalName(); retval.memberName =unEscape((x!=null?input.toString(x.start,x.stop):null)); state._fsp--; String cstr=(c!=null?input.toString(c.start,c.stop):null); int idx=cstr.lastIndexOf('/'); if(idx<=0) { throw new RecognitionException(input); } retval.ownerInternalName =unEscape(cstr.substring(0,idx)); retval.memberName =unEscape(cstr.substring(idx+1)); state._fsp--; retval.desc =unEscape((d!=null?input.toString(d.start,d.stop):null)); retval.stop = input.LT(-1);