google-code-export / umple

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

Implement Regular Expressions in Umple grammar #392

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The objective is to make it possible to use regular expressions in grammar 
clauses to prevent ambiguities like the one between attributes and 
singleAssociationEnds described in Issue 213, where simply requiring the 
multiplicity to be numerical in the parsing would prevent it.

The suggested syntax to be used in the grammar is [!name:regex]. Where regex is 
a accepted java.util.regex regular expression 
(http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html#sum).

So for instance, the multiplicity rule of a association would include the 
following: [!bound:\d+]

To accomplish this, changes will be made mainly adding methods to the RulePart 
class (to differenciate regular expression clauses and do the actual matching 
of input), and changing the parse method in the Parse class.

Original issue reported on code.google.com by atojet on 28 May 2013 at 5:06

GoogleCodeExporter commented 9 years ago

Original comment by TimothyCLethbridge on 28 May 2013 at 6:58

GoogleCodeExporter commented 9 years ago

Original comment by atojet on 29 May 2013 at 3:36

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by TimothyCLethbridge on 30 May 2013 at 2:53