summaryrefslogtreecommitdiff
path: root/lex
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2013-03-09 22:38:52 +0000
committerDamien Doligez <damien.doligez-inria.fr>2013-03-09 22:38:52 +0000
commitc63f9e09579ba88c4b9510ccce062fbc767fd3a6 (patch)
treea9a7f7ef5f2c1a7d84ba7034e3ed12422800ec96 /lex
parentfb36548704ce096310707204c77218fe4d69f069 (diff)
downloadocaml-c63f9e09579ba88c4b9510ccce062fbc767fd3a6.tar.gz
fix a few problems with whitespace and over-long lines
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13393 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'lex')
-rw-r--r--lex/Makefile3
-rw-r--r--lex/Makefile.nt3
-rw-r--r--lex/lexgen.ml5
-rw-r--r--lex/main.ml3
-rw-r--r--lex/output.ml2
-rw-r--r--lex/outputbis.ml2
-rw-r--r--lex/parser.mly3
7 files changed, 13 insertions, 8 deletions
diff --git a/lex/Makefile b/lex/Makefile
index 00e5c9f941..4c76463189 100644
--- a/lex/Makefile
+++ b/lex/Makefile
@@ -20,7 +20,8 @@ CAMLLEX=../boot/ocamlrun ../boot/ocamllex
CAMLDEP=../boot/ocamlrun ../tools/ocamldep
-OBJS=cset.cmo syntax.cmo parser.cmo lexer.cmo table.cmo lexgen.cmo compact.cmo common.cmo output.cmo outputbis.cmo main.cmo
+OBJS=cset.cmo syntax.cmo parser.cmo lexer.cmo table.cmo lexgen.cmo \
+ compact.cmo common.cmo output.cmo outputbis.cmo main.cmo
all: ocamllex
allopt: ocamllex.opt
diff --git a/lex/Makefile.nt b/lex/Makefile.nt
index 197637ed17..8c005cfd07 100644
--- a/lex/Makefile.nt
+++ b/lex/Makefile.nt
@@ -24,7 +24,8 @@ CAMLLEX=../boot/ocamlrun ../boot/ocamllex
CAMLDEP=../boot/ocamlrun ../tools/ocamldep
DEPFLAGS=
-OBJS=cset.cmo syntax.cmo parser.cmo lexer.cmo table.cmo lexgen.cmo compact.cmo common.cmo output.cmo outputbis.cmo main.cmo
+OBJS=cset.cmo syntax.cmo parser.cmo lexer.cmo table.cmo lexgen.cmo \
+ compact.cmo common.cmo output.cmo outputbis.cmo main.cmo
all: ocamllex syntax.cmo
allopt: ocamllex.opt
diff --git a/lex/lexgen.ml b/lex/lexgen.ml
index 751db9dc80..62c6f22fa8 100644
--- a/lex/lexgen.ml
+++ b/lex/lexgen.ml
@@ -506,7 +506,7 @@ let encode_lexdef def =
chars_count := 0;
let entry_list =
List.map
- (fun {name=entry_name ; args=args ; shortest=shortest ; clauses= casedef} ->
+ (fun {name=entry_name; args=args; shortest=shortest; clauses=casedef} ->
let (re,actions,_,ntags) = encode_casedef casedef in
{ lex_name = entry_name;
lex_regexp = re;
@@ -604,7 +604,8 @@ let followpos size entry_list =
fill s r2
| Star r ->
fill (TransSet.union (firstpos r) s) r in
- List.iter (fun (entry,_,_) -> fill TransSet.empty entry.lex_regexp) entry_list ;
+ List.iter (fun (entry,_,_) -> fill TransSet.empty entry.lex_regexp)
+ entry_list;
v
(************************)
diff --git a/lex/main.ml b/lex/main.ml
index 4cc6ef6450..97b114a1e0 100644
--- a/lex/main.ml
+++ b/lex/main.ml
@@ -32,7 +32,8 @@ let print_version_num () =
let specs =
["-ml", Arg.Set ml_automata,
- " Output code that does not use the Lexing module built-in automata interpreter";
+ " Output code that does not use the Lexing module built-in automata \
+ interpreter";
"-o", Arg.String (fun x -> output_name := Some x),
" <file> Set output file name to <file>";
"-q", Arg.Set Common.quiet_mode, " Do not display informational messages";
diff --git a/lex/output.ml b/lex/output.ml
index 7ecdd0f729..ae1df0e1fd 100644
--- a/lex/output.ml
+++ b/lex/output.ml
@@ -97,7 +97,7 @@ let output_entry sourcefile ic oc oci e =
fprintf oc "\n")
e.auto_actions;
fprintf oc " | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; \
- __ocaml_lex_%s_rec %alexbuf __ocaml_lex_state\n\n"
+ __ocaml_lex_%s_rec %alexbuf __ocaml_lex_state\n\n"
e.auto_name output_args e.auto_args
(* Main output function *)
diff --git a/lex/outputbis.ml b/lex/outputbis.ml
index 6166dd516e..57851ab495 100644
--- a/lex/outputbis.ml
+++ b/lex/outputbis.ml
@@ -157,7 +157,7 @@ let output_entry sourcefile ic oc tr e =
\n let __ocaml_lex_result = __ocaml_lex_state%d lexbuf in\
\n lexbuf.Lexing.lex_start_p <- lexbuf.Lexing.lex_curr_p;\
\n lexbuf.Lexing.lex_curr_p <- {lexbuf.Lexing.lex_curr_p with\
-\n Lexing.pos_cnum = lexbuf.Lexing.lex_abs_pos + lexbuf.Lexing.lex_curr_pos};\
+\n Lexing.pos_cnum = lexbuf.Lexing.lex_abs_pos+lexbuf.Lexing.lex_curr_pos};\
\n match __ocaml_lex_result with\n"
e.auto_name output_args e.auto_args
e.auto_mem_size (output_memory_actions " ") init_moves init_num ;
diff --git a/lex/parser.mly b/lex/parser.mly
index 6c6185e931..fe8260d766 100644
--- a/lex/parser.mly
+++ b/lex/parser.mly
@@ -48,7 +48,8 @@ let as_cset = function
%token <int> Tchar
%token <string> Tstring
%token <Syntax.location> Taction
-%token Trule Tparse Tparse_shortest Tand Tequal Tend Tor Tunderscore Teof Tlbracket Trbracket
+%token Trule Tparse Tparse_shortest Tand Tequal Tend Tor Tunderscore Teof
+ Tlbracket Trbracket
%token Tstar Tmaybe Tplus Tlparen Trparen Tcaret Tdash Tlet Tas Tsharp
%right Tas