Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Grigory bugfix

  • Loading branch information...
commit de5983ff44fa630b5b958fd2bf6c44e7efedff1f 1 parent 644cea4
Lukas authored
Showing with 10 additions and 3 deletions.
  1. +10 −3 main.ml
View
13 main.ml
@@ -223,9 +223,16 @@ let main () =
fprintf !errfile_ref "\nSyntax error! Wrong character sequence:\nPosition in line: (%d - %d)\nCharacter sequence: %s\n\n" start_cnum curr_cnum curr_tok; flush !errfile_ref;
flush !outfile_ref;
if !infile_ref != stdin then (close_in !infile_ref; fprintf stderr "Warning: input channel is changed to the default one!\n";);
+ fprintf !errfile_ref "\nIf YADI stops, please, type \"/\" and press \"Enter\" to continue!\n"; flush !errfile_ref;
infile_ref := stdin;
- curr_lexbuf := Lexing.from_channel !infile_ref;
- if ( true ) then raise ERROR_DONE;
+ curr_lexbuf := Lexing.from_channel !infile_ref;
+ while true do
+ let tmp_line = input_line !infile_ref in
+ match tmp_line
+ with
+ | _ -> if (String.contains tmp_line '/') then raise ERROR_DONE;
+ done;
+ (*if ( true ) then raise ERROR_DONE;*)
with
| ERROR_DONE ->
fprintf !errfile_ref "\n"; flush !errfile_ref;)
@@ -235,7 +242,7 @@ let main () =
fprintf !errfile_ref "Error: %s\n" arg; flush !errfile_ref;
| _ ->
if (!exit_val) then raise Eof;
- fprintf !errfile_ref "\nFatal Error: error is unknown!\n YADI will be closed! It's recommended to report the problem to the developers of YADI!\n\n\n"; flush !errfile_ref;)
+ fprintf !errfile_ref "\nFatal Error: error is unknown!\nYADI will be closed! It's recommended to report the problem to the developers of YADI!\n\n\n"; flush !errfile_ref; raise Eof;)
done
with Eof ->
Please sign in to comment.
Something went wrong with that request. Please try again.