[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] misleading references
From: |
Alex Rozenman |
Subject: |
[PATCH] misleading references |
Date: |
Sat, 8 Aug 2009 19:01:04 +0300 |
Hello,
I pushed the attached commit to master and branch-2.5. This will convert
"misleading references" errors into warnings.
The following is some points I would like to address/discuss in near future:
1. Is there some way to keep sub-messages aligned ? For example if I have:
test.y:51.51-60: warning: misleading reference: `$<ival>exp'
test.y:42.1-3: warning: refers to: $exp at $$
test.y:51.7: warning: possibly meant: $x, hiding $exp at $1
test.y:51.41: warning: possibly meant: $r, hiding $exp at $4
Sub-messages change their position according to number of digits in location
info. Is it acceptable to develop some mechanism in order to keep all this
stuff aligned ?
2. In the previous example, in suggestions, bison prints "$exp" instead of
$<ival>exp. I am going to fix it.
3. As it was reported by Akim, in cases of "symbol not found", bison
currently prints all the reference including dots and dashes. For example:
stat: sym_a sym_b { func($some_other.field); };
bison prints:
test1.y:5.8-21: invalid reference: `$some_other.field', symbol not found
In my opinion the message is correct, but keeping in mind that this is the
most frequent error message, we can simplify it, for example:
test1.y:5.8-15: invalid reference: `$some_other', symbol not found
or
test1.y:5.9-15: symbol not found: some_other
or
test1.y:5.8-21: invalid reference: `$some_other.field', symbol not found:
some_other
Please advice.
3. I am still not sure that repeating of "warning" word for each
sub-messages makes sense.
--
Best regards,
Alex Rozenman (address@hidden).
ce268795cc020e408845fd4d1fefeddab121fe3d.txt
Description: Text document
- [PATCH] misleading references,
Alex Rozenman <=