if (m/ (?! $Keyword | $BooleanLiteral | $NullLiteral ) $IdentifierChars /x) {
# this is an Identifier
}
--
You received this message because you are subscribed to the Google Groups "marpa parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email to marpa-parser+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
4.) Not sure this answers your question, but L0 rules allow full Marpa syntax.
MultilineComment ~ ('/*' .*? '*/') # parentheses being optional
On Oct 15, 2016 13:01, "Jeffrey Kegler" <jeffre...@jeffreykegler.com> wrote:
>
> Re #4, why not implement Perl regexes? A full syntax of Perl regexes is gruesomely complex, and much of it is symptoms rather than features.
Somewhere deep within perldoc there's a howto on making your own \p{} named properties, which AFAICT are acceptable to Marpa's regex engine. IIRC, I once had some progress that way.
--
P/PW/PWBENNETT
On Oct 15, 2016 13:01, "Jeffrey Kegler" <jeffreykegler@jeffreykegler.com> wrote:
>
> Re #4, why not implement Perl regexes? A full syntax of Perl regexes is gruesomely complex, and much of it is symptoms rather than features.Somewhere deep within perldoc there's a howto on making your own \p{} named properties, which AFAICT are acceptable to Marpa's regex engine. IIRC, I once had some progress that way.
--
P/PW/PWBENNETT
--
1. Keyword vs Identifier:
2. Comment (single- and multi-line versions)
Using this material, I've added 2 new questions to the FAQ: http://savage.net.au/Perl-modules/html/marpa.faq/faq.html. Nos 144 and 145.
--
sub IsSourceCharacterButNotStarOrLineTerminator { return <<END; +MarpaX::Languages::ECMAScript::AST::Grammar::CharacterClasses::IsSourceCharacter -MarpaX::Languages::ECMAScript::AST::Grammar::CharacterClasses::IsStar -MarpaX::Languages::ECMAScript::AST::Grammar::CharacterClasses::IsLineTerminator END } |