Return

perl regex whom parses parses perl?

1 Name: Anonymous 2017-10-29 22:44
https://st.aticpan.org/source/DCONWAY/PPR-0.000014/lib/PPR.pm


our $GRAMMAR = qr{
(?(DEFINE)

(?<PerlDocument>
\x{FEFF}?+ # Optional BOM marker
(?>(?&PerlOWS))
(?: (?>(?&PerlStatement)) (?&PerlOWS) )*+
) # End of rule

(?<PerlStatement>
(?: (?>(?&PerlPod)) (?&PerlOWS) )?+
(?>
(?: (?>(?&PerlLabel)) (?&PerlOWS) )?+
(?: (?>(?&PerlPod)) (?&PerlOWS) )?+
(?>
(?&PerlKeyword)
|
# Inlined (?&PerlSubroutineDeclaration)...
(?>
sub \b (?>(?&PerlOWS))
(?>(?&PerlOldQualifiedIdentifier)) (?&PerlOWS)
|
AUTOLOAD (?&PerlOWS)
|
DESTROY (?&PerlOWS)
)
(?:
(?>
(?&PerlParenthesesList) # Parameter list
|
\( [^)]*+ \) # Prototype (
) (?&PerlOWS)
)?+
(?: (?>(?&PerlAttributes)) (?&PerlOWS) )?+
(?> ; | (?&PerlBlock) )
|
# Inlined (?&PerlUseStatement)...
(?: use | no ) (?>(?&PerlNWS))
(?>
(?&PerlVersionNumber)
|
(?>(?&PerlQualifiedIdentifier))
(?: (?>(?&PerlNWS)) (?&PerlVersionNumber)
(?! (?>(?&PerlOWS)) (?> (?&PerlInfixBinaryOperator) | (?&PerlComma) | \? ) )
)?+
(?: (?>(?&PerlNWS)) (?&PerlPod) )?+
(?: (?>(?&PerlOWS)) (?&PerlExpression) )?+
)
(?>(?&PerlOWS)) (?> ; | (?= \} | \z ))
|
# Inlined (?&PerlPackageDeclaration)...
package
(?>(?&PerlNWS)) (?>(?&PerlQualifiedIdentifier))
(?: (?>(?&PerlNWS)) (?&PerlVersionNumber) )?+
(?>(?&PerlOWS)) (?> ; | (?&PerlBlock) | (?= \} | \z ))
|
(?&PerlControlBlock)
|
(?&PerlFormat)
|
(?>(?&PerlExpression)) (?>(?&PerlOWS))
(?&PerlStatementModifier)?+ (?>(?&PerlOWS))
(?> ; | (?= \} | \z ))
|
(?&PerlBlock)
|
;
)

| # A yada-yada...
\.\.\. (?>(?&PerlOWS))
(?> ; | (?= \} | \z ))

| # Just a Label...
(?>(?&PerlLabel)) (?>(?&PerlOWS))
(?> ; | (?= \} | \z ))

| # Just an empty statement...
(?>(?&PerlOWS)) ;

| # An error (report it, if it's the first)...
(?(?{ !defined $PPR::ERROR })
(?> (?&PerlOWS) )
(?! (?: \} | \z ) )
(?{ pos() })
( (?&PerlExpression) (?&PerlOWS) [^\n]++ | [^;\}]++ )
(?{ $PPR::ERROR //= PPR::ERROR->new(source => $^N, prefix => substr($_, 0, $^R) ) })
(?!)
)
)
) # End of rule

(?<PerlSubroutineDeclaration>
(?>
sub \b (?>(?&PerlOWS))
(?>(?&PerlOldQualifiedIdentifier)) (?&PerlOWS)
|
AUTOLOAD (?&PerlOWS)
|
DESTROY (?&PerlOWS)
)
(?:
(?>
(?&PerlParenthesesList) # Parameter list
|
\( [^)]*+ \) # Prototype (
) (?&PerlOWS)
)?+
(?: (?>(?&PerlAttributes)) (?&PerlOWS) )?+
(?> ; | (?&PerlBlock) )
) # End of rule

(?<PerlUseStatement>
(?: use | no ) (?>(?&PerlNWS))
(?>
(?&PerlVersionNumber)
|
(?>(?&PerlQualifiedIdentifier))
(?: (?>(?&PerlNWS)) (?&PerlVersionNumber)
(?! (?>(?&PerlOWS)) (?> (?&PerlInfixBinaryOperator) | (?&PerlComma) | \? ) )
)?+
(?: (?>(?&PerlNWS)) (?&PerlPod) )?+
(?: (?>(?&PerlOWS)) (?&PerlExpression) )?+
)
(?>(?&PerlOWS)) (?> ; | (?= \} | \z ))
) # End of rule

(?<PerlReturnStatement>
return \b (?: (?>(?&PerlOWS)) (?&PerlExpression) )?+
(?>(?&PerlOWS)) (?> ; | (?= \} | \z ))
) # End of rule

(?<PerlPackageDeclaration>
package
(?>(?&PerlNWS)) (?>(?&PerlQualifiedIdentifier))
(?: (?>(?&PerlNWS)) (?&PerlVersionNumber) )?+
(?>(?&PerlOWS)) (?> ; | (?&PerlBlock) | (?= \} | \z ))
) # End of rule

(?<PerlExpression>
(?>(?&PerlLowPrecedenceNotExpression))
(?: (?>(?&PerlOWS)) (?>(?&PerlLowPrecedenceInfixOperator))
(?>(?&PerlOWS)) (?&PerlLowPrecedenceNotExpression) )*+
) # End of rule

...
2 Name: Anonymous 2017-10-31 05:02
>>1
whomst*

Return
Name:
Leave this field blank: