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
As a hint: getting the input stack handling reasonably safe from tumbling into
ly/init.lyfor followup errors from parsing the main document was sort of a chore. There are comments around \maininput in that file reading likeand 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.
I tested EOFs in comments, strings, commands and contexts and all got me the same "syntax error, unexpected end of input" plus some extra ones for comments and strings. But with none of that, I was either able to escape main input nor trigger the rule
<maininput>{ANY_CHAR}as indicated in Rietveld...Diff:
Passes make, make check and a full make doc.
(I used the './config.status --recheck && touch config.hh' method to stop the 'file is newer' problem after applying the patch and this seems to work, which is fine for me)
Great. You also run
autogen.sh --noconf/autoconfafter applying the patch, right? I don't think that's handled byconfig.status.Last edit: Jonas Hahnfeld 2020-02-21
No I didn't do the autogen.sh stuff.
If that is not good enough for the patch review then can you confirm when I run this - i.e. do I still run config.status and touch and THEN this or do I just run autogen.sh/autoconf? Set the patch back to new so I spot it and then I can retest (and if it passes we can jump to countdown)
It just isn't enough when configuration changes are involved. I'll add --force to the autoconf flags in autogen.sh, maybe that will help.
Adding
--forcewill not help if the process doesn't involve running it after applying the patch in the first place.I am taking a look. This is just not cutting it.
rebase and fix name of cache variable
http://codereview.appspot.com/563560043
Passes make, make check and a full make doc.
Patch on countdown for 1st March.
Patch counted down - please push.
pushed to staging as