/[pcre]/code/trunk/HACKING
ViewVC logotype

Diff of /code/trunk/HACKING

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

code/trunk/doc/Tech.Notes revision 93 by nigel, Sat Feb 24 21:41:42 2007 UTC code/trunk/HACKING revision 212 by ph10, Thu Aug 9 11:16:34 2007 UTC
# Line 109  variable length. The first byte in an it Line 109  variable length. The first byte in an it
109  item is either implicit in the opcode or contained in the data bytes that  item is either implicit in the opcode or contained in the data bytes that
110  follow it.  follow it.
111    
112  In many cases below "two-byte" data values are specified. This is in fact just  In many cases below LINK_SIZE data values are specified for offsets within the
113  a default when the number is an offset within the compiled pattern. PCRE can be  compiled pattern. The default value for LINK_SIZE is 2, but PCRE can be
114  compiled to use 3-byte or 4-byte values for these offsets (impairing the  compiled to use 3-byte or 4-byte values for these offsets (impairing the
115  performance). This is necessary only when patterns whose compiled length is  performance). This is necessary only when patterns whose compiled length is
116  greater than 64K are going to be processed. In this description, we assume the  greater than 64K are going to be processed. In this description, we assume the
117  "normal" compilation options. "Two-byte" data values that are counts (e.g. for  "normal" compilation options. Data values that are counts (e.g. for
118  quantifiers) are always just two bytes.  quantifiers) are always just two bytes long.
119    
120  A list of all the opcodes follows:  A list of the opcodes follows:
121    
122  Opcodes with no following data  Opcodes with no following data
123  ------------------------------  ------------------------------
# Line 129  These items are all just one byte long Line 129  These items are all just one byte long
129    OP_ANYBYTE             match any single byte, even in UTF-8 mode    OP_ANYBYTE             match any single byte, even in UTF-8 mode
130    OP_SOD                 match start of data: \A    OP_SOD                 match start of data: \A
131    OP_SOM,                start of match (subject + offset): \G    OP_SOM,                start of match (subject + offset): \G
132      OP_SET_SOM,            set start of match (\K)
133    OP_CIRC                ^ (start of data, or after \n in multiline)    OP_CIRC                ^ (start of data, or after \n in multiline)
134    OP_NOT_WORD_BOUNDARY   \W    OP_NOT_WORD_BOUNDARY   \W
135    OP_WORD_BOUNDARY       \w    OP_WORD_BOUNDARY       \w
136    OP_NOT_DIGIT           \D    OP_NOT_DIGIT           \D
137    OP_DIGIT               \d    OP_DIGIT               \d
138      OP_NOT_HSPACE          \H
139      OP_HSPACE              \h
140    OP_NOT_WHITESPACE      \S    OP_NOT_WHITESPACE      \S
141    OP_WHITESPACE          \s    OP_WHITESPACE          \s
142      OP_NOT_VSPACE          \V
143      OP_VSPACE              \v
144    OP_NOT_WORDCHAR        \W    OP_NOT_WORDCHAR        \W
145    OP_WORDCHAR            \w    OP_WORDCHAR            \w
146    OP_EODN                match end of data or \n at end: \Z    OP_EODN                match end of data or \n at end: \Z
# Line 144  These items are all just one byte long Line 149  These items are all just one byte long
149    OP_EXTUNI              match an extended Unicode character    OP_EXTUNI              match an extended Unicode character
150    OP_ANYNL               match any Unicode newline sequence    OP_ANYNL               match any Unicode newline sequence
151    
152      OP_ACCEPT              )
153      OP_COMMIT              )
154      OP_FAIL                ) These are Perl 5.10's "backtracking
155      OP_PRUNE               ) control verbs".
156      OP_SKIP                )
157      OP_THEN                )
158    
159    
160  Repeating single characters  Repeating single characters
161  ---------------------------  ---------------------------
# Line 399  at compile time, and so does not cause a Line 411  at compile time, and so does not cause a
411  data.  data.
412    
413  Philip Hazel  Philip Hazel
414  November 2006  August 2007

Legend:
Removed from v.93  
changed lines
  Added in v.212

  ViewVC Help
Powered by ViewVC 1.1.5