From: David Kastrup Date: Mon, 12 Sep 2011 08:09:34 +0000 (+0200) Subject: parser.yy et al: Fix a few style issues of d8ee829c73452cc35ef17c6c22abf5b47c754c15 X-Git-Tag: release/2.15.12-1~58 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=537e72140e8ab2493aa0311891672ced805abfef;p=lilypond.git parser.yy et al: Fix a few style issues of d8ee829c73452cc35ef17c6c22abf5b47c754c15 --- diff --git a/lily/include/lily-lexer.hh b/lily/include/lily-lexer.hh index f4f6e14d3e..9729ca7016 100644 --- a/lily/include/lily-lexer.hh +++ b/lily/include/lily-lexer.hh @@ -102,7 +102,6 @@ public: SCM lookup_identifier (string s); SCM lookup_identifier_symbol (SCM s); void push_extra_token (int token_type); - void push_embedded_token (); void push_chord_state (SCM tab); void push_figuredbass_state (); void push_lyric_state (); diff --git a/lily/lexer.ll b/lily/lexer.ll index 6bb304bff1..1cb8e33b8e 100644 --- a/lily/lexer.ll +++ b/lily/lexer.ll @@ -732,12 +732,6 @@ Lily_lexer::push_extra_token (int token_type) extra_token_types_.push_back (token_type); } -void -Lily_lexer::push_embedded_token () -{ - push_extra_token (EMBEDDED_LILY); -} - void Lily_lexer::push_chord_state (SCM tab) { diff --git a/lily/lily-parser.cc b/lily/lily-parser.cc index 5c1a3d358d..12646bb3b4 100644 --- a/lily/lily-parser.cc +++ b/lily/lily-parser.cc @@ -175,10 +175,10 @@ Lily_parser::parse_string_expression (string ly_code) lexer_->new_input (lexer_->main_input_name_, ly_code, sources_); SCM mod = lexer_->set_current_scope (); - lexer_->push_embedded_token (); + lexer_->push_extra_token (EMBEDDED_LILY); do_yyparse (); - SCM result = lexer_->lookup_identifier_symbol (ly_symbol2scm ("$parseStringResult")); - // $parseStringResult is set in the grammar rule for embedded_lilypond + SCM result = lexer_->lookup_identifier_symbol (ly_symbol2scm ("parseStringResult")); + // parseStringResult is set in the grammar rule for embedded_lilypond scm_set_current_module (mod); diff --git a/lily/parser.yy b/lily/parser.yy index 19e1a1140c..d061ab7ece 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -476,7 +476,7 @@ start_symbol: PARSER->lexer_->push_note_state (alist_to_hashq (nn)); } embedded_lilypond { PARSER->lexer_->pop_state (); - PARSER->lexer_->set_identifier (ly_symbol2scm ("$parseStringResult"), $3); + PARSER->lexer_->set_identifier (ly_symbol2scm ("parseStringResult"), $3); } ; @@ -583,7 +583,7 @@ embedded_lilypond: | error { PARSER->error_level_ = 1; } - | embedded_lilypond INVALID { + | INVALID embedded_lilypond { PARSER->error_level_ = 1; } ;