lilypond-1.1.55
[lilypond.git] / hdr / lexer.hh
blob6a9d21a98ed7314e566ed04e94d3257b7ab4fb42
1 /*
2 lexer.hh -- declare My_flex_lexer
4 source file of the LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
9 #ifndef LEXER_HH
10 #define LEXER_HH
11 #include <FlexLexer.h>
12 #include "proto.hh"
13 #include "fproto.hh"
14 #include "varray.hh"
15 #include "string.hh"
17 int yylex();
18 void yyerror(const char *s);
19 bool busy_parsing();
20 void kill_lexer();
21 void set_lexer();
23 /// lexer with provisions for include files.
24 struct My_flex_lexer : yyFlexLexer {
26 Array<Input_file*> include_stack;
27 Assoc<String, Identifier*> *the_id_tab;
28 Keyword_table * keytable;
29 Notename_tab * defaulttab;
30 int errorlevel_i_;
31 /* *************** */
32 int ret_notename(int *p, String text, int octave_mod);
33 char const* here_ch_c_l();
34 void set(Notename_tab *n);
35 int lookup_keyword(String);
36 void lookup_notename(int &large, int &small, String s);
37 void LexerError(const char *);
38 String spot() const;
39 Identifier*lookup_identifier(String s);
40 My_flex_lexer();
41 void add_identifier(Identifier*i);
42 ~My_flex_lexer();
43 void new_input(String s);
44 bool close_input();
45 int yylex();
46 void print_declarations() const;
49 extern My_flex_lexer *lexer;
51 #endif