diff options
author | Yves Orton <demerphq@gmail.com> | 2006-09-25 22:09:07 +0200 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2006-09-25 22:01:36 +0000 |
commit | 03363afd3c2c023b9096c021741ecc63bc0de7dd (patch) | |
tree | f27d40ad2d3d91b064c59e82fc9799526b80d6c0 /regcomp.sym | |
parent | 84da74a7adb7db2354917b83df794f4983438fcd (diff) | |
download | perl-03363afd3c2c023b9096c021741ecc63bc0de7dd.tar.gz |
Automate generation of the regmatch() state constants
Subject: Re: Problem with EVAL handling in bleads iterative regex code.
Message-Id: <9b18b3110609251109t4cb1d443y87d7a7dc94fcfc24@mail.gmail.com>
p4raw-id: //depot/perl@28892
Diffstat (limited to 'regcomp.sym')
-rw-r--r-- | regcomp.sym | 45 |
1 files changed, 37 insertions, 8 deletions
diff --git a/regcomp.sym b/regcomp.sym index 25da9f7397..bc6f8e3164 100644 --- a/regcomp.sym +++ b/regcomp.sym @@ -1,13 +1,20 @@ -# Format: -# NAME \t TYPE, arg-description [num-args] [longjump-len] \t DESCRIPTION - -# Empty rows and #-comment rows are ignored. - +# regcomp.sym +# +# File has two sections, divided by a line of dashes '-'. +# +# Empty rows after #-comment are removed from input are ignored +# +# First section is for regops, second sectionis for regmatch-states +# # Note that the order in this file is important. # -# Add new regops to the end, and do not re-order the existing ops. +# Format for first section: +# NAME \t TYPE, arg-description [num-args] [longjump-len] \t DESCRIPTION +# # + + #* Exit points (0,1) END END, no End of program. @@ -146,9 +153,13 @@ TRIEC TRIE, trie charclass Same as TRIE, but with embedded charclass data AHOCORASICK TRIE, trie 1 Aho Corasick stclass. flags==type AHOCORASICKC TRIE, trie charclass Same as AHOCORASICK, but with embedded charclass data + + # NEW STUFF ABOVE THIS LINE -- Please update counts below. -#*Special Nodes (65, 66) +################################################################################ + +#*SPECIAL REGOPS (65, 66) # This is not really a node, but an optimized away piece of a "long" node. # To simplify debugging output, we mark it as if it were a node @@ -161,4 +172,22 @@ OPTIMIZED NOTHING,off Placeholder for dump. # "not seen anything to optimize yet". PSEUDO PSEUDO,off Pseudo opcode for internal use. -# NOTHING BELOW HERE
\ No newline at end of file +------------------------------------------------------------------------------- +# Format for second section: +# REGOP \t typelist [ \t typelist] [# Comment] +# typelist= namelist +# = namelist:FAIL +# = name:count + +# Anything below is a state +# +# +TRIE next:FAIL +EVAL AB:FAIL +CURLYX resume +WHILEM resume:6 +BRANCH next:FAIL +CURLYM A,B:FAIL +IFMATCH A:FAIL +CURLY B_min_known,B_min,B_max:FAIL + |