protected String next() { return next(1); } protected String next(int i) {
protected boolean next(String... ss) { return next(1, ss); } protected boolean next(Identifier id) {
protected boolean next(int i, String... ss) { String n = next(i); for (String s : ss) if (s.equals(n)) return true; return false; }
protected boolean next(Identifier id) { if (id == null) return false; return next(id.toString()); }
protected boolean next(ModifierKind... anyModKind) { return parseModifier(next(), anyModKind) != null; } protected boolean next(String... ss) {
public final void synpred8_ObjCpp_fragment() throws RecognitionException { // com/ochafik/lang/jnaerator/parser/ObjCpp.g:559:7: ({...}? IDENTIFIER ) // com/ochafik/lang/jnaerator/parser/ObjCpp.g:559:7: {...}? IDENTIFIER { if ( !(( next("__extension__") )) ) { if (state.backtracking>0) {state.failed=true; return ;} throw new FailedPredicateException(input, "synpred8_ObjCpp", " next(\"__extension__\") "); } match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_synpred8_ObjCpp418); if (state.failed) return ; } } // $ANTLR end synpred8_ObjCpp
public final void synpred62_ObjCpp_fragment() throws RecognitionException { // com/ochafik/lang/jnaerator/parser/ObjCpp.g:910:11: ({...}? IDENTIFIER ) // com/ochafik/lang/jnaerator/parser/ObjCpp.g:910:11: {...}? IDENTIFIER { if ( !(( next("public") )) ) { if (state.backtracking>0) {state.failed=true; return ;} throw new FailedPredicateException(input, "synpred62_ObjCpp", " next(\"public\") "); } match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_synpred62_ObjCpp2264); if (state.failed) return ; } } // $ANTLR end synpred62_ObjCpp
public final void synpred63_ObjCpp_fragment() throws RecognitionException { // com/ochafik/lang/jnaerator/parser/ObjCpp.g:911:11: ({...}? IDENTIFIER ) // com/ochafik/lang/jnaerator/parser/ObjCpp.g:911:11: {...}? IDENTIFIER { if ( !(( next("private") )) ) { if (state.backtracking>0) {state.failed=true; return ;} throw new FailedPredicateException(input, "synpred63_ObjCpp", " next(\"private\") "); } match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_synpred63_ObjCpp2283); if (state.failed) return ; } } // $ANTLR end synpred63_ObjCpp
public final void synpred123_ObjCpp_fragment() throws RecognitionException { // com/ochafik/lang/jnaerator/parser/ObjCpp.g:1244:5: ({...}? => IDENTIFIER ) // com/ochafik/lang/jnaerator/parser/ObjCpp.g:1244:5: {...}? => IDENTIFIER { if ( !(( next("const", "__const") )) ) { if (state.backtracking>0) {state.failed=true; return ;} throw new FailedPredicateException(input, "synpred123_ObjCpp", " next(\"const\", \"__const\") "); } match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_synpred123_ObjCpp4059); if (state.failed) return ; } } // $ANTLR end synpred123_ObjCpp
public final void synpred278_ObjCpp_fragment() throws RecognitionException { // com/ochafik/lang/jnaerator/parser/ObjCpp.g:2091:7: ({...}? => IDENTIFIER ) // com/ochafik/lang/jnaerator/parser/ObjCpp.g:2091:7: {...}? => IDENTIFIER { if ( !(( next("__volatile__", "volatile") )) ) { if (state.backtracking>0) {state.failed=true; return ;} throw new FailedPredicateException(input, "synpred278_ObjCpp", " next(\"__volatile__\", \"volatile\") "); } match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_synpred278_ObjCpp8486); if (state.failed) return ; } } // $ANTLR end synpred278_ObjCpp
public final void synpred162_ObjCpp_fragment() throws RecognitionException { Token i=null; // com/ochafik/lang/jnaerator/parser/ObjCpp.g:1606:7: ({...}? =>i= IDENTIFIER ) // com/ochafik/lang/jnaerator/parser/ObjCpp.g:1606:7: {...}? =>i= IDENTIFIER { if ( !(( next("va_list", "__gnuc_va_list", "__builtin_va_list") )) ) { if (state.backtracking>0) {state.failed=true; return ;} throw new FailedPredicateException(input, "synpred162_ObjCpp", " next(\"va_list\", \"__gnuc_va_list\", \"__builtin_va_list\") "); } i=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_synpred162_ObjCpp5682); if (state.failed) return ; } } // $ANTLR end synpred162_ObjCpp
public final void synpred77_ObjCpp_fragment() throws RecognitionException { Token p=null; // com/ochafik/lang/jnaerator/parser/ObjCpp.g:998:17: ({...}?p= IDENTIFIER ) // com/ochafik/lang/jnaerator/parser/ObjCpp.g:998:17: {...}?p= IDENTIFIER { if ( !(( next("public", "private", "virtual") )) ) { if (state.backtracking>0) {state.failed=true; return ;} throw new FailedPredicateException(input, "synpred77_ObjCpp", " next(\"public\", \"private\", \"virtual\") "); } p=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_synpred77_ObjCpp2703); if (state.failed) return ; } } // $ANTLR end synpred77_ObjCpp
public final void synpred154_ObjCpp_fragment() throws RecognitionException { // com/ochafik/lang/jnaerator/parser/ObjCpp.g:1517:7: ({...}? => IDENTIFIER ) // com/ochafik/lang/jnaerator/parser/ObjCpp.g:1517:7: {...}? => IDENTIFIER { if ( !(( parseModifier(next()) == null )) ) { if (state.backtracking>0) {state.failed=true; return ;} throw new FailedPredicateException(input, "synpred154_ObjCpp", " parseModifier(next()) == null "); } match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_synpred154_ObjCpp5323); if (state.failed) return ; } } // $ANTLR end synpred154_ObjCpp
public final void synpred108_ObjCpp_fragment() throws RecognitionException { Token m=null; // com/ochafik/lang/jnaerator/parser/ObjCpp.g:1154:5: ({...}?m= IDENTIFIER ) // com/ochafik/lang/jnaerator/parser/ObjCpp.g:1154:5: {...}?m= IDENTIFIER { if ( !(( parseModifier(next()) != null )) ) { if (state.backtracking>0) {state.failed=true; return ;} throw new FailedPredicateException(input, "synpred108_ObjCpp", " parseModifier(next()) != null "); } m=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_synpred108_ObjCpp3618); if (state.failed) return ; } } // $ANTLR end synpred108_ObjCpp
public final void synpred107_ObjCpp_fragment() throws RecognitionException { Token ex=null; // com/ochafik/lang/jnaerator/parser/ObjCpp.g:1151:5: ({...}? => IDENTIFIER ex= STRING ) // com/ochafik/lang/jnaerator/parser/ObjCpp.g:1151:5: {...}? => IDENTIFIER ex= STRING { if ( !(( next("extern") )) ) { if (state.backtracking>0) {state.failed=true; return ;} throw new FailedPredicateException(input, "synpred107_ObjCpp", " next(\"extern\") "); } match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_synpred107_ObjCpp3600); if (state.failed) return ; ex=(Token)match(input,STRING,FOLLOW_STRING_in_synpred107_ObjCpp3604); if (state.failed) return ; } } // $ANTLR end synpred107_ObjCpp
public final void synpred106_ObjCpp_fragment() throws RecognitionException { // com/ochafik/lang/jnaerator/parser/ObjCpp.g:1150:5: ({...}? => pragmaContent ) // com/ochafik/lang/jnaerator/parser/ObjCpp.g:1150:5: {...}? => pragmaContent { if ( !(( next("__pragma") )) ) { if (state.backtracking>0) {state.failed=true; return ;} throw new FailedPredicateException(input, "synpred106_ObjCpp", " next(\"__pragma\") "); } pushFollow(FOLLOW_pragmaContent_in_synpred106_ObjCpp3588); pragmaContent(); state._fsp--; if (state.failed) return ; } } // $ANTLR end synpred106_ObjCpp
public final void synpred10_ObjCpp_fragment() throws RecognitionException { // com/ochafik/lang/jnaerator/parser/ObjCpp.g:568:9: ({...}? => pragmaContent ) // com/ochafik/lang/jnaerator/parser/ObjCpp.g:568:9: {...}? => pragmaContent { if ( !(( next("__pragma") )) ) { if (state.backtracking>0) {state.failed=true; return ;} throw new FailedPredicateException(input, "synpred10_ObjCpp", " next(\"__pragma\") "); } pushFollow(FOLLOW_pragmaContent_in_synpred10_ObjCpp469); pragmaContent(); state._fsp--; if (state.failed) return ; } } // $ANTLR end synpred10_ObjCpp
public final void synpred12_ObjCpp_fragment() throws RecognitionException { // com/ochafik/lang/jnaerator/parser/ObjCpp.g:572:9: ({...}? => externDeclarations ) // com/ochafik/lang/jnaerator/parser/ObjCpp.g:572:9: {...}? => externDeclarations { if ( !(( next("extern") )) ) { if (state.backtracking>0) {state.failed=true; return ;} throw new FailedPredicateException(input, "synpred12_ObjCpp", " next(\"extern\") "); } pushFollow(FOLLOW_externDeclarations_in_synpred12_ObjCpp498); externDeclarations(); state._fsp--; if (state.failed) return ; } } // $ANTLR end synpred12_ObjCpp
public final void synpred3_ObjCpp_fragment() throws RecognitionException { // com/ochafik/lang/jnaerator/parser/ObjCpp.g:501:7: ({...}? => IDENTIFIER STRING LBRACE ) // com/ochafik/lang/jnaerator/parser/ObjCpp.g:501:7: {...}? => IDENTIFIER STRING LBRACE { if ( !(( next("extern") )) ) { if (state.backtracking>0) {state.failed=true; return ;} throw new FailedPredicateException(input, "synpred3_ObjCpp", " next(\"extern\") "); } match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_synpred3_ObjCpp215); if (state.failed) return ; match(input,STRING,FOLLOW_STRING_in_synpred3_ObjCpp217); if (state.failed) return ; match(input,LBRACE,FOLLOW_LBRACE_in_synpred3_ObjCpp219); if (state.failed) return ; } } // $ANTLR end synpred3_ObjCpp
protected Modifier parseModifier(String s, ModifierKind... anyModKind) { Modifier mod = ModifierType.parseModifier(next(), anyModKind); if (mod == null) return null; if (mod.isAllOf(ModifierKind.ObjectiveC, ModifierKind.OnlyInArgDef) && !isObjCArgDef()) return null; if (mod.isA(ModifierKind.Java)) return null; //if (mod.isAnyOf(ModifierKind.Declspec, ModifierKind.Attribute) && !isInExtMod()) // return null; if (!mod.isAnyOf(anyModKind) && !isAllowed(mod)) return null; return mod; } protected boolean next(ModifierKind... anyModKind) {