dsifford / astrocite

Bibliography file format => AST => CSL JSON
MIT License
18 stars 6 forks source link

RegularCommand can also take NestedLiteral parameters #27

Closed retorquere closed 4 years ago

retorquere commented 4 years ago
retorquere commented 4 years ago

Just a heads-up -- I've made further changes to the grammar because to get verbatim parsing and proper argument consumption right. Some of these changes I figure may not align with how you want to approach things -- for one, my grammar needs to know a lot more about what it's parsing. Some of this could in principle be post-cleaned on a simpler AST (as was produced by the last changes I offered for astrocite) but it was just easier to do inside the grammar. I do think that the current grammar coupled with my post processing is currently best in class outside actually running it through a latex stack. Notable changes in behavior:

The changed grammar lives here, and the postprocessor here.

I wouldn't half mind if I could just maintain the bibtex parser in that repo, and have astrocite consume either just the grammar or the grammar + postprocessor. I have a pretty extensive testsuite so I have a vested interest in keeping my parser stable yet updated for new bug reports I get.