Yes, that's why I wanted to experiment with boycutting the .ly->scheme-ast transformation step. I'm a much better lisper than c, so it's bit unclear to me what's going on (i've done parsers tough in the past). Are these public functions here maybe what I'm after https://github.com/lilypond/lilypond/blob/master/lily/include/lily-guile.hh#L52-L53 because, only by (maybe false) assumption, the lilypond lexer and parser's job is to create the scheme ast in the pipeline that gets sent to another compilation step which job is to create raw typesetted output?
2017-07-20 16:57 GMT+02:00 David Kastrup <d...@gnu.org>: > Hlöðver Sigurðsson <hlo...@gmail.com> writes: > > > Hi lilyponders, > > > > I'm looking to find a way to transpile code to lilypond, I know how to > > generate an ast like this > > > > ((context . 0) (class . CreateContext) (unique . 1) (ops) (type . Score) > > (id . "\\new")) > > ((context . 1) (class . CreateContext) (unique . 2) (ops) (type . > > StaffGroup) (id . "\\new")) > > ((context . 2) (class . CreateContext) (unique . 3) (ops) (type . Staff) > > (id . "\\new")) > > ((context . 3) (class . CreateContext) (unique . 4) (ops) (type . Voice) > > (id . "")) > > > > but I have no idea where in GUILE/lilypond this would get parsed to > > output. Some hints where to get started? > > LilyPond is an interpreter, not a compiler, so it doesn't work with > parse trees. See lily/parser.yy for its parser (and associated actions) > and lily/lexer.ll for its lexer. > > -- > David Kastrup >
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user