Beh... a quello non avevo pensato, ma mi servono proprio così:
codice:
'Tutti gli specificatori di accesso
Public Const Scope As String = "(private|public|protected|friend|protected friend)"
'Identificatori (campo)
Public Const Identifier As String = "([\w\d_][\w\d_\[\]\<\>\*]*)"
'Identificatori (tipo)
Public Const IdentifierType As String = "([\w\d_][\w\d_\[\]\<\>\*\.\:]*)"
'Pattern usato per trovare le variabili
Public Const Variable As String = "(?<Type>IDt)\s+(?<Name>ID)"
Public NormalVariable As String = "\s*(?<Type>IDt)\s+((?<Name>ID)(\s*,\s*)?)+\s*(=.+)?;"
Public ScopeVariable As String = Scope & NormalVariable
Public Argument As String = "\(?\s*" & Variable & "\s*(,|\))"
'Pattern usato per trovare strutture/enumeratori
Public ValueType As String = "(static)?\s*(?<type>(struct|enum))\s+(?<Name>ID)[\s\n]*\{"
Public EnumValueType As String = "\{((?<Name>ID)(\s*=\s*IDt)?(\s*,[\s\n]*)?)*\}"
'Pattern usato per trovare classi/moduli/interfacce
Public ClassType As String = "(static)?\s*(?<type>(class|interface))\s+(?<Name>ID)(\s*:\s*IDt(\s*,\s*)?)*[\s\n]*\{"
'Pattern usato per trovare le procedure/funzioni/proprietà
Public Method As String = "\s*IDt\s+(?<Name>ID)\(.*\)[\s\n]*\{"
ID viene sostituito dopo con Identifier, mentre IDt con IdentifierType.