Internationalization of a token
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Paul_Cereghini
Posted On:   Thursday, July 28, 2005 02:06 PM

Hi: I am currently working on a grammar for an application that requires internationalization support. As far as I can see ANTLR supports different locale's in messages or I can easily modified the generated code to do this. On the other hand I have a more interesting problem when it comes to the grammar itself. In this specific grammar I have a NAME token that is defined this way: NAME: ('a'..'z'|'A'..'Z'|'_')('a'..'z'|'A'..'Z'|' '|'0'..'9'|'_')*; However, I need to have this token support different character codes depending on locale. The problem here is that the definition of this token is static and I really need a dynamic definition based on local. Haven't th   More>>



Hi:



I am currently working on a grammar for an application that requires internationalization support. As far as I can see ANTLR supports different locale's in messages or I can easily modified the generated code to do this.



On the other hand I have a more interesting problem when it comes to the grammar itself. In this specific grammar I have a NAME token that is defined this way:



NAME: ('a'..'z'|'A'..'Z'|'_')('a'..'z'|'A'..'Z'|' '|'0'..'9'|'_')*;



However, I need to have this token support different character codes depending on locale. The problem here is that the definition of this token is static and I really need a dynamic definition based on local. Haven't thought of an elegant way of doing this yet.



Has anyone done this before? Does anyone have any tips as to how to approach this problem?



Thanks,



Paul    <<Less
About | Sitemap | Contact