diff options
author | Jacques-Henri Jourdan <jacques-henri.jourdan@inria.fr> | 2015-09-30 18:41:50 +0200 |
---|---|---|
committer | Jacques-Henri Jourdan <jacques-henri.jourdan@inria.fr> | 2015-09-30 18:41:50 +0200 |
commit | 504228b1f7b875550eae9e3782a5f2c1033b0233 (patch) | |
tree | f3e5121f9694fb57974697475f88361b42da8330 /cparser/Elab.ml | |
parent | c212ab7a8adea516db72f17d818393629dbde1b3 (diff) | |
download | compcert-504228b1f7b875550eae9e3782a5f2c1033b0233.tar.gz compcert-504228b1f7b875550eae9e3782a5f2c1033b0233.zip |
Fixed a few bugs in the pre parser. In particular, the following code
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.
Diffstat (limited to 'cparser/Elab.ml')
-rw-r--r-- | cparser/Elab.ml | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/cparser/Elab.ml b/cparser/Elab.ml index 820f90f5..6a238572 100644 --- a/cparser/Elab.ml +++ b/cparser/Elab.ml @@ -2250,20 +2250,3 @@ let elab_file prog = reset(); ignore (elab_definitions false (Builtins.environment()) prog); elaborated_program() -(* - let rec inf = Datatypes.S inf in - let ast:Cabs.definition list = - Obj.magic - (match Parser.translation_unit_file inf (Lexer.tokens_stream lb) with - | Parser.Parser.Inter.Fail_pr -> - (* Theoretically impossible : implies inconsistencies - between grammars. *) - Cerrors.fatal_error "Internal error while parsing" - | Parser.Parser.Inter.Timeout_pr -> assert false - | Parser.Parser.Inter.Parsed_pr (ast, _ ) -> ast) - in - reset(); - ignore (elab_definitions false (Builtins.environment()) ast); - elaborated_program() -*) - |