2 lexer.hh -- declare My_lily_lexer
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 #ifndef MY_LILY_LEXER_HH
10 #define MY_LILY_LEXER_HH
12 #include "includable-lexer.hh"
15 #include "lily-proto.hh"
16 #include "flower-proto.hh"
19 #include "duration.hh"
21 #include "protected-scm.hh"
27 class My_lily_lexer : public Includable_lexer
30 Protected_scm scopes_;
31 Protected_scm encoding_;
34 int lookup_keyword (String);
35 int scan_bare_word (String);
36 SCM scan_markup_word (String);
37 int scan_escaped_word (String);
38 int identifier_type (SCM);
39 char escaped_char (char) const;
42 String main_input_name_;
48 /* Scheme hash tables with (oct name acc) values, and symbol keys. */
49 Protected_scm chordmodifier_tab_;
50 Protected_scm pitchname_tab_stack_;
52 Keyword_table *keytable_;
56 My_lily_lexer (Sources*);
57 My_lily_lexer (My_lily_lexer const&);
62 void prepare_for_next_token ();
63 int try_special_identifiers (SCM* ,SCM);
64 Input here_input () const;
69 void start_main_input ();
71 SCM lookup_identifier (String s);
72 SCM lookup_identifier_symbol (SCM s);
73 void push_chord_state (SCM tab);
74 void push_figuredbass_state ();
75 void push_lyric_state ();
76 void push_initial_state ();
77 void push_markup_state ();
78 void push_note_state (SCM tab);
80 void LexerError (char const *);
81 void set_encoding (String);
82 SCM encoding () const;
83 void set_identifier (SCM name_string, SCM);
84 bool is_note_state () const;
85 bool is_chord_state () const;
86 bool is_lyric_state () const;
87 bool is_figure_state () const;
90 #endif /* MY_LILY_LEXER_HH */