/* additional tokens introduced by splint pre-processor. */
%token <tok> LLMACRO LLMACROITER LLMACROEND TENDMACRO
+/* For debugging purposes */
+%token <tok> QDREVEALSTATE
+
/* break comments: */
%token <tok> QSWITCHBREAK QLOOPBREAK QINNERBREAK QSAFEBREAK
%token <tok> QINNERCONTINUE
%type <expr> orIterExpr conditionalIterExpr assignIterExpr iterArgExpr
%type <expr> expr optExpr constantExpr
%type <expr> init macroBody iterBody endBody partialIterStmt iterSelectionStmt
-%type <expr> stmt stmtList fcnBody iterStmt iterDefStmt iterDefStmtList
+%type <expr> stmt stmtList fcnBody iterStmt iterDefStmt iterDefStmtList debugStmt
%type <expr> labeledStmt caseStmt defaultStmt
%type <expr> compoundStmt compoundStmtAux compoundStmtRest compoundStmtAuxErr
%type <expr> expressionStmt selectionStmt iterationStmt jumpStmt iterDefIterationStmt
| iterationStmt
| iterStmt
| jumpStmt
+ | debugStmt
;
+debugStmt
+ : QDREVEALSTATE TLPAREN expr TRPAREN { exprNode_revealState ($3); $$ = exprNode_undefined; }
+;
iterBody
: iterDefStmtList { $$ = $1; }
| iterationStmtErr
| TLPAREN stmtErr TRPAREN { $$ = exprNode_addParens ($1, $2); }
| jumpStmt
+ | debugStmt
| error { $$ = exprNode_makeError (); }
;