|Cannot seem to properly reference [message #1034594]
||Fri, 05 April 2013 16:28
| Robert Brown III
Registered: July 2009
I am attempting to do references in the language I am developing. The language I am developing has a syntax for representing latitudes and longitudes. This syntax is:
Boston: 42 N 21, 71 W 5
NewYork: 40 N 47, 73 W 58
Roanoke: 37 N 17, 79 W 57
What I would like to do is to be able to declare cities and later in my program refer back to them, like so:
if [Lat(Boston) is N] then write("Boston is in the Northern Hemisphere")
I have a set of rules that I am attempting to use to be able to construct such a syntax:
Name=ID':' ladeg=INT LADir lamin=INT', 'lodeg=INT LODir lomin=INT
LODir: ('W' | 'E');
LADir: ('N' | 'S');
'if' '[' [Function] 'is' [LADir] 'then' Output
I am getting all kinds of bizarre errors, some of them sayig that my "rules have to be unique" whenever I attempt to put in my references. I have read the section on references, and I do understand that the reference syntax '' refers to what is returned from the rule, but I am not actually changing what is supposed to be returned. Also: I do not see any reason why XTexy should say that my LADir and Output rules are not unique (My Output rule error goes away when M eliminate it in my IfStat rule!). I am slso getting errors with the [City] references.
I have read the section in the docuentation on References, and based on what little it actually says about them it looks like I am properly utilizing them.
I know something is not right here, I just don't know what that is. Could soeone please enlighten me???
Powered by FUDForum
. Page generated in 0.11337 seconds