Reia PEG Issue 7 : string-specified atoms

2 views
Skip to first unread message

graeme defty

unread,
Aug 29, 2010, 12:13:51 PM8/29/10
to Reia
The normal way to specify an atom is e.g.

:howdy

It is also possible, though to use other characters in the name by
enclosing the characters of the name in quotes (or apostrophes) e.g.

:'Funny_-+*name!!'

My question is, can those strings be interpolated? In other words can
I put

:"this is a #{ variable } atom"

I can see how it would be nice to be able to generate a small set of
atoms using

:"atom_#{ index }"

where 'index' is an incrementing counter, but this is not currently
possible since the current parser stores the name of the atom as an
atom internally. To allow for interpolated names would require them
to be held in a more generic format.

Would you like to allow for this possibility?

regards,

g
Reply all
Reply to author
Forward
0 new messages