From 504228b1f7b875550eae9e3782a5f2c1033b0233 Mon Sep 17 00:00:00 2001 From: Jacques-Henri Jourdan Date: Wed, 30 Sep 2015 18:41:50 +0200 Subject: 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. --- cparser/Elab.ml | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'cparser/Elab.ml') 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() -*) - -- cgit