[antlr-interest] Parsing expressions inside a double quoted string?
Rodrigo B. de Oliveira
rodrigobamboo at hotmail.com
Tue Jul 8 18:42:17 PDT 2003
Hi,
First of all: great tool! I'm really in love with it :-)
Now, to my problem.
I'm developing a toy language to make sure I get this
compiler thing, you know, and boy, It's fun! :-)
The toy language feels a lot like python and btw I was amazed at how
easy and elegant it was to support the INDENT, DEDENT stuff:
write a filter! beautiful.
Well, my problem is that I want the language to support expressions
inside double quoted strings for easy formatting.
An example:
the_man = "Elvin Jones"
print("${the_man} is the man!")
print("2 + 2 = ${2 + 2}")
The idea is that one will be able to embed any valid expression inside
double quoted strings by using the ${} marker.
Any suggestions on how to better achieve this?
Thanks,
Rodrigo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20030708/198d4691/attachment.html
More information about the antlr-interest
mailing list