2 lexer.hh -- declare My_lily_lexer
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
12 #include <FlexLexer.h>
14 #include "dictionary.hh"
15 #include "lily-proto.hh"
16 #include "lily-proto.hh"
20 #include "includable-lexer.hh"
21 #include "duration.hh"
22 #include "musical-pitch.hh"
29 class My_lily_lexer
: public Includable_lexer
32 String main_input_str_
;
34 Scope
* toplevel_scope_p_
;
37 Notename_table
*chordmodifier_tab_p_
;
38 Notename_table
*note_tab_p_
;
39 Link_array
<Scope
> scope_l_arr_
;
40 Keyword_table
* keytable_p_
;
47 Input
here_input () const;
49 void start_main_input ();
50 bool notename_b (String
) const;
51 bool chordmodifier_b (String
) const;
52 void set_chordmodifier_table (Notename_table
*tab_p
);
53 void set_notename_table (Notename_table
*tab_p
);
54 Identifier
*lookup_identifier (String s
);
55 Musical_pitch
lookup_notename (String s
);
56 Musical_pitch
lookup_chordmodifier (String s
);
57 void push_note_state();
58 void push_chord_state();
59 void push_lyric_state();
61 void LexerError (char const *);
62 void set_identifier (String str
, Identifier
* i
, bool unique_b
= true);
63 void print_declarations (bool init_b
) const;
64 bool note_state_b() const;
65 bool chord_state_b() const;
66 bool lyric_state_b() const;
69 int lookup_keyword (String
);
70 int scan_bare_word (String
);
71 int scan_escaped_word (String
);
73 char escaped_char(char) const;