| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \
| | |
| | | |
Fixed one error message and removed two comments.
|
| | | |
|
| | |
| | |
| | |
| | | |
Bug 17481.
|
|\ \ \ |
|
|/| | |
| |/ / |
|
| |\ \ |
|
| | |\ \
| | | | |
| | | | |
| | | | |
| | | | | |
Conflicts:
Makefile.extr
|
| |\ \ \ \
| | |/ / /
| |/| / /
| | |/ /
| | | | |
Conflicts:
Makefile.extr
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This means that CompCert must now be compiled in --table mode.
At this point, the error message for a syntax error is still just "syntax error".
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This affects in which states errors are detected,
but does not change the language that is accepted.
|
| | | |
| | | |
| | | |
| | | | |
This allows us to give a better error message in one state.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
For the first one, this is fine; the error is caught by a type check later on.
For the second one, it is temporary. More thought is needed about the syntax
of K&R functions anyway, as Jacques-Henri and I discovered that it is currently
broken (it mis-interprets some function definitions).
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
list.
This saves 7 states and 4 error states.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This creates more states and does not change the number of error states.
It should make it easier to give a good error message in at least 2 states.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
[declaration_specifier_no_typedef_name*].
This replaces a right-recursive list with a left-recursive list.
This saves 2 states and 6 error states.
|
| | | |
| | | |
| | | |
| | | | |
This results in slightly fewer states.
|
| | | |
| | | |
| | | |
| | | | |
elegant manner.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
a left-recursive list.
This further reduces the number of states (and error states).
|
| | | |
| | | |
| | | |
| | | | |
This saves a few states.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This parameter is passed down in [declaration_specifiers(declaration(phantom))].
This allows us to distinguish between three calling contexts for [declaration_specifiers]:
- we are definitely in a parameter declaration;
- we are definitely in a declaration (e.g., in a block);
- we are in a declaration or in a function definition (i.e., at the top level).
This allows us to give better error messages.
For instance, when inside a block, we know that this cannot be the beginning
of a function definition.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This does not change the automaton at all.
It allows us to distinguish more easily between two contexts:
- the beginning of a declaration or function definition;
- the beginning of a parameter declaration.
This leads to better error messages.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This allows distinguishing two uses of abstract_declarator, within a type_name
and within a parameter_declaration. This provides more static context and
allows giving a better syntax error message, as this allows us know what is
expected next: a closing parenthesis or a comma.
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
These productions were used to give better error messages in some situations.
They are no longer useful, since we are building a whole new system for reporting errors.
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Having the file in memory will help build an error message.
Also, this may be slightly faster.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
of [lex_start_p].
This is required for Menhir to pick up the correct start position of the token.
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | | |
file.
The new option -sdump-suffix allows it to specify another suffix
for the sdump file.
Bug 17326
|
| | |
| | |
| | |
| | |
| | |
| | | |
Since the stacksize is casted to signed int in the alloc frame
function large stacksize lead to assembler containing overflows.
Bug 17473.
|
|\| |
| | |
| | |
| | |
| | | |
Conflicts:
Makefile.extr
|
| | |
| | |
| | |
| | | |
This should save a lot of calls to the shell, menhir, and ocamlfind.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
"table" back-ends when compiling CompCert.
For now, MENHIR_TABLE is set to false, so CompCert is not affected.
Setting MENHIR_TABLE to true builds CompCert using Menhir's table back-end.
This causes a small but repeatable slowdown on "make test", about 2% (roughly 1 second out of 40).
I have tested building ccomp and ccomp.byte.
I have tested with an ocamlfind-installed menhir and with a manually-installed menhir.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
[declaration_specifiers_no_type?].
Inlining these options was not necessary.
This reduces the number of states in the automaton.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
This leads to a smaller automaton.
|
| | |
| | |
| | |
| | |
| | |
| | | |
declarators and FOR loops.
This leads to fewer automaton states, and potentially better error messages.
|