Commit 49fd3245 authored by Pietro Abate's avatar Pietro Abate

[r2003-05-31 20:59:39 by cvscast] Protect against Stream.Failure in Parser.sync -- Alain

Original author: cvscast
Date: 2003-05-31 20:59:39+00:00
parent eb2f1586
......@@ -135,6 +135,7 @@ misc/q_symbol.cmo: misc/q_symbol.ml
.PHONY: expat
expat:
(cd expat; make)
make cduce EXPAT=true
.ml.cmo:
$(CAMLC) -c $(SYNTAX_PARSER) $(INCLUDES) $<
......
......@@ -6,6 +6,7 @@ open Ident
let () = Grammar.error_verbose := true
*)
let gram = Grammar.gcreate (Wlexer.lexer Wlexer.token Wlexer.latin1_engine)
let true_atom = Atoms.mk_ascii "true"
......@@ -470,11 +471,6 @@ EXTEND
];
END
let pat' = Grammar.Entry.create gram "type/pattern expression"
EXTEND GLOBAL: pat pat';
pat': [ [ p = pat; EOI -> p ] ];
END
let pat = Grammar.Entry.parse pat
and expr = Grammar.Entry.parse expr
and prog = Grammar.Entry.parse prog
......@@ -487,3 +483,7 @@ let rec sync s =
| ';' -> ()
| _ -> sync s)
| _ -> sync s
let sync s =
try sync s with Stream.Failure -> ()
......@@ -246,7 +246,7 @@ let rec token engine lexbuf =
"EOI","" )
| 8 -> (
# 126 "parser/wlexer.mll"
error
Printf.eprintf "XXX\n"; error
(Lexing.lexeme_start lexbuf) (Lexing.lexeme_end lexbuf)
(Illegal_character ((Lexing.lexeme lexbuf).[0])) )
| _ -> failwith "lexing: empty token [token]"
......
......@@ -123,7 +123,7 @@ rule token = parse
| eof
{ "EOI","" }
| _
{ error
{ Printf.eprintf "XXX\n"; error
(Lexing.lexeme_start lexbuf) (Lexing.lexeme_end lexbuf)
(Illegal_character ((Lexing.lexeme lexbuf).[0])) }
......
......@@ -9,8 +9,10 @@ type Row = <row> [
<zip>[PCDATA]
]
(*
include "../../web/xhtml-strict.cd"
(* type Xhtml = Any *)
*)
type Xhtml = Any
let fun dbonerow (<table> x : Table) : Xhtml =
<html>[
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment