Hi all
I gave a look to the official doc
https://javacc.dev.java.net/doc/apiroutines.html
and elsewhere in the web.
I did not find any mention about the base of the line and column
indexes i.e. the
int beginLine, beginColumn, endLine, endColumn
data members of the Token class. Are they either 0 (zero) or 1 based?
The comment in the class
/**
* beginLine and beginColumn describe the position of the first
character
* of this token; endLine and endColumn describe the position of the
* last character of this token.
*/
does not mention the base for the indexes, too.
Sperimentally I noted that a token on the first line of the input is
re****ted with beginLine that holds value 1.
So I guess that those indexes are 1-based.
Is it right?
If so, a couple of words more in the doc to tell that indexes are 1-
based would not be bad.
ciao
Cesare