From 797829058aedff543c1f30b269b8fc8a0be35e36 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Tue, 18 Feb 2020 15:38:53 +0100 Subject: Support vertical tabs and treat them as whitespace (#218) Some preprocessors don't remove the vertical tab from the input so we should be able to handle them in the lexer. --- cparser/Lexer.mll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cparser') diff --git a/cparser/Lexer.mll b/cparser/Lexer.mll index 346477b5..e44a330f 100644 --- a/cparser/Lexer.mll +++ b/cparser/Lexer.mll @@ -177,7 +177,7 @@ let identifier_nondigit = let identifier = identifier_nondigit (identifier_nondigit|digit)* (* Whitespaces *) -let whitespace_char_no_newline = [' ' '\t' '\012' '\r'] +let whitespace_char_no_newline = [' ' '\t' '\011' '\012' '\r'] (* Integer constants *) let nonzero_digit = ['1'-'9'] -- cgit From 3bffda879e214345635e575a696e8f184bef0e55 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Thu, 20 Feb 2020 09:41:16 +0100 Subject: Cosmetic: in OCaml code, write "open! Module" instead of "open !Module" "open!" is the form used in the examples in the OCaml manual. Based on a quick poll it seems to be the preferred form of the OCaml core dev team. --- cparser/Elab.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cparser') diff --git a/cparser/Elab.ml b/cparser/Elab.ml index 3dbb9d45..9aa6761c 100644 --- a/cparser/Elab.ml +++ b/cparser/Elab.ml @@ -21,7 +21,7 @@ open Machine open Cabs open C open Diagnostics -open !Cutil +open! Cutil (** * Utility functions *) -- cgit