As a hint: getting the input stack handling reasonably safe from tumbling into 
`ly/init.ly` for followup errors from parsing the main document was sort of a 
chore.  There are comments around \maininput in that file reading like

~~~
$(if (ly:get-option 'include-settings)
  (ly:parser-include-string
    (format #f "\\include \"~a\"" (ly:get-option 'include-settings))))

\maininput
%% there is a problem at the end of the input file

%%
%% Above and below comments compensate for the parser's look-ahead.
%%
~~~
and those comments were often in the error context when stuff bombed out like 
with a missing closing brace.  So if you move the input stack processing, it 
would make sense to crash-test in particular what happens with main files that 
are incomplete and end in the middle of an expression or even token.

Errors flagged outside of the user accessible files are just confusing.


---

** [issues:#5777] Let flex handle the input stack**

**Status:** Started
**Created:** Thu Feb 20, 2020 02:17 PM UTC by Jonas Hahnfeld
**Last Updated:** Thu Feb 20, 2020 02:17 PM UTC
**Owner:** Jonas Hahnfeld


Let flex handle the input stack

This requires at least flex 2.5.29 released in 2003.

Prior cleanups:
1) Use Includable_lexer::new_input in Lily_lexer

Only Includable_lexer::new_input (const string &, Sources *) is virtual,
the method with type (const string &, const string &, Sources *) should
not be declared.

2) Deduplicate code from Includable_lexer::new_input

http://codereview.appspot.com/563560043


---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/testlilyissues/issues/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/testlilyissues/admin/issues/options.  Or, if this is 
a mailing list, you can unsubscribe from the mailing list.
_______________________________________________
Testlilyissues-auto mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/testlilyissues-auto
  • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development
    • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development
    • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development
    • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development
    • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development
    • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development
    • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development
    • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development
    • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development

Reply via email to