OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

tosca message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] (TOSCA-135) CSD02 - Define/reference a Regex language (or subset) we wish to support for constraints


    [ https://issues.oasis-open.org/browse/TOSCA-135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48746#comment-48746 ] 

Matthew Rutkowski  commented on TOSCA-135:
------------------------------------------

Which standard should we reference?  Should we support all or subset? Is lazy allowed?

Perl seems to be referenced as "de facto", if we reference it do we want to do so wholesale?

---- From Wikipedia:
Standards

The IEEE POSIX standard has three sets of compliance: BRE,[23] ERE, and SRE for Basic, Extended, and Simple Regular Expressions. SRE is deprecated,[24] in favor of BRE, as both provide backward compatibility. The subsection below covering the character classes applies to both BRE and ERE.

BRE and ERE work together. ERE adds ?, +, and |, and it removes the need to escape the metacharacters ( ) and { }, which are required in BRE. Furthermore, as long as the POSIX standard syntax for regular expressions is adhered to, there can be, and often is, additional syntax to serve specific (yet POSIX compliant) applications. Although POSIX.2 leaves some implementation specifics undefined, BRE and ERE provide a "standard" which has since been adopted as the default syntax of many tools, where the choice of BRE or ERE modes is usually a supported option. For example, GNU grep has the following options: "grep -E" for ERE, and "grep -G" for BRE (the default), and "grep -P" for Perl regular expressions.

Perl regular expressions have become a de facto standard, having a rich and powerful set of atomic expressions. Perl has no "basic" or "extended" levels, where the ( ) and { } may or may not have literal meanings. They are always metacharacters, as they are in "extended" mode for POSIX. To get their literal meaning, you escape them. Other metacharacters are known to be literal or symbolic based on context alone. Perl offers much more functionality: "lazy" regular expressions, backtracking, named capture groups, and recursive patterns, all of which are powerful additions to POSIX BRE/ERE. (See lazy quantification below.)

> CSD02 - Define/reference a Regex language (or subset) we wish to support for constraints
> ----------------------------------------------------------------------------------------
>
>                 Key: TOSCA-135
>                 URL: https://issues.oasis-open.org/browse/TOSCA-135
>             Project: OASIS Topology and Orchestration Specification for Cloud Applications (TOSCA) TC
>          Issue Type: New Feature
>          Components: Profile-YAML
>    Affects Versions: CSD2
>            Reporter: Matthew Rutkowski 
>            Assignee: Travis Tripp
>             Fix For: CSD2
>
>
> Need a normative regular expression grammar should to reference when cosntructing "Pattern-based" constraint clauses. It should be relatively simple and based upon a standardized/referable published standard (or a subset thereof that we can describe in our YAML profile). 



--
This message was sent by Atlassian JIRA
(v6.2.2#6258)


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]