[antlr-interest] string interpolation
Rodrigo B. de Oliveira
rodrigobamboo at hotmail.com
Mon Aug 11 15:13:07 PDT 2003
I've just found this code in the TokenStreamSelector class:
<snip src="TokenStreamSelector.cs">
public virtual Token nextToken()
{
// return input.nextToken();
// keep looking for a token until you don't
// get a retry exception.
for (; ; )
{
try
{
return input.nextToken();
}
//catch (TokenStreamRetryException r)
catch
{
// just retry "forever"
}
}
}
</snip>
The java version of the method catches TokenStreamRetryException only. Is there any special reason why the C# version is not doing the same?
Uncommenting the catch (TokenStreamRetryException) solves my problem.
BTW, this is the second change I apply to my private copy of the C# runtime library... Whom I can send them to?
Rodrigo
----- Original Message -----
From: Rodrigo B. de Oliveira
To: antlr
Sent: Monday, August 11, 2003 4:49 PM
Subject: [antlr-interest] string interpolation
I'm building a very simple parser that recognizes (and interprets) simple programs such as:
a = 5+3
b = 102-5
print "a: ${a}, b: ${b}, a+b: ${a+b}"
...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20030811/66bf81cf/attachment.html
More information about the antlr-interest
mailing list