kpeeters / cadabra2

A field-theory motivated approach to computer algebra.
https://cadabra.science/
GNU General Public License v3.0
223 stars 37 forks source link

allow in-line comments in Cadabra source #99

Closed leo-brewin closed 5 years ago

leo-brewin commented 6 years ago

This is a small change that would allow users to add in-line comments to Cadabra source. At present these get mangled in the conversion from the Cadabra to Python source.

Comments are assumed to begin with two characters space+#. This is to avoid clashes with Cadabra's own use of # in properties declarations.

kpeeters commented 6 years ago

Just to keep you posted: I haven't yet merged this because this change also needs to be propagated into the Python command line client (core/cadabra2.in). Unfortunately the pre-parser for the command-line version and the notebook are still separate bits of code.

leo-brewin commented 6 years ago

Thanks for the message. I should have spotted that myself. I've now made the changes to core/cadabra2.in and I've verified that it works.

I'm new to using git and I'm not sure if these changes made it through. You may need to give me some advice on using git, though I'll try to sort this out as best as I can without burdening you too much. Pleas bear with me as I muddle my way through. If you know of a good on-line guide I'd be most appreciative.