diff options
author | No author <no_author@ocaml.org> | 1995-06-15 16:08:54 +0000 |
---|---|---|
committer | No author <no_author@ocaml.org> | 1995-06-15 16:08:54 +0000 |
commit | 77b1c8b89fd8940a63b17c41eb37161e5d159831 (patch) | |
tree | 43dbfb3982d9166b717199cb8faa97bdce30add7 /byterun/oldlexing.c | |
parent | ba79d4bd1f01a70b892c69f6a5e6e86714a023d6 (diff) | |
download | ocaml-unlabeled-1.2.2.tar.gz |
This commit was manufactured by cvs2svn to create branchunlabeled-1.2.2
'unlabeled-1.2.2'.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unlabeled-1.2.2@37 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/oldlexing.c')
-rw-r--r-- | byterun/oldlexing.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/byterun/oldlexing.c b/byterun/oldlexing.c deleted file mode 100644 index 3d5d4a0903..0000000000 --- a/byterun/oldlexing.c +++ /dev/null @@ -1,36 +0,0 @@ -/* The "get_next_char" routine for lexers generated by camllex. */ - -#include "interp.h" -#include "mlvalues.h" -#include "stacks.h" -#include "str.h" - -struct lexer_buffer { - value refill_buff; - value lex_buffer; - value lex_abs_pos; - value lex_start_pos; - value lex_curr_pos; - value lex_last_pos; - value lex_last_action; -}; - -value get_next_char(lexbuf) /* ML */ - struct lexer_buffer * lexbuf; -{ - mlsize_t buffer_len, curr_pos; - - buffer_len = string_length(lexbuf->lex_buffer); - curr_pos = Long_val(lexbuf->lex_curr_pos); - if (curr_pos >= buffer_len) { - Push_roots (r, 1); - r[0] = (value) lexbuf; - callback(lexbuf->refill_buff, (value) lexbuf); - lexbuf = (struct lexer_buffer *) r[0]; - curr_pos = Long_val(lexbuf->lex_curr_pos); - Pop_roots (); - } - lexbuf->lex_curr_pos += 2; - return Val_int(Byte_u(lexbuf->lex_buffer, curr_pos)); -} - |