}
protected:
- bool automatic(int token) const
- {
- return token == T_RBRACE || token == 0 || prevTerminator();
- }
-
virtual bool parse(int startToken) = 0;
static QString quote(const QString &string)
const int yyerrorstate = _stateStack[yytos];
// automatic insertion of `;'
- if (yytoken != -1 && t_action(yyerrorstate, T_AUTOMATIC_SEMICOLON) && automatic(yytoken)) {
+ if (yytoken != -1 && t_action(yyerrorstate, T_AUTOMATIC_SEMICOLON) && canInsertAutomaticSemicolon(yytoken)) {
_tokens.prepend(yytoken);
_tokenStrings.prepend(yytokentext);
yyaction = yyerrorstate;
const int yyerrorstate = _stateStack[yytos];
// automatic insertion of `;'
- if (yytoken != -1 && t_action(yyerrorstate, T_AUTOMATIC_SEMICOLON) && automatic(yytoken)) {
+ if (yytoken != -1 && t_action(yyerrorstate, T_AUTOMATIC_SEMICOLON) && canInsertAutomaticSemicolon(yytoken)) {
_tokens.prepend(yytoken);
_tokenStrings.prepend(yytokentext);
yyaction = yyerrorstate;