[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: gEDA file format - couple of questions on attributes.
[Re-sending to list, since there's been additional interest.]
Gareth Edwards <gareth@xxxxxxxxxxxxxxxxxxxx> writes:
> Hi there, I'm still intermittently working on a parser in Python for
> the gEDA/gaf file format and I have a couple of questions that I hope
> the list can answer.
>
> 1) are there any restrictions on the characters in attribute names and
> values (other than no "=" in the name) ?
At the moment, gEDA allows names to include any UTF-8 character other
than '=' or \0, but (for some reason) they must not end with a space.
However, I strongly recommend that you only use attribute names that
match:
^[a-z][a-z0-9_-\.]*$
Since you're writing a parser, consider emitting a warning if you
encounter an attribute name which doesn't.
> 2) Can attributes be multiline text or are they always single line
> text (but perhaps several)?
Yes, they can be multiline (any UTF-8 character other than \0). Also,
they (randomly) may not start with a space.
Since the gEDA file format requires UTF-8, please make sure your parser
raises the alarm if it encounters encoding errors.
Cheers,
Peter
P.S. I'm hoping to tighten up the rules on attributes soon-ish.
--
Peter Brett <peter@xxxxxxxxxxxxx>
Remote Sensing Research Group
Surrey Space Centre
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user