ollie314 / modsl

Automatically exported from code.google.com/p/modsl
0 stars 0 forks source link

Allow international character's on ID #44

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a class diagram that has international character's on its names.

sample:
class diagram A { class A { testvar:description; test2:abcädef;} }

(we use the part after the name as description, and there are international
chars in it... :-/)

the lexer has trouble with it.

This patch fixes this issue:

Index: src/main/antlr/org/modsl/antlr/uml/UML.g
===================================================================
--- src/main/antlr/org/modsl/antlr/uml/UML.g    (revision 840)
+++ src/main/antlr/org/modsl/antlr/uml/UML.g    (working copy)
@@ -113,7 +113,7 @@
 STRING: '"' .* '"';

 EDGEOP: '->';
-ID: ('_' | 'a'..'z' | 'A'..'Z') (INT | '_' | 'a'..'z' |'A'..'Z' | '[' | ']')*;
+ID: ('_' | 'a'..'z' | 'A'..'Z' | 'À'..'ÿ') (INT | '_' | 'a'..'z' |'A'..'Z'
| 'À'..'ÿ' | '[' | ']')*;
 INT : '0'..'9'+ ;
 WS: (' ' | '\t' | NEWLINE)+ { skip(); };
 fragment NEWLINE:'\r'? '\n';

Original issue reported on code.google.com by Christia...@gmail.com on 6 Aug 2009 at 11:55

GoogleCodeExporter commented 9 years ago

Original comment by avi...@gmail.com on 7 Aug 2009 at 3:02