| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
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.
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
This leads to a small savings in the number of states (which could
become greater in the future if we decide to parameterize expressions).
If desired, the old automaton could be recovered by marking the binary
operators as %inline.
|
|
|
|
| |
This is analogous to the previous commit.
|
|
|
|
|
|
|
|
|
|
|
| |
[struct_or_union_specifier].
The old version was strictly equivalent to using [ioption(other_identifier)].
The new version uses [option(other_identifier)] instead, that is, [other_identifier?].
Technically, this means that [set_id_type i OtherId] is called slightly earlier (at
the opening brace, instead of at the closing brace), but this does not make any
difference, since the re-classification of identifiers affects only the second
parsing phase.
|
|
|
|
|
|
|
| |
A TYPEDEF_NAME is already classified as a [TypedefId] by the lexer,
and similarly, a VAR_NAME is already classified as a [VarId].
Thus, the removed calls had no effect.
The remaining calls to [set_id_type] are useful, as they can re-classify a token.
|
|
|
|
|
|
| |
i OtherId].
This causes no change in the automaton.
|
|
|
|
| |
I missed this opportunity in the previous commit.
|
|
|
|
|
|
|
|
|
| |
The existing [option(X)] was marked %inline, and has been renamed [ioption(X)].
A new [option(X)], which is not marked %inline, has been introduced.
The grammar now uses [option] everywhere, except where [ioption] is necessary
in order to avoid conflicts.
This reduces the number of states in the automaton. The number of LR(0) cores
drops from 857 to 712.
|
| |
|
|
|
|
| |
This violates the 80-column width limit, but is really important.
|
|
|
|
|
|
|
| |
Passing --no-stdlib ensures that there is no dependency on Menhir's
standard library.
Passing -v, which is equivalent to --explain --dump, requests the
generation of pre_parser.automaton, a description of the automaton.
|
|
|
|
| |
handled as a function with void parameter.
|
|\ |
|
| | |
|
| |
| |
| |
| | |
information.
|
| |
| |
| |
| |
| | |
C11 allows a typedef redefinition if the types are the same.
We now allow this also and issue a warning and an error if the types are different.
|
|/ |
|
| |
|
| |
|
|\
| |
| |
| |
| | |
Conflicts:
debug/DebugInformation.ml
|
| | |
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
| |
Since files without function definition contain no function in the
Section_text the filenum would be empty otherwise.
|
| |
|
| |
|
|\
| |
| | |
Correction of a few bugs in the pre-parser, added comments.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
was not parsed correctly:
typedef int a;
int f() {
for(int a; ;)
if(1);
a * x;
}
Additionnaly, I tried to add some comments in the pre-parser code,
especially for the different hacks used to solve various conflicts.
|
| | |
|