![]() |
|
Problems? Is your data what you think it is? | |
PerlMonks |
Re^2: Cannot get Marpa::R2 to prioritise one rule over anotherby Anonymous Monk |
on Jan 21, 2021 at 20:21 UTC ( #11127227=note: print w/replies, xml ) | Need Help?? |
While these regex libraries are useful, I don't think I can fold them directly into a Marpa DSL definiton. From what I can tell, I can only use individial character classes, and would have to comprise a number of lexeme tokens to match the relative complexity of the IPv4 (and especially IPv6) expressions. In my more-specific application, I am indeed intending to validate the IPs externally -- probably with Net::IP. To that end, I may well alter the DSL just to accept NAME, and lay off the exact semantics to a subroutine with an if (is_ip4(...) { ... } elsif (is_ip6(...) { ... } else { assume_hostname(...) } flavour. Thanks for looking in... J.
In Section
Seekers of Perl Wisdom
|
|