]> git.donarmstrong.com Git - lilypond.git/blobdiff - mi2mu/my-midi-lexer.cc
patch::: 0.1.9.jcn3: pats
[lilypond.git] / mi2mu / my-midi-lexer.cc
index 63dfb06d8f42b2991ecf9808006005021f9103ba..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,86 +0,0 @@
-//
-// my-midi-lexer.cc -- implement My_midi_lexer
-//
-// copyright 1997 Jan Nieuwenhuizen <jan@digicash.com>
-
-#include "string-convert.hh"
-#include "mi2mu-global.hh"
-#include "my-midi-lexer.hh"
-#include "source.hh"
-#include "source-file.hh"
-
-int
-yylex() 
-{
-    return midi_lexer_l_g->yylex();
-}
-
-My_midi_lexer* midi_lexer_l_g = 0;
-
-My_midi_lexer::My_midi_lexer (String &filename_str, Sources * sources)
-{
-    source_file_l_ = sources->get_file_l(filename_str);
-    if  (!source_file_l_)
-       ::error  ("can't find: `" + filename_str + "'");
-    switch_streams (source_file_l_->istream_l(), 0);
-    errorlevel_i_ = 0;
-    char_count_ = 0;
-    running_status_i_ = 0;
-}
-
-My_midi_lexer::~My_midi_lexer()
-{
-//    delete source_file_p_;
-}
-
-void
-My_midi_lexer::error (char const* sz_l)
-{
-    if (1|| !source_file_l_) {
-       cerr << "error at EOF: `" << sz_l << "'\n";
-    } else {
-       
-       // FIXME
-       #if 0
-       char const* ch_C = here_ch_C();
-       if  (ch_C) {
-           ch_C--;
-           while  ( (*ch_C == ' ') ||  (*ch_C == '\t') ||  (*ch_C == '\n'))
-               ch_C--;
-           ch_C++;
-       }
-       errorlevel_i_ |= 1;
-       error (sz_l);
-       #endif
-    }
-}
-
-char const*
-My_midi_lexer::here_ch_C()
-{
-    return source_file_l_->ch_C() + char_count_ ;
-}
-
-int
-My_midi_lexer::varint2_i (String str)
-{
-    int var_i = 0;
-
-    for  (int i = 0; i < str.length_i(); i++) {
-       Byte byte = str[ i ];
-       var_i <<= 7;
-       var_i += byte & 0x7f;
-       if  (!  (byte & 0x80))
-           return var_i;
-    }
-    cout << "\nvarint2_i:" << String_convert::bin2hex_str (str) << endl;
-    assert (0); // illegal varint
-    return 0;
-}
-
-int
-My_midi_lexer::close_i()
-{
-    return 0;
-}
-