Valentin Petzel <valen...@petzel.at> writes: > Hello David, > > An assignment basically adds a pair (symbol, value) to some assignment table. > So shouldn’t it be possible to parse a file with a new assignment table and > then convert this assignment table into a scheme accessible structure?
That's just wild handwaving. Something like bing = cis' bing = { $bing 2-2 } \score { \bing } does not resolve in such a manner since the _structure_ of the expression containing $bing cannot be resolved without knowing the type of bing at the time $bing is encountered. You cannot postpone assignments when parsing at the top level file level. > I do not mean to say that assignments should not be performed, but > that they should be performed in a different scope, which we then make > accessible from the original scope. That has nothing whatsoever to do with parsing and parsing structures. > This could also enable some sort of name-spacing. Let’s say we have different > Ly files that were not written with name-spacing in mind and then we want to > do > a project to combine these. Then instead of needing to rename assignment in > one file we could do something like > > fileA = \include "fileA.ly" > \fileA.score > > or something, whatever. Indeed, whatever all over. -- David Kastrup