]> git.donarmstrong.com Git - lilypond.git/commit
* lily/include/input.hh (class Input): new `end_' slot for end of
authorNicolas Sceaux <nicolas.sceaux@free.fr>
Mon, 10 Jan 2005 22:05:06 +0000 (22:05 +0000)
committerNicolas Sceaux <nicolas.sceaux@free.fr>
Mon, 10 Jan 2005 22:05:06 +0000 (22:05 +0000)
commitc1e549802b23c458bcd808c6edcc6f8dfcd6fd68
treee38618e3a8374078d73d4bdafd1ab339a765437b
parent50ecd5ae90d3670a1a86b3b18b4d0b47b0fc2692
* lily/include/input.hh (class Input): new `end_' slot for end of
input. Renamed defined_str0_ to start_.

* lily/input.cc (Input): Add Input::Input (Input const &) and
remove Input::Input (Source_file*, char const *). Use the new
slots.
(set_location): method used by bison to propagate input
locations (YYLLOC_DEFAULT).
(end_line_number, end_column_number, step_forward): new methods

* lily/input-scheme.cc (ly:input-both-locations): new function,
similar to ly:input-location, but also return the end line and
column.

* lily/include/includable-lexer.hh:
* lily/includable-lexer.cc:
* lily/include/lily-lexer.hh (class Lily_lexer):
* lily/lily-lexer.cc (add_lexed_char): Move add_lexed_char from
Includable_lexer to Lily_lexer, in order to update lexloc (the
yylloc), a new slot of Lily_lexer.
(here_input, LexerError): simplify by using the lexloc slot (aka
yylloc)

* lily/lexer.ll: #define yylloc to use input locations (it may
be useless here?). Fixed the #embedded_scm rule (step the location
forward in order to skip the sharp sign before parsing the scheme
expression)

* lily/include/lily-parser.hh (class Lily_parser):
* lily/lily-parser.cc: Remove push_spot(), pop_spot() and
here_input()
(parser_error): overload for more precise locations of errors.

* lily/parser.yy (YYLTYPE): set location type to Input
(YYLLOC_DEFAULT): use Input::set_location()
(yylex): add the YYLTYPE* location parameter.
Clean push_spot()/pop_spot()/here_input(), and use @$, @1, etc.
Give an Input parameter to THIS->parser-error() for more accurate
messages.
16 files changed:
ChangeLog
configure.in
lily/includable-lexer.cc
lily/include/includable-lexer.hh
lily/include/input.hh
lily/include/lily-lexer.hh
lily/include/lily-parser.hh
lily/include/music.hh
lily/input-scheme.cc
lily/input.cc
lily/lexer.ll
lily/lily-lexer.cc
lily/lily-parser.cc
lily/parse-scm.cc
lily/parser.yy
lily/source-file.cc