Commit b6d2c339 authored by Christoph Reichenbach's avatar Christoph Reichenbach
Browse files

Further location fixes; column offsets now start at zero

parent 7a355845
......@@ -23,7 +23,7 @@ import lang.ast.TEALParser.SyntaxError;
// this code will be inlined in the body of the generated scanner class
%{
private beaver.Symbol sym(short id) {
return new beaver.Symbol(id, yyline + 1, yycolumn + 1, yylength(), yytext());
return new beaver.Symbol(id, yyline + 1, yycolumn, yylength(), yytext());
}
%}
......
......@@ -40,17 +40,17 @@
{
String text = yytext();
Long data = Long.parseLong(text);
return new beaver.Symbol(Terminals.INTEGER_LITERAL, yyline + 1, yycolumn + 1, yylength(), data);
return new beaver.Symbol(Terminals.INTEGER_LITERAL, yyline + 1, yycolumn, yylength(), data);
}
{HexLiteral}
{
String text = yytext();
Long data = Long.parseLong(text.substring(2), 16);
return new beaver.Symbol(Terminals.INTEGER_LITERAL, yyline + 1, yycolumn + 1, yylength(), data);
return new beaver.Symbol(Terminals.INTEGER_LITERAL, yyline + 1, yycolumn, yylength(), data);
}
{StringLiteral}
{
String text = yytext();
String data = text.substring(1, text.length() - 1);
return new beaver.Symbol(Terminals.STRING_LITERAL, yyline + 1, yycolumn + 1, yylength() - 2, data);
return new beaver.Symbol(Terminals.STRING_LITERAL, yyline + 1, yycolumn, yylength() - 2, data);
}
Multiple declarations for symbol 'dup_name' at locations: [1:1-1:18], [2:1-2:26], [3:1-3:36].
Multiple declarations for symbol 'dup_name' at locations: [1:0-1:17], [2:0-2:25], [3:0-3:35].
Undeclared symbol 'g' at [3:5-3:7].
Undeclared symbol 'g' at [3:4-3:6].
f1 [10:12-10:23] [3:1-8:1]
int [12:10-12:14] (BUILTIN)[0:0-0:0]
int [18:11-18:15] (BUILTIN)[0:0-0:0]
int [3:10-3:14] (BUILTIN)[0:0-0:0]
s [6:15-6:15] [3:17-3:26]
shadowed [10:27-10:34] [1:1-1:18]
shadowed [13:14-13:21] [1:1-1:18]
shadowed [15:12-15:19] [14:5-14:26]
shadowed [5:23-5:30] [4:5-4:22]
sp [20:12-20:13] [19:5-19:16]
string [12:19-12:26] (BUILTIN)[0:0-0:0]
string [3:19-3:26] (BUILTIN)[0:0-0:0]
t [5:15-5:15] [3:8-3:14]
t1 [7:12-7:13] [5:5-5:31]
f1 [10:11-10:22] [3:0-8:0]
int [12:9-12:13] (BUILTIN)[0:0-0:0]
int [18:10-18:14] (BUILTIN)[0:0-0:0]
int [3:9-3:13] (BUILTIN)[0:0-0:0]
s [6:14-6:14] [3:16-3:25]
shadowed [10:26-10:33] [1:0-1:17]
shadowed [13:13-13:20] [1:0-1:17]
shadowed [15:11-15:18] [14:4-14:25]
shadowed [5:22-5:29] [4:4-4:21]
sp [20:11-20:12] [19:4-19:15]
string [12:18-12:25] (BUILTIN)[0:0-0:0]
string [3:18-3:25] (BUILTIN)[0:0-0:0]
t [5:14-5:14] [3:7-3:13]
t1 [7:11-7:12] [5:4-5:30]
testfiles/semacheck/decl-kinds.in[4:5-4:5]: 'g' is declared as a function, but used as a variable.
testfiles/semacheck/decl-kinds.in[5:5-5:7]: 'v' is declared as a variable, but used as a function.
testfiles/semacheck/decl-kinds.in[4:4-4:4]: 'g' is declared as a function, but used as a variable.
testfiles/semacheck/decl-kinds.in[5:4-5:6]: 'v' is declared as a variable, but used as a function.
testfiles/semacheck/global-init.in[1:1-1:11]: Global variable does not allow explicit initialization. Its initial value is always null.
testfiles/semacheck/global-init.in[3:1-3:15]: Global variable does not allow explicit initialization. Its initial value is always null.
testfiles/semacheck/global-init.in[1:0-1:10]: Global variable does not allow explicit initialization. Its initial value is always null.
testfiles/semacheck/global-init.in[3:0-3:14]: Global variable does not allow explicit initialization. Its initial value is always null.
testfiles/semacheck/linkage_kinds.in[5:5-5:5]: 'f' is declared as a function, but used as a variable.
testfiles/semacheck/linkage_kinds.in[6:5-6:9]: 'v' is declared as a variable, but used as a function.
testfiles/semacheck/linkage_kinds.in[5:4-5:4]: 'f' is declared as a function, but used as a variable.
testfiles/semacheck/linkage_kinds.in[6:4-6:8]: 'v' is declared as a variable, but used as a function.
testfiles/semacheck/lvalue-simple.in[2:5-2:5]: Illegal target expression for assignment.
testfiles/semacheck/lvalue-simple.in[3:5-3:7]: Illegal target expression for assignment.
testfiles/semacheck/lvalue-simple.in[4:5-4:9]: Illegal target expression for assignment.
testfiles/semacheck/lvalue-simple.in[5:5-5:9]: Illegal target expression for assignment.
testfiles/semacheck/lvalue-simple.in[6:5-6:10]: Illegal target expression for assignment.
testfiles/semacheck/lvalue-simple.in[7:5-7:8]: Illegal target expression for assignment.
testfiles/semacheck/lvalue-simple.in[9:5-9:8]: Illegal target expression for assignment.
testfiles/semacheck/lvalue-simple.in[13:5-13:8]: Illegal target expression for assignment.
testfiles/semacheck/lvalue-simple.in[2:4-2:4]: Illegal target expression for assignment.
testfiles/semacheck/lvalue-simple.in[3:4-3:6]: Illegal target expression for assignment.
testfiles/semacheck/lvalue-simple.in[4:4-4:8]: Illegal target expression for assignment.
testfiles/semacheck/lvalue-simple.in[5:4-5:8]: Illegal target expression for assignment.
testfiles/semacheck/lvalue-simple.in[6:4-6:9]: Illegal target expression for assignment.
testfiles/semacheck/lvalue-simple.in[7:4-7:7]: Illegal target expression for assignment.
testfiles/semacheck/lvalue-simple.in[9:4-9:7]: Illegal target expression for assignment.
testfiles/semacheck/lvalue-simple.in[13:4-13:7]: Illegal target expression for assignment.
testfiles/semacheck/teal1/nonnull-global.in[1:1-1:20]: Global variable types cannot be qualified.
testfiles/semacheck/teal1/nonnull-global.in[1:0-1:19]: Global variable types cannot be qualified.
testfiles/semacheck/teal1/nonnull-local.in[2:5-2:24]: Qualified local variabes must be initialized.
testfiles/semacheck/teal1/nonnull-local.in[2:4-2:23]: Qualified local variabes must be initialized.
testfiles/semacheck/teal2/struct-member.in[1:1-1:39]: User defined type cannot have formal type parameters.
testfiles/semacheck/teal2/struct-member.in[1:29-1:37]: Actual type parameters are disallowed for types other than array[T].
testfiles/semacheck/teal2/struct-member.in[3:9-3:19]: Actual type parameters are disallowed for types other than array[T].
testfiles/semacheck/teal2/struct-member.in[1:0-1:38]: User defined type cannot have formal type parameters.
testfiles/semacheck/teal2/struct-member.in[1:28-1:36]: Actual type parameters are disallowed for types other than array[T].
testfiles/semacheck/teal2/struct-member.in[3:8-3:18]: Actual type parameters are disallowed for types other than array[T].
Supports Markdown
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