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?
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. 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. Cheers, Valentin Am Dienstag, 1. Februar 2022, 19:39:20 CET schrieb David Kastrup: > Valentin Petzel <valen...@petzel.at> writes: > > Hi David! > > > > I suppose it might be useful to have something like a parsing function > > that does parse a file internally, but returns a scheme structure > > containing all variables, functions, scores, books, whatever defined > > in that file. This would make using stuff in a different file much > > more clean than the current include method. > > That's not possible because things like assignments aren't structure but > action, and the subsequent interpretation of the file may well depend on > those assignments being executed.
signature.asc
Description: This is a digitally signed message part.