LBHB / NEMS0

THIS VERSION OF NEMS IS NO LONGER SUPPORTED. PLEASE USE THE NEW NEMS REPOSITORY OR INSTALL NEMS_DB TO GET NEMS0 SUPPORT.
GNU General Public License v3.0
8 stars 4 forks source link

Added utilities for escaping characters in keywords #125

Closed jacobpennington closed 6 years ago

jacobpennington commented 6 years ago

Added functions escaped_split and escaped_join to nems.utils and incorporated them into the keyword parsing system used by xforms, as well as some default keywords.

For example, when specifying tolerance levels that are not whole number powers, the following will now work: basic.t5\.5

The syntax of substituting a 'd' for the decimal is still supported, but using a \ for escaping should be used going forward since it allows for a generic syntax that can be applied to all keyword arguments (like escaping underscores) and is already a standard for string parsing in general.