Permalink
Browse files

[ops2c] make the ops parser more forgiving

  • Loading branch information...
1 parent e1f5abe commit 1bba75d2420dbfce79b523ff10ea00c1f327a212 @cotto cotto committed Feb 21, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/Parrot/OpsFile.pm
View
@@ -255,7 +255,7 @@ sub read_ops {
$seen_pod = 1 if m|^=|;
$in_preamble = 1 if s|^BEGIN_OPS_PREAMBLE||;
- unless ( $seen_op or m|^(inline\s+)?op\s+| ) {
+ unless ( $seen_op or m|^(inline\s+)?op\s+.*\)| ) {
if (m|^END_OPS_PREAMBLE|) {
$_ = '';
@@ -306,13 +306,14 @@ sub read_ops {
(inline\s+)? # optional keywords
op
\s+
- ([a-zA-Z]\w*) # op name
+ ([a-zA-Z][\w_]*) # op name
\s*
\((.*)\) # argument signature
\s*
((?: \:\w+\s*)*) # :flags
\s*
{
+ \s*
$
/x;

0 comments on commit 1bba75d

Please sign in to comment.