lilypond-0.0.32
[lilypond.git] / src / lexerinit.cc
blob43a1c2c5a6f4a73685e3ad7cc4f4798643f569d9
1 #include <iostream.h>
2 #include <strstream.h>
3 #include "proto.hh"
4 #include "plist.hh"
5 #include "lexer.hh"
6 #include "debug.hh"
7 #include "main.hh"
8 #include "sourcefile.hh"
9 #include "source.hh"
11 My_flex_lexer *lexer=0;
13 int
14 yylex() {
15 return lexer->yylex();
18 bool
19 busy_parsing()
21 return lexer;
24 Input_file::Input_file(String s)
26 name = s;
27 line = 1;
28 String pf(s);
29 if (pf=="") {
30 is = &cin;
31 defined_ch_c_l_ = 0;
32 sourcefile_l_ = 0;
34 else {
35 Source_file* sourcefile_p = new Source_file( pf );
36 source_global_l->add( sourcefile_p );
37 sourcefile_l_ = sourcefile_p;
38 is = sourcefile_l_->istream_l();
39 defined_ch_c_l_ = sourcefile_l_->ch_c_l();
41 cout << "["<<pf<<flush;
44 Input_file::~Input_file()
46 cout << "]" << flush;