2 lexer.hh -- declare 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 "duration.hh"
22 class Lily_lexer : public Includable_lexer
24 DECLARE_SMOBS(Lily_lexer,);
29 int lookup_keyword (String);
30 int scan_bare_word (String);
31 SCM scan_markup_word (String);
32 int scan_escaped_word (String);
33 int identifier_type (SCM);
34 char escaped_char (char) const;
36 Keyword_table *keytable_;
38 String main_input_name_;
44 /* Scheme hash tables with (oct name acc) values, and symbol keys. */
45 SCM chordmodifier_tab_;
46 SCM pitchname_tab_stack_;
51 Lily_lexer (Sources*);
52 Lily_lexer (Lily_lexer const&);
55 void prepare_for_next_token ();
56 int try_special_identifiers (SCM* ,SCM);
57 Input here_input () const;
62 void start_main_input ();
64 SCM lookup_identifier (String s);
65 SCM lookup_identifier_symbol (SCM s);
66 void push_chord_state (SCM tab);
67 void push_figuredbass_state ();
68 void push_lyric_state ();
69 void push_initial_state ();
70 void push_markup_state ();
71 void push_note_state (SCM tab);
73 void LexerError (char const *);
74 void set_identifier (SCM name_string, SCM);
75 bool is_note_state () const;
76 bool is_chord_state () const;
77 bool is_lyric_state () const;
78 bool is_figure_state () const;
81 #endif /* MY_LILY_LEXER_HH */