|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectbyucc.edif.tools.merge.BasicEdifBusNetNamingPolicy
public class BasicEdifBusNetNamingPolicy
Basic implementation of the EdifBusNetNamingPolicy using regular expressions. This class performs the parsing on given EdifNet names by comparing the names with predefined regular expressions. The regular expression defines the naming policy.
| Field Summary | |
|---|---|
(package private) java.util.regex.Pattern |
_p
Local copy of the Pattern. |
static java.lang.String |
PARAN_BITPOS_PARAN_REGEX
This regular expression will match against a net name that ends in "(<#>)" where <#> is a decimal number. |
static java.lang.String |
UNDERSCORE_BITPOS_REGEX
This regular expression will match against a net name that ends in "_<#>" where <#> is a decimal number. |
static java.lang.String |
UNDERSCORE_BITPOS_UNDERSCORE_REGEX
This regular expression will match against a net name that ends in "_<#>_" where <#> is a decimal number. |
| Constructor Summary | |
|---|---|
BasicEdifBusNetNamingPolicy()
The default constructor will create a naming policy based on the @link{UNDERSCORE_BITPOS_REGEX}. |
|
BasicEdifBusNetNamingPolicy(java.lang.String regex)
Create a new naming policy based on the given regular expression. |
|
| Method Summary | |
|---|---|
java.lang.String |
getBusBaseName(java.lang.String name)
Return the basename of the single bit net without the bit number. |
int |
getBusPosition(java.lang.String name)
Returns the bit position of the Net within the bus. |
java.util.regex.Matcher |
getMatcher(java.lang.String name)
|
boolean |
isValidBusNetName(java.lang.String name)
Returns true if the given name is valid under the given naming policy. |
static void |
main(java.lang.String[] args)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String UNDERSCORE_BITPOS_REGEX
public static final java.lang.String UNDERSCORE_BITPOS_UNDERSCORE_REGEX
public static final java.lang.String PARAN_BITPOS_PARAN_REGEX
java.util.regex.Pattern _p
| Constructor Detail |
|---|
public BasicEdifBusNetNamingPolicy()
public BasicEdifBusNetNamingPolicy(java.lang.String regex)
| Method Detail |
|---|
public boolean isValidBusNetName(java.lang.String name)
EdifBusNetNamingPolicy
isValidBusNetName in interface EdifBusNetNamingPolicypublic java.util.regex.Matcher getMatcher(java.lang.String name)
public int getBusPosition(java.lang.String name)
EdifBusNetNamingPolicy
getBusPosition in interface EdifBusNetNamingPolicypublic java.lang.String getBusBaseName(java.lang.String name)
EdifBusNetNamingPolicy
getBusBaseName in interface EdifBusNetNamingPolicypublic static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||