type token =
| IndexOne of (int)
| IndexMany of (int*int)
| ADD
| DELETE
| CHANGE
| SEP
| EOF
| AddedString of (string)
| DeletedString of (string)
open Parsing;;
# 27 "odiff/odiff_parser.mly"
open Odiff_types
let print_DEBUG s = print_string s; print_newline ()
# 28 "odiff/odiff_parser.ml"
let yytransl_const = [|
259 ;
260 ;
261 ;
262 ;
0 ;
0|]
let yytransl_block = [|
257 ;
258 ;
263 ;
264 ;
0|]
let yylhs = "\255\255\001\000\001\000\002\000\002\000\003\000\003\000\003\000\004\000\004\000\005\000\005\000\006\000\006\000\000\000"
let yylen = "\002\000\002\000\001\000\001\000\002\000\004\000\004\000\006\000\001\000\001\000\001\000\002\000\001\000\002\000\002\000"
let yydefred = "\000\000\000\000\000\000\008\000\t\000\002\000\014\000\000\000\000\000\000\000\001\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\005\000\000\000\006\000\000\000\011\000\013\000\000\000\007\000"
let yydgoto = "\002\000\006\000\007\000\008\000\t\000\019\000\021\000"
let yysindex = "\255\255\003\000\000\000\000\000\000\000\000\000\000\000\004\000\016\255\007\255\000\000\000\000\016\255\016\255\016\255\255\254\005\255\005\255\255\254\000\000\005\255\000\000\013\255\000\000\000\000\255\254\000\000"
let yyrindex = "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000"
let yygindex = "\000\000\000\000\013\000\000\000\002\000\240\255\244\255"
let yytablesize = 265
let yytable = "\001\000\012\000\023\000\005\000\n\000\022\000\018\000\n\000\024\000\026\000\012\000\013\000\014\000\020\000\015\000\016\000\017\000\003\000\004\000\025\000\003\000\011\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\012\000\012\000\003\000\004\000\000\000\012\000\n\000\n\000"
let yycheck = "\001\000\000\000\018\000\000\000\000\000\017\000\007\001\000\000\020\000\025\000\003\001\004\001\005\001\008\001\012\000\013\000\014\000\001\001\002\001\006\001\000\000\008\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\001\001\002\001\001\001\002\001\255\255\006\001\001\001\002\001"
let yynames_const = "ADD\000DELETE\000CHANGE\000SEP\000EOF\000"
let yynames_block = "IndexOne\000IndexMany\000AddedString\000DeletedString\000"
let yyact = [|
(fun _ -> failwith "parser")
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 1 : 'diffs) in
Obj.repr(
# 58 "odiff/odiff_parser.mly"
( _1 )
# 171 "odiff/odiff_parser.ml"
: Odiff_types.diffs))
; (fun __caml_parser_env ->
Obj.repr(
# 59 "odiff/odiff_parser.mly"
( [] )
# 177 "odiff/odiff_parser.ml"
: Odiff_types.diffs))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 0 : 'diff) in
Obj.repr(
# 63 "odiff/odiff_parser.mly"
( [_1] )
# 184 "odiff/odiff_parser.ml"
: 'diffs))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 1 : 'diff) in
let _2 = (Parsing.peek_val __caml_parser_env 0 : 'diffs) in
Obj.repr(
# 64 "odiff/odiff_parser.mly"
( _1 :: _2 )
# 192 "odiff/odiff_parser.ml"
: 'diffs))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 3 : 'index) in
let _3 = (Parsing.peek_val __caml_parser_env 1 : 'index) in
let _4 = (Parsing.peek_val __caml_parser_env 0 : 'added_text) in
Obj.repr(
# 68 "odiff/odiff_parser.mly"
( Add (_1, _3, _4) )
# 201 "odiff/odiff_parser.ml"
: 'diff))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 3 : 'index) in
let _3 = (Parsing.peek_val __caml_parser_env 1 : 'index) in
let _4 = (Parsing.peek_val __caml_parser_env 0 : 'deleted_text) in
Obj.repr(
# 69 "odiff/odiff_parser.mly"
( Delete (_1, _3, _4) )
# 210 "odiff/odiff_parser.ml"
: 'diff))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 5 : 'index) in
let _3 = (Parsing.peek_val __caml_parser_env 3 : 'index) in
let _4 = (Parsing.peek_val __caml_parser_env 2 : 'deleted_text) in
let _6 = (Parsing.peek_val __caml_parser_env 0 : 'added_text) in
Obj.repr(
# 70 "odiff/odiff_parser.mly"
( Change (_1, _4, _3, _6) )
# 220 "odiff/odiff_parser.ml"
: 'diff))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 0 : int) in
Obj.repr(
# 74 "odiff/odiff_parser.mly"
( One _1 )
# 227 "odiff/odiff_parser.ml"
: 'index))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 0 : int*int) in
Obj.repr(
# 75 "odiff/odiff_parser.mly"
( Many (fst _1, snd _1) )
# 234 "odiff/odiff_parser.ml"
: 'index))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in
Obj.repr(
# 79 "odiff/odiff_parser.mly"
( _1 )
# 241 "odiff/odiff_parser.ml"
: 'added_text))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 1 : string) in
let _2 = (Parsing.peek_val __caml_parser_env 0 : 'added_text) in
Obj.repr(
# 80 "odiff/odiff_parser.mly"
( _1 ^"\n"^ _2 )
# 249 "odiff/odiff_parser.ml"
: 'added_text))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in
Obj.repr(
# 84 "odiff/odiff_parser.mly"
( _1 )
# 256 "odiff/odiff_parser.ml"
: 'deleted_text))
; (fun __caml_parser_env ->
let _1 = (Parsing.peek_val __caml_parser_env 1 : string) in
let _2 = (Parsing.peek_val __caml_parser_env 0 : 'deleted_text) in
Obj.repr(
# 85 "odiff/odiff_parser.mly"
( _1 ^"\n"^ _2 )
# 264 "odiff/odiff_parser.ml"
: 'deleted_text))
; (fun __caml_parser_env -> raise (Parsing.YYexit (Parsing.peek_val __caml_parser_env 0)))
|]
let yytables =
{ Parsing.actions=yyact;
Parsing.transl_const=yytransl_const;
Parsing.transl_block=yytransl_block;
Parsing.lhs=yylhs;
Parsing.len=yylen;
Parsing.defred=yydefred;
Parsing.dgoto=yydgoto;
Parsing.sindex=yysindex;
Parsing.rindex=yyrindex;
Parsing.gindex=yygindex;
Parsing.tablesize=yytablesize;
Parsing.table=yytable;
Parsing.check=yycheck;
Parsing.error_function=parse_error;
Parsing.names_const=yynames_const;
Parsing.names_block=yynames_block }
let main (lexfun : Lexing.lexbuf -> token) (lexbuf : Lexing.lexbuf) =
(Parsing.yyparse yytables 1 lexfun lexbuf : Odiff_types.diffs)
;;
# 89 "odiff/odiff_parser.mly"
# 291 "odiff/odiff_parser.ml"