antlr3debughandlers.c File Reference


Detailed Description

Provides the debugging functions invoked by a recognizer built using the debug generator mode of the antlr tool.

See antlr3debugeventlistener.h for documentation.

#include <antlr3.h>

Include dependency graph for antlr3debughandlers.c:


Functions

static void ack (pANTLR3_DEBUG_EVENT_LISTENER delboy)
static void addChild (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE root, pANTLR3_BASE_TREE child)
ANTLR3_API
pANTLR3_DEBUG_EVENT_LISTENER 
antlr3DebugListenerNew ()
 Create and initialize a new debug event listener that can be connected to by ANTLRWorks and any other debugger via a socket.
pANTLR3_DEBUG_EVENT_LISTENER antlr3DebugListenerNewPort (ANTLR3_UINT32 port)
static void becomeRoot (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE newRoot, pANTLR3_BASE_TREE oldRoot)
static void beginBacktrack (pANTLR3_DEBUG_EVENT_LISTENER delboy, int level)
static void beginResync (pANTLR3_DEBUG_EVENT_LISTENER delboy)
static void commence (pANTLR3_DEBUG_EVENT_LISTENER delboy)
static void consumeHiddenToken (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_COMMON_TOKEN t)
static void consumeNode (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t)
static void consumeToken (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_COMMON_TOKEN t)
static void createNode (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t)
static void createNodeTok (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE node, pANTLR3_COMMON_TOKEN token)
static void endBacktrack (pANTLR3_DEBUG_EVENT_LISTENER delboy, int level, ANTLR3_BOOLEAN successful)
static void endResync (pANTLR3_DEBUG_EVENT_LISTENER delboy)
static void enterAlt (pANTLR3_DEBUG_EVENT_LISTENER delboy, int alt)
static void enterDecision (pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber)
static void enterRule (pANTLR3_DEBUG_EVENT_LISTENER delboy, const char *grammarFileName, const char *ruleName)
static void enterSubRule (pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber)
static void errorNode (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t)
static void exitDecision (pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber)
static void exitRule (pANTLR3_DEBUG_EVENT_LISTENER delboy, const char *grammarFileName, const char *ruleName)
static void exitSubRule (pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber)
static ANTLR3_BOOLEAN handshake (pANTLR3_DEBUG_EVENT_LISTENER delboy)
static void location (pANTLR3_DEBUG_EVENT_LISTENER delboy, int line, int pos)
static void LT (pANTLR3_DEBUG_EVENT_LISTENER delboy, int i, pANTLR3_COMMON_TOKEN t)
static void LTT (pANTLR3_DEBUG_EVENT_LISTENER delboy, int i, pANTLR3_BASE_TREE t)
static void mark (pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_MARKER marker)
static void nilNode (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t)
static void recognitionException (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_EXCEPTION e)
static void rewindLast (pANTLR3_DEBUG_EVENT_LISTENER delboy)
static void rewindMark (pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_MARKER marker)
static void semanticPredicate (pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_BOOLEAN result, const char *predicate)
pANTLR3_STRING serializeNode (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE node)
void serializeText (pANTLR3_STRING buffer, pANTLR3_STRING text)
pANTLR3_STRING serializeToken (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_COMMON_TOKEN t)
static void setTokenBoundaries (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t, ANTLR3_MARKER tokenStartIndex, ANTLR3_MARKER tokenStopIndex)
static int sockSend (SOCKET sock, const char *ptr, int len)
static void terminate (pANTLR3_DEBUG_EVENT_LISTENER delboy)
static void transmit (pANTLR3_DEBUG_EVENT_LISTENER delboy, const char *ptr)

Function Documentation

static void ack ( pANTLR3_DEBUG_EVENT_LISTENER  delboy  )  [static]

References ANTLR3_PRINTF, and ANTLR3_DEBUG_EVENT_LISTENER_struct::socket.

Referenced by handshake(), and transmit().

Here is the caller graph for this function:

static void addChild ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
pANTLR3_BASE_TREE  root,
pANTLR3_BASE_TREE  child 
) [static]

ANTLR3_API pANTLR3_DEBUG_EVENT_LISTENER antlr3DebugListenerNew (  ) 

Create and initialize a new debug event listener that can be connected to by ANTLRWorks and any other debugger via a socket.

References addChild(), ANTLR3_DEBUG_EVENT_LISTENER_struct::addChild, ANTLR3_CALLOC, becomeRoot(), ANTLR3_DEBUG_EVENT_LISTENER_struct::becomeRoot, beginBacktrack(), ANTLR3_DEBUG_EVENT_LISTENER_struct::beginBacktrack, beginResync(), ANTLR3_DEBUG_EVENT_LISTENER_struct::beginResync, commence(), ANTLR3_DEBUG_EVENT_LISTENER_struct::commence, consumeHiddenToken(), ANTLR3_DEBUG_EVENT_LISTENER_struct::consumeHiddenToken, consumeNode(), ANTLR3_DEBUG_EVENT_LISTENER_struct::consumeNode, consumeToken(), ANTLR3_DEBUG_EVENT_LISTENER_struct::consumeToken, createNode(), ANTLR3_DEBUG_EVENT_LISTENER_struct::createNode, createNodeTok(), ANTLR3_DEBUG_EVENT_LISTENER_struct::createNodeTok, DEFAULT_DEBUGGER_PORT, endBacktrack(), ANTLR3_DEBUG_EVENT_LISTENER_struct::endBacktrack, endResync(), ANTLR3_DEBUG_EVENT_LISTENER_struct::endResync, enterAlt(), ANTLR3_DEBUG_EVENT_LISTENER_struct::enterAlt, enterDecision(), ANTLR3_DEBUG_EVENT_LISTENER_struct::enterDecision, enterRule(), ANTLR3_DEBUG_EVENT_LISTENER_struct::enterRule, enterSubRule(), ANTLR3_DEBUG_EVENT_LISTENER_struct::enterSubRule, errorNode(), ANTLR3_DEBUG_EVENT_LISTENER_struct::errorNode, exitDecision(), ANTLR3_DEBUG_EVENT_LISTENER_struct::exitDecision, exitRule(), ANTLR3_DEBUG_EVENT_LISTENER_struct::exitRule, exitSubRule(), ANTLR3_DEBUG_EVENT_LISTENER_struct::exitSubRule, handshake(), ANTLR3_DEBUG_EVENT_LISTENER_struct::handshake, location(), ANTLR3_DEBUG_EVENT_LISTENER_struct::location, LT(), ANTLR3_DEBUG_EVENT_LISTENER_struct::LT, LTT(), ANTLR3_DEBUG_EVENT_LISTENER_struct::LTT, mark(), ANTLR3_DEBUG_EVENT_LISTENER_struct::mark, nilNode(), ANTLR3_DEBUG_EVENT_LISTENER_struct::nilNode, ANTLR3_DEBUG_EVENT_LISTENER_struct::port, ANTLR3_DEBUG_EVENT_LISTENER_struct::PROTOCOL_VERSION, recognitionException(), ANTLR3_DEBUG_EVENT_LISTENER_struct::recognitionException, ANTLR3_DEBUG_EVENT_LISTENER_struct::rewind, rewindLast(), ANTLR3_DEBUG_EVENT_LISTENER_struct::rewindLast, rewindMark(), semanticPredicate(), ANTLR3_DEBUG_EVENT_LISTENER_struct::semanticPredicate, setTokenBoundaries(), ANTLR3_DEBUG_EVENT_LISTENER_struct::setTokenBoundaries, terminate(), and ANTLR3_DEBUG_EVENT_LISTENER_struct::terminate.

Referenced by antlr3DebugListenerNewPort().

Here is the call graph for this function:

Here is the caller graph for this function:

pANTLR3_DEBUG_EVENT_LISTENER antlr3DebugListenerNewPort ( ANTLR3_UINT32  port  ) 

References antlr3DebugListenerNew(), and ANTLR3_DEBUG_EVENT_LISTENER_struct::port.

Here is the call graph for this function:

static void becomeRoot ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
pANTLR3_BASE_TREE  newRoot,
pANTLR3_BASE_TREE  oldRoot 
) [static]

static void beginBacktrack ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
int  level 
) [static]

static void beginResync ( pANTLR3_DEBUG_EVENT_LISTENER  delboy  )  [static]

static void commence ( pANTLR3_DEBUG_EVENT_LISTENER  delboy  )  [static]

Referenced by antlr3DebugListenerNew().

Here is the caller graph for this function:

static void consumeHiddenToken ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
pANTLR3_COMMON_TOKEN  t 
) [static]

References ANTLR3_STRING_struct::addc, ANTLR3_STRING_struct::chars, ANTLR3_STRING_struct::insert8, serializeToken(), and transmit().

Referenced by antlr3DebugListenerNew().

Here is the call graph for this function:

Here is the caller graph for this function:

static void consumeNode ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
pANTLR3_BASE_TREE  t 
) [static]

Referenced by antlr3DebugListenerNew().

Here is the caller graph for this function:

static void consumeToken ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
pANTLR3_COMMON_TOKEN  t 
) [static]

References ANTLR3_STRING_struct::addc, ANTLR3_STRING_struct::chars, ANTLR3_STRING_struct::insert8, serializeToken(), and transmit().

Referenced by antlr3DebugListenerNew().

Here is the call graph for this function:

Here is the caller graph for this function:

static void createNode ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
pANTLR3_BASE_TREE  t 
) [static]

Referenced by antlr3DebugListenerNew().

Here is the caller graph for this function:

static void createNodeTok ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
pANTLR3_BASE_TREE  node,
pANTLR3_COMMON_TOKEN  token 
) [static]

Referenced by antlr3DebugListenerNew().

Here is the caller graph for this function:

static void endBacktrack ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
int  level,
ANTLR3_BOOLEAN  successful 
) [static]

static void endResync ( pANTLR3_DEBUG_EVENT_LISTENER  delboy  )  [static]

static void enterAlt ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
int  alt 
) [static]

References transmit().

Referenced by antlr3DebugListenerNew().

Here is the call graph for this function:

Here is the caller graph for this function:

static void enterDecision ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
int  decisionNumber 
) [static]

References transmit().

Referenced by antlr3DebugListenerNew().

Here is the call graph for this function:

Here is the caller graph for this function:

static void enterRule ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
const char *  grammarFileName,
const char *  ruleName 
) [static]

References transmit().

Referenced by antlr3DebugListenerNew().

Here is the call graph for this function:

Here is the caller graph for this function:

static void enterSubRule ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
int  decisionNumber 
) [static]

References transmit().

Referenced by antlr3DebugListenerNew().

Here is the call graph for this function:

Here is the caller graph for this function:

static void errorNode ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
pANTLR3_BASE_TREE  t 
) [static]

static void exitDecision ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
int  decisionNumber 
) [static]

References transmit().

Referenced by antlr3DebugListenerNew().

Here is the call graph for this function:

Here is the caller graph for this function:

static void exitRule ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
const char *  grammarFileName,
const char *  ruleName 
) [static]

References transmit().

Referenced by antlr3DebugListenerNew().

Here is the call graph for this function:

Here is the caller graph for this function:

static void exitSubRule ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
int  decisionNumber 
) [static]

References transmit().

Referenced by antlr3DebugListenerNew().

Here is the call graph for this function:

Here is the caller graph for this function:

static ANTLR3_BOOLEAN handshake ( pANTLR3_DEBUG_EVENT_LISTENER  delboy  )  [static]

static void location ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
int  line,
int  pos 
) [static]

Referenced by antlr3DebugListenerNew().

Here is the caller graph for this function:

static void LT ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
int  i,
pANTLR3_COMMON_TOKEN  t 
) [static]

Referenced by antlr3DebugListenerNew().

Here is the caller graph for this function:

static void LTT ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
int  i,
pANTLR3_BASE_TREE  t 
) [static]

Referenced by antlr3DebugListenerNew().

Here is the caller graph for this function:

static void mark ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
ANTLR3_MARKER  marker 
) [static]

static void nilNode ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
pANTLR3_BASE_TREE  t 
) [static]

static void recognitionException ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
pANTLR3_EXCEPTION  e 
) [static]

Referenced by antlr3DebugListenerNew().

Here is the caller graph for this function:

static void rewindLast ( pANTLR3_DEBUG_EVENT_LISTENER  delboy  )  [static]

static void rewindMark ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
ANTLR3_MARKER  marker 
) [static]

static void semanticPredicate ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
ANTLR3_BOOLEAN  result,
const char *  predicate 
) [static]

Referenced by antlr3DebugListenerNew().

Here is the caller graph for this function:

pANTLR3_STRING serializeNode ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
pANTLR3_BASE_TREE  node 
)

void serializeText ( pANTLR3_STRING  buffer,
pANTLR3_STRING  text 
)

static void setTokenBoundaries ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
pANTLR3_BASE_TREE  t,
ANTLR3_MARKER  tokenStartIndex,
ANTLR3_MARKER  tokenStopIndex 
) [static]

static int sockSend ( SOCKET  sock,
const char *  ptr,
int  len 
) [static]

References ANTLR3_FALSE, and ANTLR3_TRUE.

Referenced by handshake(), and transmit().

Here is the caller graph for this function:

static void terminate ( pANTLR3_DEBUG_EVENT_LISTENER  delboy  )  [static]

Referenced by antlr3DebugListenerNew().

Here is the caller graph for this function:

static void transmit ( pANTLR3_DEBUG_EVENT_LISTENER  delboy,
const char *  ptr 
) [static]

References ack(), ANTLR3_DEBUG_EVENT_LISTENER_struct::socket, and sockSend().

Referenced by consumeHiddenToken(), consumeToken(), enterAlt(), enterDecision(), enterRule(), enterSubRule(), exitDecision(), exitRule(), and exitSubRule().

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Mon Nov 29 17:23:38 2010 for ANTLR3C by  doxygen 1.5.5