From 5958e8b2d0ac26041538d50fa97c64cb1cc69a6a Mon Sep 17 00:00:00 2001 From: fred Date: Sat, 28 Dec 1996 23:01:11 +0000 Subject: [PATCH] lilypond-0.0.21 --- src/lexer.l | 12 +++++++-- src/parser.y | 76 +++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 80 insertions(+), 8 deletions(-) diff --git a/src/lexer.l b/src/lexer.l index 4968c89de6..22bda7c92e 100644 --- a/src/lexer.l +++ b/src/lexer.l @@ -97,8 +97,6 @@ DOTS \.+ } \| { } -[:space:]+ { -} [%#].*\n { } @@ -120,7 +118,16 @@ DOTS \.+ yylval.c = YYText()[0]; return CLOSE_REQUEST_PARENS; } +\"[^\"]*\" { + String s (YYText()+1); + s = s.left(s.len()-1); + yylval.string = new String(s); + return STRING; +} +[/.^>_-] { + return yylval.c = YYText()[0]; +} . { String s("lexer error: illegal character found: " + String(YYText())); yyerror(s); @@ -133,6 +140,7 @@ DOTS \.+ yylval.string = new String (YYText()); } \" { + mtor << "quoted string\n"; BEGIN(INITIAL); return STRING; } diff --git a/src/parser.y b/src/parser.y index 402bc95f74..3ef8d182ff 100644 --- a/src/parser.y +++ b/src/parser.y @@ -6,9 +6,7 @@ #include "misc.hh" #include "lexer.hh" #include "paper.hh" -#include "inputstaff.hh" #include "inputscore.hh" -#include "inputmusic.hh" #include "main.hh" #include "keyword.hh" #include "inputcommand.hh" @@ -57,6 +55,8 @@ Paperdef*default_paper(); Interval *interval; Box *box; Notename_tab *notename_tab; + Script_def * script; + Text_def * textdef; } %token VOICE STAFF SCORE TITLE BAR NOTENAME OUTPUT @@ -64,7 +64,7 @@ Paperdef*default_paper(); %token GEOMETRIC START_T DURATIONCOMMAND OCTAVECOMMAND %token KEY CLEF VIOLIN BASS MULTI TABLE CHORD VOICES %token PARTIAL RHYTHMIC MELODIC MUSIC GROUPING -%token END SYMBOLTABLES TEXID TABLE NOTENAMES +%token END SYMBOLTABLES TEXID TABLE NOTENAMES SCRIPT TEXTSTYLE PLET %token IDENTIFIER %token NEWIDENTIFIER @@ -91,7 +91,7 @@ Paperdef*default_paper(); %type int_list %type score_commands_block score_commands_body %type staff_commands_block staff_commands_body -%type post_request pre_request +%type post_request pre_request %type clef_id pitchmod %type music %type music_chord music_chord_body @@ -104,6 +104,11 @@ Paperdef*default_paper(); %type symtables symtables_body %type symboldef %type notename_tab notename_tab_body +%type script_dir +%type