]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/my-lily-lexer.hh
release: 0.0.44
[lilypond.git] / lily / include / my-lily-lexer.hh
1 /*
2   lexer.hh -- declare My_lily_lexer
3
4   source file of the LilyPond music typesetter
5
6   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8
9 #ifndef LEXER_HH
10 #define LEXER_HH
11
12 #include <FlexLexer.h>
13
14 #include "proto.hh"
15 #include "fproto.hh"
16 #include "varray.hh"
17 #include "string.hh"
18 #include "includable-lexer.hh"
19 #include "duration.hh"
20
21 bool busy_parsing();
22 void kill_lexer();
23 void set_lexer();
24
25
26 /// lexer for Mudela
27 class My_lily_lexer : public Includable_lexer {
28     int lookup_keyword(String);
29     void lookup_notename(int &large, int &small, String s);
30     int scan_bare_word(String);
31     int scan_escaped_word(String);
32
33     bool post_quotes_b_;
34 public:
35    void * lexval_l;
36     
37     
38     Assoc<String, Identifier*> *identifier_assoc_p_;
39     Keyword_table * keytable_p_;
40     int errorlevel_i_;
41
42     /* *************** */
43
44     Identifier*lookup_identifier(String s);
45  
46     void push_note_state();
47     void push_lyric_state();
48     void pop_state();
49     void LexerError(char const *);
50     My_lily_lexer();
51     void add_identifier(Identifier*i);
52     ~My_lily_lexer();
53     int yylex();
54     void print_declarations(bool init_b) const;
55
56     bool note_state_b() const;
57     bool lyric_state_b() const;
58 };
59
60 #endif