[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: blue sky ideas - written down finally
On Fri, 08 Jan 2010 15:29:25 -0500, DJ Delorie wrote:
> Right, [] is "grouping" and how you map groups to each other determines
> the functionality. The syntax is based on "what should be obvious"...
>
> [a b c] = [x y z] maps all of a group of signals to a group of pins, 1:1
>
> a = [x y z] maps one signal to a group of pins, one-to-many
>
> [a b c] = x doesn't make sense (or at least isn't obvious), so is not
> allowed.
>
>
> [a b] = [x y z] is not allowed, because it's not obvious what you mean,
> but... [a b] = [[x y] z] is allowed. a-> both x and y, and b->z, as
> is... [a b] = [(x y) z] is allowed. a-> either x or y, and b->z.
>
> a = (x y z) maps a signal to one of a group of pins, one-to-one
>
> [a b y] = ([1 2 3] [4 5 6] [7 8 9]) maps all of a group of signals to
> all of one group of pins, chosen from a list of groups.
>
> a = ([1 2 3] [4 5 6] [7 8 9]) maps one signals to all of one group of
> pins, chosen from a list of groups.
>
> So () means "use one of" and [] means "use all of"
Hmm. If I replace "maps to" by "matches" this sounds a lot like a subset
of regular expressions. Why not adopt regexp to this task?
Advantages are obvious:
* No need to invent/implement/document/learn yet another syntax
* Can deal with more complexity than a signal to pin mapping will ever
need.
* There is time-tested parsing code ready to grab for various languages
Just a thought...
---<(kaimartin)>---
--
Kai-Martin Knaak tel: +49-511-762-2895
Universität Hannover, Inst. für Quantenoptik fax: +49-511-762-2211
Welfengarten 1, 30167 Hannover http://www.iqo.uni-hannover.de
GPG key: http://pgp.mit.edu:11371/pks/lookup?search=Knaak+kmk&op=get
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user