diff options
author | No author <no_author@ocaml.org> | 1995-06-15 08:17:30 +0000 |
---|---|---|
committer | No author <no_author@ocaml.org> | 1995-06-15 08:17:30 +0000 |
commit | f0a0321f07084edd6d4b4761b855d74e0521a86a (patch) | |
tree | 1a49ecaa36e8d05f8171b3395e46f69e24e94462 /byterun/oldlexing.c | |
parent | 3ceaa85c72b2094bb090a1819b65a2792cf2d3c1 (diff) | |
download | ocaml-unlabeled-1.1.2.tar.gz |
This commit was manufactured by cvs2svn to create branchunlabeled-1.1.2
'unlabeled-1.1.2'.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unlabeled-1.1.2@35 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)); -} - |