[Io] Re: Dot(s), Identifier or Operator?
- View Source--- In firstname.lastname@example.org, Quag <quaggy@...> wrote:
>To an overview over which operators are defined by which prototypes, I wrote this little
> Hi Jon,
> On 4/29/06, Jon Kleiser <jon.kleiser@...> wrote:
> > --- In email@example.com, Jon Kleiser
> > <jon.kleiser@> wrote:
> > >
> > > Looking at the IoOpTable ops list in the file IoToken_parser.c, one
> > > may think that the single "." may be used as an Operator in some
> > > settings, but I can't recall where that may be.
> > Does Io currently use the single "." as an Operator in any
> > setting? (If not, I think it should be removed from the IoOpTable.)
> The op table is completely misleading. I haven't fixed it yet, because
> both the parser and the lexer use the op table. I have now changed how
> the parser uses it, but I haven't cleaned up the lexer yet.
> I will clean the op table at some point.
operMap := Map clone
IoVM slotNames foreach(isn,
getSlot(isn) slotNames foreach(sn,
t := getSlot(isn) getSlot(sn) type
if ((t == "Block") or (t == "CFunction"),
if ((sn size > 0) and (sn at(0) isLetter not),
pList := operMap at(sn)
if (pList == nil,
pList = list()
operMap atPut(sn, pList)
operMap keys sort foreach(sn, writeln(sn, "\t", operMap at(sn)))
Operators with alpha-names ('and', 'or') are not included.