|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmapss.dif.util.Conventions
public class Conventions
This class includes static methods for convention checks in synthesis tree classes. If there is a common convention for similar parameters of different classes, related checks can be placed to this class to avoid code duplication.
| Constructor Summary | |
|---|---|
protected |
Conventions()
|
| Method Summary | |
|---|---|
static java.lang.String |
datatypeConvention(java.lang.String label)
Type convention check for DIF actor attribute type. |
static java.lang.String |
labelConvention(java.lang.String label)
Label convention check for using with data structures that require element labels such as Hierarchy
or DIFGraph. |
static void |
main(java.lang.String[] args)
|
static java.lang.String |
typeConvention(java.lang.String label)
Type convention check for DIF actor attribute type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected Conventions()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
public static java.lang.String labelConvention(java.lang.String label)
Hierarchy
or DIFGraph. Following is the definition for
strings acceptable by this method:
digit = ['0' .. '9']
non_digit = [[['a' .. 'z'] + ['A' .. 'Z']] + '_']
s_char = [all -['"' + ['\' + [10 + 13]]]] | escape_sequence;
s_char_sequence = s_char*;
label = non_digit (digit | non_digit)*
or
label = '$' s_char_sequence '$';
This definition is compatible with DIF Language definition
in mapss/dif/language/sablecc/Compiler.grammar.
label - String to check.
public static java.lang.String typeConvention(java.lang.String label)
digit = ['0' .. '9']
non_digit = [[['a' .. 'z'] + ['A' .. 'Z']] + '_']
label = non_digit (digit | non_digit)* ('.' non_digit (digit | non_digit)* )*;
label - String to check.
public static java.lang.String datatypeConvention(java.lang.String label)
digit = ['0' .. '9']
non_digit = [[['a' .. 'z'] + ['A' .. 'Z']] + '_']
label = non_digit (digit | non_digit)* ('.' non_digit (digit | non_digit)* )*;
label - String to check.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||