Commit 566f0e2a authored by Johannes Roith's avatar Johannes Roith

Fix (maybe?!) Lexer bug.

parent d11b3714
This diff is collapsed.
......@@ -28,10 +28,15 @@ import java.io.InputStreamReader;
private ComplexSymbolFactory symbolFactory;
private int csline,cscolumn;
public Symbol symbol(String name, int code){
return symbolFactory.newSymbol(name, code,new Location(yyline+1,yycolumn+1-yylength()),new Location(yyline+1,yycolumn+1));
return symbolFactory.newSymbol(name, code,
new Location(yyline+1,yycolumn+1), // -yylength()
new Location(yyline+1,yycolumn+1)
);
}
public Symbol symbol(String name, int code, String lexem){
return symbolFactory.newSymbol(name, code, new Location(yyline+1, yycolumn +1), new Location(yyline+1,yycolumn+yylength()), lexem);
return symbolFactory.newSymbol(name, code,
new Location(yyline+1, yycolumn +1),
new Location(yyline+1,yycolumn+yylength()), lexem);
}
protected void emit_warning(String message){
Utility.Error("Scanner at " + (yyline+1) + "(" + (yycolumn+1) + "): " + message);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment