Skip to content

Commit

Permalink
Generate msynpred method if and only if synpreds are present
Browse files Browse the repository at this point in the history
  • Loading branch information
ibre5041 committed Apr 15, 2013
1 parent 34ab21a commit 77d8914
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tool/src/main/resources/org/antlr/codegen/templates/Cpp/Cpp.stg
Original file line number Diff line number Diff line change
Expand Up @@ -2099,6 +2099,16 @@ public:
return m_ctx->LT(k);
}
<endif>

<if(LEXER)>
<if(synpreds)>
template\<typename PredType>
bool msynpred( PredType pred )
{
return m_ctx->msynpred(pred);
}
<endif>
<endif>

ANTLR_INT32 specialStateTransition(CtxType * ctx, RecognizerType* recognizer, IntStreamType* is, ANTLR_INT32 s)
{
Expand Down

0 comments on commit 77d8914

Please sign in to comment.