summaryrefslogtreecommitdiff
path: root/data/bison-default.css
Commit message (Collapse)AuthorAgeFilesLines
* diagnostics: report syntax errors in colorAkim Demaille2020-01-231-0/+3
| | | | | | | * src/parse-gram.y (parse.error): Set to 'custom'. (yyreport_syntax_error): New. * data/bison-default.css (.expected, .unexpected): New. * tests/diagnostics.at: Adjust.
* package: bump copyrights to 2020Akim Demaille2020-01-051-1/+1
| | | | Run 'make update-copyright'.
* diagnostics: suggest fixes for undeclared symbolsAkim Demaille2019-10-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | From input.y:1.17-19: warning: symbol baz is used, but is not defined as a token and has no rules [-Wother] 1 | %printer {} foo baz | ^~~ to input.y:1.17-19: warning: symbol 'baz' is used, but is not defined as a token and has no rules; did you mean 'bar'? [-Wother] 1 | %printer {} foo baz | ^~~ | bar * bootstrap.conf: We need fstrcmp. * src/symtab.c (symbol_from_uniqstr_fuzzy): New. (complain_symbol_undeclared): Use it. * tests/diagnostics.at (Suggestions): New. * data/bison-default.css (insertion): Rename as... (fixit-insert): this, as this is what GCC uses.
* diagnostics: display suggested update after the caret-infoAkim Demaille2019-10-061-0/+5
| | | | | | | | | | | | | | | | | | | | This commit adds the suggestion in green, on the line below the caret-and-tildes. foo.y:1.1-14: warning: deprecated directive: '%error-verbose', use '%define parse.error verbose' [-Wdeprecated] 1 | %error-verbose | ^~~~~~~~~~~~~~ | %define parse.error verbose The current approach, with location_caret_suggestion, is fragile: there's a protocol of calls to the complain functions which is strict. We should rather have a richer structure describing the diagnostics, including with submessages such as the suggestions, passed in the end to the routines in charge of formatting and printing them. * src/location.h, src/location.c (location_caret_suggestion): New. * src/complain.c (deprecated_directive): Use it. * tests/diagnostics.at, tests/input.at: Adjust expectations.
* traces: add some colorsAkim Demaille2019-06-091-0/+1
| | | | | | | This is an experiment. Maybe more styles will be used (in which case a short-hand function will be useful), maybe it will be just reverted. * data/bison-default.css (.traces0): New. * src/lalr.c (lalr): Use it.
* NEWS: update for 3.4Akim Demaille2019-05-191-1/+1
|
* diagnostics: clean up convention for colored diagnosticsAkim Demaille2019-05-191-0/+24
* data/diagnostics.css: Rename as... * data/bison-default.css: this. Add the GPL header. This is the convention followed by Bruno Haible in gettext. Adjust dependencies. * src/complain.c (complain_init_color): Use BISON_STYLE instead of BISON_DIAGNOSTICS_STYLE.