org.apache.regexp

Class REDebugCompiler


public class REDebugCompiler
extends RECompiler

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

Version:
$Id: REDebugCompiler.java 126149 2004-02-19 02:35:28Z vgritsenko $

Author:
Jonathan Locke

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.regexp.RECompiler

RECompiler.RERange

Field Summary

(package private) static Hashtable
hashOpcode
Mapping from opcodes to descriptive strings

Fields inherited from class org.apache.regexp.RECompiler

ESC_BACKREF, ESC_CLASS, ESC_COMPLEX, ESC_MASK, NODE_NORMAL, NODE_NULLABLE, NODE_TOPLEVEL, bracketEnd, bracketMin, bracketOpt, bracketStart, bracketUnbounded, brackets, hashPOSIX, idx, instruction, len, lenInstruction, maxBrackets, parens, pattern

Method Summary

(package private) String
charToString(char c)
Return a string describing a (possibly unprintable) character.
void
dumpProgram(PrintWriter p)
Dumps the current program to a PrintWriter
(package private) String
nodeToString(int node)
Returns a descriptive string for a node in a regular expression program.
(package private) 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, reallocBrackets, setNextOfEnd, syntaxError, terminal

Field Details

hashOpcode

(package private) static Hashtable hashOpcode
Mapping from opcodes to descriptive strings

Method Details

charToString

(package private)  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


dumpProgram

public void dumpProgram(PrintWriter p)
Dumps the current program to a PrintWriter

Parameters:
p - PrintWriter for program dump output


nodeToString

(package private)  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


opcodeToString

(package private)  String opcodeToString(char opcode)
Returns a descriptive string for an opcode.

Parameters:
opcode - Opcode to convert to a string

Returns:
Description of opcode


Copyright © 2001-2003 Apache Software Foundation. All Rights Reserved.