/[pcre]/code/trunk/pcre_dfa_exec.c
ViewVC logotype

Diff of /code/trunk/pcre_dfa_exec.c

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

revision 498 by ph10, Wed Mar 3 19:29:38 2010 UTC revision 510 by ph10, Sat Mar 27 17:45:29 2010 UTC
# Line 106  never stored, so we push them well clear Line 106  never stored, so we push them well clear
106    
107    
108  /* This table identifies those opcodes that are followed immediately by a  /* This table identifies those opcodes that are followed immediately by a
109  character that is to be tested in some way. This makes is possible to  character that is to be tested in some way. This makes it possible to
110  centralize the loading of these characters. In the case of Type * etc, the  centralize the loading of these characters. In the case of Type * etc, the
111  "character" is the opcode for \D, \d, \S, \s, \W, or \w, which will always be a  "character" is the opcode for \D, \d, \S, \s, \W, or \w, which will always be a
112  small value. Non-zero values in the table are the offsets from the opcode where  small value. Non-zero values in the table are the offsets from the opcode where
# Line 161  static const uschar coptable[] = { Line 161  static const uschar coptable[] = {
161    0, 0,                          /* RREF, NRREF                            */    0, 0,                          /* RREF, NRREF                            */
162    0,                             /* DEF                                    */    0,                             /* DEF                                    */
163    0, 0,                          /* BRAZERO, BRAMINZERO                    */    0, 0,                          /* BRAZERO, BRAMINZERO                    */
164    0, 0, 0, 0,                    /* PRUNE, SKIP, THEN, COMMIT              */    0, 0, 0,                       /* MARK, PRUNE, PRUNE_ARG,                */
165    0, 0, 0, 0                     /* FAIL, ACCEPT, CLOSE, SKIPZERO          */    0, 0, 0, 0,                    /* SKIP, SKIP_ARG, THEN, THEN_ARG,        */
166      0, 0, 0, 0, 0                  /* COMMIT, FAIL, ACCEPT, CLOSE, SKIPZERO  */
167  };  };
168    
169  /* This table identifies those opcodes that inspect a character. It is used to  /* This table identifies those opcodes that inspect a character. It is used to
# Line 218  static const uschar poptable[] = { Line 219  static const uschar poptable[] = {
219    0, 0,                          /* RREF, NRREF                            */    0, 0,                          /* RREF, NRREF                            */
220    0,                             /* DEF                                    */    0,                             /* DEF                                    */
221    0, 0,                          /* BRAZERO, BRAMINZERO                    */    0, 0,                          /* BRAZERO, BRAMINZERO                    */
222    0, 0, 0, 0,                    /* PRUNE, SKIP, THEN, COMMIT              */    0, 0, 0,                       /* MARK, PRUNE, PRUNE_ARG,                */
223    0, 0, 0, 0                     /* FAIL, ACCEPT, CLOSE, SKIPZERO          */    0, 0, 0, 0,                    /* SKIP, SKIP_ARG, THEN, THEN_ARG,        */
224      0, 0, 0, 0, 0                  /* COMMIT, FAIL, ACCEPT, CLOSE, SKIPZERO  */
225  };  };
226    
227  /* These 2 tables allow for compact code for testing for \D, \d, \S, \s, \W,  /* These 2 tables allow for compact code for testing for \D, \d, \S, \s, \W,
# Line 714  for (;;) Line 716  for (;;)
716        opcode, are not the correct length. It seems to be the only way to do        opcode, are not the correct length. It seems to be the only way to do
717        such a check at compile time, as the sizeof() operator does not work        such a check at compile time, as the sizeof() operator does not work
718        in the C preprocessor. */        in the C preprocessor. */
719    
720        case OP_TABLE_LENGTH:        case OP_TABLE_LENGTH:
721        case OP_TABLE_LENGTH +        case OP_TABLE_LENGTH +
722          ((sizeof(coptable) == OP_TABLE_LENGTH) &&          ((sizeof(coptable) == OP_TABLE_LENGTH) &&
723           (sizeof(poptable) == OP_TABLE_LENGTH)):           (sizeof(poptable) == OP_TABLE_LENGTH)):
724        break;        break;
725    
726  /* ========================================================================== */  /* ========================================================================== */
727        /* Reached a closing bracket. If not at the end of the pattern, carry        /* Reached a closing bracket. If not at the end of the pattern, carry

Legend:
Removed from v.498  
changed lines
  Added in v.510

  ViewVC Help
Powered by ViewVC 1.1.5