Google

Jakarta-Regexp 1.2 API: Class REDebugCompiler

org.apache.regexp
Class REDebugCompiler


java.lang.Object

  |

  +--org.apache.regexp.RECompiler

        |

        +--org.apache.regexp.REDebugCompiler


public class REDebugCompiler
extends RECompiler

A subclass of RECompiler which can dump a regular expression program for debugging purposes.

Version:
$Id: REDebugCompiler.java,v 1.1 2000/04/27 01:22:33 jon Exp $
Author:
Jonathan Locke

Inner classes inherited from class org.apache.regexp.RECompiler
RECompiler.RERange
 
Field Summary
(package private) static java.util.Hashtable hashOpcode
          Mapping from opcodes to descriptive strings
 
Fields inherited from class org.apache.regexp.RECompiler
bracketEnd, bracketFinished, bracketMin, bracketOpt, brackets, bracketStart, bracketUnbounded, ESC_BACKREF, ESC_CLASS, ESC_COMPLEX, ESC_MASK, hashPOSIX, idx, instruction, len, lenInstruction, maxBrackets, NODE_NORMAL, NODE_NULLABLE, NODE_TOPLEVEL, parens, pattern
 
Constructor Summary
REDebugCompiler()
           
 
Method Summary
(package private) static void ()
           
(package private)  java.lang.String charToString(char c)
          Return a string describing a (possibly unprintable) character.
 void dumpProgram(java.io.PrintWriter p)
          Dumps the current program to a PrintWriter
(package private)  java.lang.String nodeToString(int node)
          Returns a descriptive string for a node in a regular expression program.
(package private)  java.lang.String opcodeToString(char opcode)
          Returns a descriptive string for an opcode.
 
Methods inherited from class org.apache.regexp.RECompiler
allocBrackets, atom, bracket, branch, characterClass, closure, compile, emit, ensure, escape, expr, internalError, node, nodeInsert, setNextOfEnd, syntaxError, terminal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

hashOpcode


static java.util.Hashtable hashOpcode
Mapping from opcodes to descriptive strings
Constructor Detail

REDebugCompiler


public REDebugCompiler()
Method Detail


static void ()

opcodeToString


java.lang.String opcodeToString(char opcode)
Returns a descriptive string for an opcode.
Parameters:
opcode - Opcode to convert to a string
Returns:
Description of opcode

charToString


java.lang.String charToString(char c)
Return a string describing a (possibly unprintable) character.
Parameters:
c - Character to convert to a printable representation
Returns:
String representation of character

nodeToString


java.lang.String nodeToString(int node)
Returns a descriptive string for a node in a regular expression program.
Parameters:
node - Node to describe
Returns:
Description of node

dumpProgram


public void dumpProgram(java.io.PrintWriter p)
Dumps the current program to a PrintWriter
Parameters:
p - PrintWriter for program dump output


Copyright © 2000 Apache Software Foundation. All Rights Reserved.