]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/lexer.hh
release: 0.0.42.pre3
[lilypond.git] / lily / include / lexer.hh
index 6a9d21a98ed7314e566ed04e94d3257b7ab4fb42..08faa553f8de81d3b5571717a1788a48a868f797 100644 (file)
 #include "string.hh"
 
 int yylex();
-void yyerror(const char *s);
+void yyerror(char const *s);
 bool busy_parsing();
 void kill_lexer();
 void set_lexer();
 
+
+struct Lexer_prefs {
+    int default_duration, default_dots, default_octave_i_;
+    int default_plet_type, default_plet_dur;
+    String textstyle_str_;
+    
+    bool last_duration_mode ;
+    
+    Lexer_prefs();
+    Moment plet_mom();
+    void set_default_duration(int *);
+    void set_last_duration(int n);
+    void set_duration_mode(String s);
+    void get_default_duration(int *);
+    void set_plet(int,int);
+};
+
 /// lexer with provisions for include files.
 struct My_flex_lexer : yyFlexLexer {
-
-    Array<Input_file*> include_stack;
-    Assoc<String, Identifier*> *the_id_tab;
-    Keyword_table * keytable;
-    Notename_tab * defaulttab;
+    Lexer_prefs prefs;
+    
+    Array<Input_file*> include_stack_;
+    Assoc<String, Identifier*> *identifier_assoc_p_;
+    Keyword_table * keytable_p_;
     int errorlevel_i_;
+
     /* *************** */
-    int ret_notename(int *p, String text, int octave_mod);    
+
     char const* here_ch_c_l();
-    void set(Notename_tab *n);
     int lookup_keyword(String);
     void lookup_notename(int &large, int &small, String s);
-    void LexerError(const char *);
+
+    void push_note_state();
+    void push_lyric_state();
+    void pop_state();
+    void LexerError(char const *);
     String spot() const;
     Identifier*lookup_identifier(String s);
     My_flex_lexer();