[antlr-interest] AST, value manipulation.

Bharath Sundararaman bharath.sundararaman at starthis.com
Thu Nov 18 06:51:00 PST 2004


Yeah, that makes sense. I guess I should take a vacation. 

 

Thanks for the help!

 

Bharath.

 

________________________________

From: Maassen, H.A.M. [mailto:H.A.M.Maassen at student.tue.nl] 
Sent: Thursday, November 18, 2004 3:10 AM
To: antlr-interest at yahoogroups.com
Subject: RE: [antlr-interest] AST, value manipulation.

 

I don't think rangechecking is (usually? ever?) done at compile time.
How would you check the following?

 

v := Random(20)

w := GetInput()

a[v] := a[w]

 

	-----Original Message----- 
	From: Bharath Sundararaman
[mailto:bharath.sundararaman at starthis.com] 
	Sent: Wed 11/17/2004 6:32 PM 
	To: antlr-interest at yahoogroups.com 
	Cc: 
	Subject: [antlr-interest] AST, value manipulation.

	...
	
	VAR
	v: INT := 2;
	a: ARRAY[1..10] OF INT;
	END_VAR
	
	And I have a statement
	
	a[v] := 200;
	
	..., I also want to check if index "v" is within bounds, which
	means I need to retrieve the value of "v" and make sure it does
not
	exceed the range 1..10

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20041118/64c66b1e/attachment.html


More information about the antlr-interest mailing list