Problem with keywords and identifiers...
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Kishore_Tigalapalli
Posted On:   Tuesday, August 16, 2005 07:02 AM

Im facing a problem like this... Say I have the following in my grammar user_defined_types: IDENTIFIER (PERCENTAGE ( "TYPE" | "ROWTYPE" ))? ; If my input statement is XYZ%TYPE, this works fine. But, if my input statement is TYPE.XYZ%TYPE, this gives me an error. It's always the case whenever my input statement has something that is declared within doublequotes in my grammar file. If I change the above rule as user_defined_types: IDENTIFIER (PERCENTAGE ( V_TYPE | "ROWTYPE" ))? ; and V_TYPE: "TYPE" (this is in the lexer). then, it doesn't re   More>>

Im facing a problem like this...



Say I have the following in my grammar



user_defined_types:

IDENTIFIER

(PERCENTAGE ( "TYPE" | "ROWTYPE" ))?

;



If my input statement is XYZ%TYPE, this works fine. But, if my input statement is TYPE.XYZ%TYPE, this gives me an error.



It's always the case whenever my input statement has something that is declared within doublequotes in my grammar file.



If I change the above rule as


user_defined_types:

IDENTIFIER

(PERCENTAGE ( V_TYPE | "ROWTYPE" ))?

;



and V_TYPE: "TYPE" (this is in the lexer).



then, it doesn't recognize TYPE after PERCENTAGE. It says 'expecting "TYPE" after PERCENTAGE, but found V_TYPE'.



Pls help me solve this.



Thanks,

Kishore

   <<Less

Re: Problem with keywords and identifiers...

Posted By:   Kishore_Tigalapalli  
Posted On:   Wednesday, August 17, 2005 04:54 AM

Hi,



I've found the answer to this question myself... using lower case letters in the lexer will solve the problem.



use V_TYPE: "type" instead of V_TYPE: "TYPE"

About | Sitemap | Contact