I've built an ant task for generating XML from ADL & running it against
out adl archetypes dies when an unhandled error pops up.
Exception in thread "main" se.acode.openehr.parser.TokenMgrError:
Lexical error at line 1, column 1. Encountered: "\u00ef" (239), after : ""
at
se.acode.openehr.parser.ADLParserTokenManager.getNextToken(ADLParserTokenManager.java:27554)
at
se.acode.openehr.parser.ADLParser.jj_consume_token(ADLParser.java:7061)
at se.acode.openehr.parser.ADLParser.archetype(ADLParser.java:214)
at se.acode.openehr.parser.ADLParser.parse(ADLParser.java:101)
final public Archetype archetype() throws ParseException, Exception {
<cut>
jj_consume_token(SYM_ARCHETYPE);
final private Token jj_consume_token(int kind) throws ParseException {
Token oldToken;
if ((oldToken = token).next != null) token = token.next;
else token = token.next = token_source.getNextToken();
<cut>
public Token getNextToken()
<cut>
throw new TokenMgrError(EOFSeen, curLexState, error_line,
error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
I.e. the Token jj_consume_token() method only throws a parse exception
where getNextToken() :
A) Throws a TokenMgrError within the body of the method
B) Doesn't then throw it at the method level (e.g. public Token
getNextToken() throws TokenMgrError {} )
C) Token jj_consume_token() doesn't then either catch or throw the
TokenMgrError.
Adam