Dallycot

 view release on metacpan or  search on metacpan

lib/Dallycot/Parser.pm  view on Meta::CPAN

LT_LT ~ '<<'
MAP ~ '@'
MINUS ~ '-'
MOD ~ 'mod'
OR ~ 'or'
PIPE ~ '|'
PLUS ~ '+'
QUOTE ~ [']
# '
RB ~ ']'
RC ~ '}'
SET_END ~ '|>'
RIGHT_ARROW ~ '->'
RP ~ ')'
SLASH ~ '/'
STAR ~ '*'
STAR_RP ~ '*)'
TILDE ~ '~'
UNDERSCORE ~ '_'
TRIPLE_UNDERSCORE ~ '___'
Z ~ 'Z'

STMT_SEP ~ ';'

<any char> ~ [\d\D\n\r]

boolean ~ 'true' | 'false'

digits ~ [_\d] | digits [_\d]

controlWord ~ '@' <identifier bit>

inequality ~ '<' | '<=' | '=' | '<>' | '>=' | '>'

integer ~ negativeInteger | zero | positiveInteger

negativeInteger ~ '-' positiveInteger

nonZeroDigit ~ '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'

positiveInteger ~ nonZeroDigit | nonZeroDigit digits | 'inf'

float ~ negativeFloat | zero '.' zero | positiveFloat

negativeFloat ~ '-' positiveFloat

<positiveFloat integer part> ~ nonZeroDigit | nonZeroDigit digits

<positiveFloat fractional part> ~ digits

<positiveFloat exponent> ~ [eE] [-+] <integer>

positiveFloatSansExponent ~ <positiveFloat integer part> '.' zero
                          | <positiveFloat integer part> '.' <positiveFloat fractional part>
                          | zero '.' <positiveFloat fractional part>

positiveFloat ~ positiveFloatSansExponent
              | positiveFloatSansExponent <positiveFloat exponent>
              | <positiveFloat integer part> <positiveFloat exponent>

duration ~ 'P' calendarDuration
         | 'P' calendarDuration 'T' clockDuration
         | 'P' 'T' clockDuration

calendarDuration ~ yearDuration monthlyDuration
                 | monthlyDuration

monthlyDuration ~ monthDuration dayDuration
                | dayDuration

yearDuration ~ zero 'Y'
             | positiveInteger 'Y'

monthDuration ~ zero 'M'
              | positiveInteger 'M'

dayDuration ~ zero 'D'
            | positiveInteger 'D'

clockDuration ~ hourDuration minutelyDuration
              | minutelyDuration

minutelyDuration ~ minuteDuration secondDuration
                 | secondDuration

hourDuration ~ zero 'H'
             | positiveInteger 'H'

minuteDuration ~ zero 'M'
               | positiveInteger 'M'

secondDuration ~ zero 'S'
               | positiveFloatSansExponent 'S'

identifier ~ <identifier bit> | identifier '-' <identifier bit>

<identifier bit> ~ [\w]+

qcname ~ identifier ':' identifier

# TODO: add @"lang" to end of string
#
qqstring ~ <qqstring value> | <qqstring value> '@' <qqstring lang>

jsonstring ~ <qqstring value>

<qqstring value> ~ DQUOTE qqstringContent DQUOTE | DQUOTE DQUOTE

qqstringChar ~ [^\"] | '\' <any char>
#"

<qqstring lang> ~ [a-z][a-z] | [a-z][a-z] '_' [A-Z][A-Z]

qqstringContent ~ qqstringChar | qqstringContent qqstringChar

stringVector ~ <stringVector value> | <stringVector value> '@' <qqstring lang>

<stringVector value> ~ LT_LT stringVectorContent GT_GT | LT_LT GT_GT

stringVectorContent ~ stringVectorChar | stringVectorContent stringVectorChar

stringVectorChar ~ [^>] | '>' [^>] | '\' <any char>
#'

uri ~ '<' uriScheme '://' uriAuthority '/' uriPath '>'



( run in 0.352 second using v1.01-cache-2.11-cpan-39bf76dae61 )