Thanks to David Cok for raising this issue.
d_input->parseError(msg);
}
+ /** Unexpectedly encountered an EOF */
+ inline void unexpectedEOF(const std::string& msg) throw(ParserException) {
+ d_input->parseError(msg, true);
+ }
+
/**
* If we are parsing only, don't raise an exception; if we are not,
* raise a parse error with the given message. There is no actual
PARSER_STATE->checkDeclaration(id, check, type);
}
}
+ | UNTERMINATED_QUOTED_SYMBOL EOF
+ { PARSER_STATE->unexpectedEOF("unterminated |quoted| symbol"); }
;
/**
QUOTED_SYMBOL
: '|' ~('|' | '\\')* '|'
;
+UNTERMINATED_QUOTED_SYMBOL
+ : '|' ~('|' | '\\')*
+ ;
/**
* Matches a keyword from the input. A keyword is a simple symbol prefixed