Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
49fd3245
Commit
49fd3245
authored
Oct 05, 2007
by
Pietro Abate
Browse files
[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
Changes
5
Hide whitespace changes
Inline
Side-by-side
Makefile.distrib
View file @
49fd3245
...
...
@@ -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)
$<
...
...
parser/parser.ml
View file @
49fd3245
...
...
@@ -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
->
()
parser/wlexer.ml
View file @
49fd3245
...
...
@@ -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
]
"
...
...
parser/wlexer.mll
View file @
49fd3245
...
...
@@ -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
]))
}
...
...
tests/xsltmark/dbonerow.cd
View file @
49fd3245
...
...
@@ -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>
[
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment