2 lexer.hh -- declare My_lily_lexer
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
12 #include <FlexLexer.h>
14 #include "dictionary.hh"
15 #include "lily-proto.hh"
16 #include "flower-proto.hh"
19 #include "includable-lexer.hh"
20 #include "duration.hh"
22 #include "protected-scm.hh"
28 /// lexer for Lilypond
29 class My_lily_lexer : public Includable_lexer
32 String main_input_string_;
34 Scheme_hash_table * toplevel_variable_tab_;
38 Scheme hash tables with (oct name acc) values, and symbol keys
40 Protected_scm chordmodifier_tab_;
41 Protected_scm pitchname_tab_;
43 Link_array<Scheme_hash_table> scopes_;
44 Keyword_table * keytable_;
51 Input here_input () const;
53 void start_main_input ();
55 SCM lookup_identifier (String s);
56 void push_note_state ();
57 void push_figuredbass_state ();
58 void push_chord_state ();
59 void push_lyric_state ();
61 void LexerError (char const *);
62 void set_identifier (SCM name_string, SCM);
63 bool note_state_b () const;
64 bool chord_state_b () const;
65 bool lyric_state_b () const;
66 bool figure_state_b () const;
68 int lookup_keyword (String);
69 int scan_bare_word (String);
70 int scan_escaped_word (String);
72 char escaped_char (char) const;