]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/lexer.hh
release: 0.0.42.pre3
[lilypond.git] / lily / include / lexer.hh
index 8a55f1a585d3dc95afc00df68039f1de3304f75c..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 {
-
+    Lexer_prefs prefs;
+    
     Array<Input_file*> include_stack_;
     Assoc<String, Identifier*> *identifier_assoc_p_;
     Keyword_table * keytable_p_;
@@ -33,7 +51,11 @@ struct My_flex_lexer : yyFlexLexer {
     char const* here_ch_c_l();
     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();