2 lexer.hh -- declare My_lily_lexer
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
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 /// lexer for LilyPond
28 class My_lily_lexer : public Includable_lexer
30 Protected_scm scopes_;
32 String main_input_name_;
37 Scheme hash tables with (oct name acc) values, and symbol keys
39 Protected_scm chordmodifier_tab_;
40 Protected_scm pitchname_tab_;
41 Keyword_table * keytable_;
49 void prepare_for_next_token ();
50 int try_special_identifiers (SCM* ,SCM);
51 Input here_input () const;
56 void start_main_input ();
58 SCM lookup_identifier (String s);
59 void push_note_state ();
60 void push_markup_state ();
61 void push_figuredbass_state ();
62 void push_chord_state ();
63 void push_lyric_state ();
65 void LexerError (char const *);
66 void set_identifier (SCM name_string, SCM);
67 bool note_state_b () const;
68 bool chord_state_b () const;
69 bool lyric_state_b () const;
70 bool figure_state_b () const;
72 int lookup_keyword (String);
73 int scan_bare_word (String);
74 SCM scan_markup_word (String);
75 int scan_escaped_word (String);
76 int identifier_type (SCM);
77 char escaped_char (char) const;