Mail Archives: geda-user/2014/08/15/17:53:33
> However, perhaps the role of spaces could be
> clarified. Where are spaces allowed other than after the '0' in a
> block comment and within strings? Can spaces exist at the ends of a
> string and will they be part of the string or discarded? The latter
> is of particular importance since Value Attributes are strings; the
> examples never show a space in a value attribute, but spaces are not
> expressly forbidden.
Well, the format specification is changing quite fast, there are significant
differences with respect to spaces between J1 (February 2014) and J3 (July 2014).
In J1: "The character code 32 (SP, Space) is reserved for use in comments."
In J3: "SP can only be used inside strings and comments. They cannot be used anywhere else, not
inside or between commands, not between data blocks, etc."
But this last sentence is contradicted by:
Strings are made up of all valid characters except the reserved characters SP, CR, LF, ‘%’, ‘*’,
‘,’ and ‘;’.
In J1 the comma was not listed as a reserved character.
However in the regular expression they give (same in both versions), I have seen neither
the square brackets, nor the dollar sign (allowed in names!), nor the backquote nor a few
others and there is a dash which is obviously in the wrong place ("+-/" includes the comma!).
Furthermore, there seems to be a space before the closing bracket.
In other words, it might be worth contacting UCAMCO because the documentation is inconsistent.
I believe that the correct regex for strings (provided you use the C locale) is:
[][a-zA-Z0-9 !"#$&'()+./:<=>?@\^_`{|}~-]
Gabriel
- Raw text -