Posted By:
Tim_McKenzie
Posted On:
Monday, January 28, 2002 08:00 PM
There are several examples on the FAQ's detailing how to over-ride the column/line counting mechanisms of antlr. Presumably, there were written for previous versions of the program, as it appears to have been completely implemented in the current one. However, when I attempt to call upon these methods, I get only error messages. For example, the line: (inserted in the lexer) System.out.println(antlr.CharScanner.getColumn()); gives the following error when the generated file is compiled (javac) myLexer.java:44: non-static method getColumn() cannot be referenced from a static context System.out.println(antlr.CharScanner.getColumn());
More>>
There are several examples on the FAQ's detailing how to over-ride the column/line counting mechanisms of antlr. Presumably, there were written for previous versions of the program, as it appears to have been completely implemented in the current one.
However, when I attempt to call upon these methods, I get only error messages.
For example, the line: (inserted in the lexer)
System.out.println(antlr.CharScanner.getColumn());
gives the following error when the generated file is compiled (javac)
myLexer.java:44: non-static method getColumn() cannot be referenced from a static context
System.out.println(antlr.CharScanner.getColumn());
^
1 error
Are these methods actually implemented in a way which they can be publically accessed, or am I attempting to access them incorrectly?
Any help would be appreciated, thanks.
<<Less