diff options
Diffstat (limited to 'test/Lex/testmain.ml')
-rw-r--r-- | test/Lex/testmain.ml | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/test/Lex/testmain.ml b/test/Lex/testmain.ml deleted file mode 100644 index e0a914ee09..0000000000 --- a/test/Lex/testmain.ml +++ /dev/null @@ -1,34 +0,0 @@ -(* The lexer generator. Command-line parsing. *) - -#open "syntax";; -#open "testscanner";; -#open "grammar";; -#open "lexgen";; -#open "output";; - -let main () = - ic := stdin; - oc := stdout; - let lexbuf = lexing.from_channel ic in - let (Lexdef(header,_) as def) = - try - grammar.lexer_definition testscanner.main lexbuf - with - parsing.Parse_error x -> - prerr_string "Syntax error around char "; - prerr_int (lexing.lexeme_start lexbuf); - prerr_endline "."; - sys.exit 2 - | scan_aux.Lexical_error s -> - prerr_string "Lexical error around char "; - prerr_int (lexing.lexeme_start lexbuf); - prerr_string ": "; - prerr_string s; - prerr_endline "."; - sys.exit 2 in - let ((init, states, acts) as dfa) = make_dfa def in - output_lexdef header dfa -;; - -main(); sys.exit 0 -;; |