aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/ErrorReports.ml
Commit message (Collapse)AuthorAgeFilesLines
* [BROKEN] Merge with v3.9 : something broken for __builtin_expect in ↵Cyril SIX2021-06-011-4/+5
| | | | cfrontend/C2C.ml
* Fixed a comment.François Pottier2016-05-271-3/+2
|
* Use 1-based column numbers instead of 0-based.François Pottier2015-11-241-2/+2
| | | | This seems to agree with clang and with the emacs C mode.
* When printing a fragment of source text as part of an error message, ↵François Pottier2015-11-031-1/+9
| | | | | | | compress multiple whitespace characters into just one space character. This is done before the call to [sanitize], which replaces special characters with a dot. This produces more a readable result when the error spans multiple lines.
* Set [ErrorReports.debug] to [false].François Pottier2015-10-281-1/+1
| | | | | | When [debug] is [false], there are a few places where we silently ignore an error. This should not make any difference if everything works as planned.
* Added copyright banners to the new files.François Pottier2015-10-231-0/+15
|
* Install the new system for reporting syntax errors.François Pottier2015-10-231-0/+239
This requires the development version of Menhir, to be released soon. In summary: handcrafted.messages is new. It contains a mapping of erroneous sentences to error messages, together with a lot of comments. Makefile.extr is new. It contains a rule to generate cparser/pre_parser_messages.ml based on this mapping. cparser/ErrorReports.{ml,mli} are new. They construct syntax error messages, based on the compiled mapping. cparser/Lexer.mll is modified. The last two tokens that have been read are stored in a buffer. ErrorReports is called to construct a syntax error message. cparser/GNUmakefile is new. It offers several commands for working on the pre-parser. cparser/deLexer.ml is new. It is a script (it is not linked into CompCert). It translates the symbolic name of a token to an example of this token in concrete C syntax. It is used by [make -C cparser concrete] to produce the .c files in tests/generated/. cparser/tests/generated/Makefile is new. It runs ccomp, clang and gcc on each of the generated C files, so as to allow a comparison of the error messages.