aboutsummaryrefslogtreecommitdiff
path: root/srcpos.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2014-01-03 23:23:23 +1100
committerDavid Gibson <david@gibson.dropbear.id.au>2014-01-04 10:04:20 +1100
commitc854434dc2e955d2053bccb6c763dcfb75d0842b (patch)
tree3dd9d74a0a73f96b72a0afcacd5a0656b473426c /srcpos.c
parent6a15eb2350426d285130e4c9d84c0bdb6575547a (diff)
downloaddtc-c854434dc2e955d2053bccb6c763dcfb75d0842b.zip
dtc-c854434dc2e955d2053bccb6c763dcfb75d0842b.tar.gz
dtc-c854434dc2e955d2053bccb6c763dcfb75d0842b.tar.bz2
Correct locations in parser error messaes
The print_error() function used in several places in the parser uses the location information in yylloc to describe the location of the error. This is not correct in most cases. yylloc gives the location of the lookahead token, whereas the error is generally associated with one of the already parsed non-terminals. This patch corrects this, adding a location parameter to print_error() and supplying it with the appropriate bison @N symbols. This probably breaks yacc compatiblity, but too bad - accurate error messages are more important. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'srcpos.c')
0 files changed, 0 insertions, 0 deletions