• Home
  • Raw
  • Download

Lines Matching refs:delboy

55 static	ANTLR3_BOOLEAN	handshake		(pANTLR3_DEBUG_EVENT_LISTENER delboy);
56 static void enterRule (pANTLR3_DEBUG_EVENT_LISTENER delboy, const char * grammarFileName, const …
57 static void enterAlt (pANTLR3_DEBUG_EVENT_LISTENER delboy, int alt);
58 static void exitRule (pANTLR3_DEBUG_EVENT_LISTENER delboy, const char * grammarFileName, const c…
59 static void enterSubRule (pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber);
60 static void exitSubRule (pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber);
61 static void enterDecision (pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber);
62 static void exitDecision (pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber);
63 static void consumeToken (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_COMMON_TOKEN t);
64 static void consumeHiddenToken (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_COMMON_TOKEN t);
65 static void LT (pANTLR3_DEBUG_EVENT_LISTENER delboy, int i, pANTLR3_COMMON_TOKEN t);
66 static void mark (pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_MARKER marker);
67 static void rewindMark (pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_MARKER marker);
68 static void rewindLast (pANTLR3_DEBUG_EVENT_LISTENER delboy);
69 static void beginBacktrack (pANTLR3_DEBUG_EVENT_LISTENER delboy, int level);
70 static void endBacktrack (pANTLR3_DEBUG_EVENT_LISTENER delboy, int level, ANTLR3_BOOLEAN successf…
71 static void location (pANTLR3_DEBUG_EVENT_LISTENER delboy, int line, int pos);
72 static void recognitionException (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_EXCEPTION e);
73 static void beginResync (pANTLR3_DEBUG_EVENT_LISTENER delboy);
74 static void endResync (pANTLR3_DEBUG_EVENT_LISTENER delboy);
75 static void semanticPredicate (pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_BOOLEAN result, const c…
76 static void commence (pANTLR3_DEBUG_EVENT_LISTENER delboy);
77 static void terminate (pANTLR3_DEBUG_EVENT_LISTENER delboy);
78 static void consumeNode (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t);
79 static void LTT (pANTLR3_DEBUG_EVENT_LISTENER delboy, int i, pANTLR3_BASE_TREE t);
80 static void nilNode (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t);
81 static void errorNode (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t);
82 static void createNode (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t);
83 static void createNodeTok (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE node, pANTLR3_C…
84 static void becomeRoot (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE newRoot, pANTLR3_…
85 static void addChild (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE root, pANTLR3_BASE_…
86 static void setTokenBoundaries (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t, ANTLR3_M…
87 static void ack (pANTLR3_DEBUG_EVENT_LISTENER delboy);
95 pANTLR3_DEBUG_EVENT_LISTENER delboy; in antlr3DebugListenerNew() local
97 delboy = ANTLR3_CALLOC(1, sizeof(ANTLR3_DEBUG_EVENT_LISTENER)); in antlr3DebugListenerNew()
99 if (delboy == NULL) in antlr3DebugListenerNew()
106 delboy->addChild = addChild; in antlr3DebugListenerNew()
107 delboy->becomeRoot = becomeRoot; in antlr3DebugListenerNew()
108 delboy->beginBacktrack = beginBacktrack; in antlr3DebugListenerNew()
109 delboy->beginResync = beginResync; in antlr3DebugListenerNew()
110 delboy->commence = commence; in antlr3DebugListenerNew()
111 delboy->consumeHiddenToken = consumeHiddenToken; in antlr3DebugListenerNew()
112 delboy->consumeNode = consumeNode; in antlr3DebugListenerNew()
113 delboy->consumeToken = consumeToken; in antlr3DebugListenerNew()
114 delboy->createNode = createNode; in antlr3DebugListenerNew()
115 delboy->createNodeTok = createNodeTok; in antlr3DebugListenerNew()
116 delboy->endBacktrack = endBacktrack; in antlr3DebugListenerNew()
117 delboy->endResync = endResync; in antlr3DebugListenerNew()
118 delboy->enterAlt = enterAlt; in antlr3DebugListenerNew()
119 delboy->enterDecision = enterDecision; in antlr3DebugListenerNew()
120 delboy->enterRule = enterRule; in antlr3DebugListenerNew()
121 delboy->enterSubRule = enterSubRule; in antlr3DebugListenerNew()
122 delboy->exitDecision = exitDecision; in antlr3DebugListenerNew()
123 delboy->exitRule = exitRule; in antlr3DebugListenerNew()
124 delboy->exitSubRule = exitSubRule; in antlr3DebugListenerNew()
125 delboy->handshake = handshake; in antlr3DebugListenerNew()
126 delboy->location = location; in antlr3DebugListenerNew()
127 delboy->LT = LT; in antlr3DebugListenerNew()
128 delboy->LTT = LTT; in antlr3DebugListenerNew()
129 delboy->mark = mark; in antlr3DebugListenerNew()
130 delboy->nilNode = nilNode; in antlr3DebugListenerNew()
131 delboy->recognitionException = recognitionException; in antlr3DebugListenerNew()
132 delboy->rewind = rewindMark; in antlr3DebugListenerNew()
133 delboy->rewindLast = rewindLast; in antlr3DebugListenerNew()
134 delboy->semanticPredicate = semanticPredicate; in antlr3DebugListenerNew()
135 delboy->setTokenBoundaries = setTokenBoundaries; in antlr3DebugListenerNew()
136 delboy->terminate = terminate; in antlr3DebugListenerNew()
137 delboy->errorNode = errorNode; in antlr3DebugListenerNew()
139 delboy->PROTOCOL_VERSION = 2; // ANTLR 3.1 is at protocol version 2 in antlr3DebugListenerNew()
141 delboy->port = DEFAULT_DEBUGGER_PORT; in antlr3DebugListenerNew()
143 return delboy; in antlr3DebugListenerNew()
149 pANTLR3_DEBUG_EVENT_LISTENER delboy; in antlr3DebugListenerNewPort() local
151 delboy = antlr3DebugListenerNew(); in antlr3DebugListenerNewPort()
153 if (delboy != NULL) in antlr3DebugListenerNewPort()
155 delboy->port = port; in antlr3DebugListenerNewPort()
158 return delboy; in antlr3DebugListenerNewPort()
194 handshake (pANTLR3_DEBUG_EVENT_LISTENER delboy) in handshake() argument
220 if (delboy->initialized == ANTLR3_FALSE) in handshake()
260 server.sin_port = htons((unsigned short)delboy->port); in handshake()
287 delboy->socket = accept(serverSocket, (pANTLR3_SOCKADDRC)&client, &sockaddr_len); in handshake()
294 if (delboy->socket == -1) in handshake()
302 setsockopt(delboy->socket, SOL_SOCKET, TCP_NODELAY, (const void *)&optVal, sizeof(optVal)); in handshake()
310 sprintf (message, "ANTLR %d\n", delboy->PROTOCOL_VERSION); in handshake()
311 sockSend (delboy->socket, message, (int)strlen(message)); in handshake()
312 sprintf (message, "grammar \"%s\n", delboy->grammarFileName->chars); in handshake()
313 sockSend (delboy->socket, message, (int)strlen(message)); in handshake()
314 ack (delboy); in handshake()
316 delboy->initialized = ANTLR3_TRUE; in handshake()
323 transmit(pANTLR3_DEBUG_EVENT_LISTENER delboy, const char * ptr) in transmit() argument
325 sockSend(delboy->socket, ptr, (int)strlen(ptr)); in transmit()
326 ack(delboy); in transmit()
330 ack (pANTLR3_DEBUG_EVENT_LISTENER delboy) in ack() argument
343 rCount = recv(delboy->socket, &buffer, 1, 0); in ack()
418 serializeToken(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_COMMON_TOKEN t) in serializeToken() argument
422 if (delboy->tokenString == NULL) in serializeToken()
428delboy->tokenString = delboy->grammarFileName->factory->newSize(delboy->grammarFileName->factory, … in serializeToken()
433 delboy->tokenString->set(delboy->tokenString, (const char *)""); in serializeToken()
438 delboy->tokenString->addi(delboy->tokenString, (ANTLR3_INT32)(t->getTokenIndex(t))); in serializeToken()
439 delboy->tokenString->addc(delboy->tokenString, '\t'); in serializeToken()
440 delboy->tokenString->addi(delboy->tokenString, (ANTLR3_INT32)(t->getType(t))); in serializeToken()
441 delboy->tokenString->addc(delboy->tokenString, '\t'); in serializeToken()
442 delboy->tokenString->addi(delboy->tokenString, (ANTLR3_INT32)(t->getChannel(t))); in serializeToken()
443 delboy->tokenString->addc(delboy->tokenString, '\t'); in serializeToken()
444 delboy->tokenString->addi(delboy->tokenString, (ANTLR3_INT32)(t->getLine(t))); in serializeToken()
445 delboy->tokenString->addc(delboy->tokenString, '\t'); in serializeToken()
446 delboy->tokenString->addi(delboy->tokenString, (ANTLR3_INT32)(t->getCharPositionInLine(t))); in serializeToken()
450 serializeText(delboy->tokenString, t->getText(t)); in serializeToken()
457 return delboy->tokenString->toUTF8(delboy->tokenString); in serializeToken()
464 serializeNode(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE node) in serializeNode() argument
471 if (delboy->tokenString == NULL) in serializeNode()
477delboy->tokenString = delboy->grammarFileName->factory->newSize(delboy->grammarFileName->factory, … in serializeNode()
482 delboy->tokenString->set(delboy->tokenString, (const char *)""); in serializeNode()
488 return delboy->tokenString; in serializeNode()
494 delboy->tokenString->addc(delboy->tokenString, '\t'); in serializeNode()
498delboy->tokenString->addi(delboy->tokenString, delboy->adaptor->getUniqueID(delboy->adaptor, node)… in serializeNode()
499 delboy->tokenString->addc(delboy->tokenString, '\t'); in serializeNode()
503 delboy->tokenString->addi(delboy->tokenString, delboy->adaptor->getType(delboy->adaptor, node)); in serializeNode()
507 token = delboy->adaptor->getToken(delboy->adaptor, node); in serializeNode()
509 delboy->tokenString->addc(delboy->tokenString, '\t'); in serializeNode()
514 delboy->tokenString->addi(delboy->tokenString, (ANTLR3_INT32)(token->getLine(token))); in serializeNode()
515 delboy->tokenString->addc(delboy->tokenString, ' '); in serializeNode()
516delboy->tokenString->addi(delboy->tokenString, (ANTLR3_INT32)(token->getCharPositionInLine(token))… in serializeNode()
522 delboy->tokenString->addi(delboy->tokenString, -1); in serializeNode()
523 delboy->tokenString->addc(delboy->tokenString, '\t'); in serializeNode()
524 delboy->tokenString->addi(delboy->tokenString, -1); in serializeNode()
529 delboy->tokenString->addc(delboy->tokenString, '\t'); in serializeNode()
530delboy->tokenString->addi(delboy->tokenString, (ANTLR3_UINT32)(delboy->adaptor->getTokenStartIndex… in serializeNode()
534 serializeText(delboy->tokenString, delboy->adaptor->getText(delboy->adaptor, node)); in serializeNode()
541 return delboy->tokenString->toUTF8(delboy->tokenString); in serializeNode()
548 enterRule (pANTLR3_DEBUG_EVENT_LISTENER delboy, const char * grammarFileName, const char * ruleN… in enterRule() argument
555 transmit(delboy, buffer); in enterRule()
559 enterAlt (pANTLR3_DEBUG_EVENT_LISTENER delboy, int alt) in enterAlt() argument
566 transmit(delboy, buffer); in enterAlt()
570 exitRule (pANTLR3_DEBUG_EVENT_LISTENER delboy, const char * grammarFileName, const char * ruleNa… in exitRule() argument
577 transmit(delboy, buffer); in exitRule()
581 enterSubRule (pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber) in enterSubRule() argument
588 transmit(delboy, buffer); in enterSubRule()
592 exitSubRule (pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber) in exitSubRule() argument
599 transmit(delboy, buffer); in exitSubRule()
603 enterDecision (pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber) in enterDecision() argument
610 transmit(delboy, buffer); in enterDecision()
615 exitDecision (pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber) in exitDecision() argument
622 transmit(delboy, buffer); in exitDecision()
626 consumeToken (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_COMMON_TOKEN t) in consumeToken() argument
632 msg = serializeToken(delboy, t); in consumeToken()
642 transmit(delboy, (const char *)(msg->chars)); in consumeToken()
646 consumeHiddenToken (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_COMMON_TOKEN t) in consumeHiddenToken() argument
652 msg = serializeToken(delboy, t); in consumeHiddenToken()
662 transmit(delboy, (const char *)(msg->chars)); in consumeHiddenToken()
668 LT (pANTLR3_DEBUG_EVENT_LISTENER delboy, int i, pANTLR3_COMMON_TOKEN t) in LT() argument
676 msg = serializeToken(delboy, t); in LT()
691 transmit(delboy, (const char *)(msg->chars)); in LT()
696 mark (pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_MARKER marker) in mark() argument
704 transmit(delboy, buffer); in mark()
708 rewindMark (pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_MARKER marker) in rewindMark() argument
716 transmit(delboy, buffer); in rewindMark()
721 rewindLast (pANTLR3_DEBUG_EVENT_LISTENER delboy) in rewindLast() argument
723 transmit(delboy, (const char *)"rewind\n"); in rewindLast()
727 beginBacktrack (pANTLR3_DEBUG_EVENT_LISTENER delboy, int level) in beginBacktrack() argument
735 transmit(delboy, buffer); in beginBacktrack()
739 endBacktrack (pANTLR3_DEBUG_EVENT_LISTENER delboy, int level, ANTLR3_BOOLEAN successful) in endBacktrack() argument
747 transmit(delboy, buffer); in endBacktrack()
751 location (pANTLR3_DEBUG_EVENT_LISTENER delboy, int line, int pos) in location() argument
759 transmit(delboy, buffer); in location()
763 recognitionException (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_EXCEPTION e) in recognitionException() argument
771 transmit(delboy, buffer); in recognitionException()
775 beginResync (pANTLR3_DEBUG_EVENT_LISTENER delboy) in beginResync() argument
777 transmit(delboy, (const char *)"beginResync\n"); in beginResync()
781 endResync (pANTLR3_DEBUG_EVENT_LISTENER delboy) in endResync() argument
783 transmit(delboy, (const char *)"endResync\n"); in endResync()
787 semanticPredicate (pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_BOOLEAN result, const char * predic… in semanticPredicate() argument
840 transmit(delboy, (const char *)buffer); in semanticPredicate()
850 commence (pANTLR3_DEBUG_EVENT_LISTENER delboy) in commence() argument
861 terminate (pANTLR3_DEBUG_EVENT_LISTENER delboy) in terminate() argument
865 sockSend(delboy->socket, "terminate\n", 10); // Send out the command in terminate()
872 consumeNode (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t) in consumeNode() argument
876 buffer = serializeNode (delboy, t); in consumeNode()
885 transmit (delboy, (const char *)(delboy->tokenString->toUTF8(delboy->tokenString)->chars)); in consumeNode()
889 LTT (pANTLR3_DEBUG_EVENT_LISTENER delboy, int i, pANTLR3_BASE_TREE t) in LTT() argument
893 buffer = serializeNode (delboy, t); in LTT()
904 transmit (delboy, (const char *)(delboy->tokenString->toUTF8(delboy->tokenString)->chars)); in LTT()
908 nilNode (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t) in nilNode() argument
911 sprintf(buffer, "nilNode\t%d\n", delboy->adaptor->getUniqueID(delboy->adaptor, t)); in nilNode()
912 transmit(delboy, buffer); in nilNode()
916 createNode (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t) in createNode() argument
920 if (delboy->tokenString == NULL) in createNode()
926delboy->tokenString = delboy->grammarFileName->factory->newSize(delboy->grammarFileName->factory, … in createNode()
931 delboy->tokenString->set8(delboy->tokenString, (const char *)"createNodeFromTokenElements "); in createNode()
938 delboy->tokenString->addi(delboy->tokenString, delboy->adaptor->getUniqueID(delboy->adaptor, t)); in createNode()
939 delboy->tokenString->addc(delboy->tokenString, '\t'); in createNode()
943 delboy->tokenString->addi(delboy->tokenString, delboy->adaptor->getType(delboy->adaptor, t)); in createNode()
947 serializeText(delboy->tokenString, delboy->adaptor->getText(delboy->adaptor, t)); in createNode()
948 delboy->tokenString->addc(delboy->tokenString, '\n'); in createNode()
955 transmit(delboy, (const char *)(delboy->tokenString->toUTF8(delboy->tokenString)->chars)); in createNode()
959 errorNode (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t) in errorNode() argument
963 if (delboy->tokenString == NULL) in errorNode()
969delboy->tokenString = delboy->grammarFileName->factory->newSize(delboy->grammarFileName->factory, … in errorNode()
974 delboy->tokenString->set8(delboy->tokenString, (const char *)"errorNode\t"); in errorNode()
981 delboy->tokenString->addi(delboy->tokenString, delboy->adaptor->getUniqueID(delboy->adaptor, t)); in errorNode()
982 delboy->tokenString->addc(delboy->tokenString, '\t'); in errorNode()
986 delboy->tokenString->addi(delboy->tokenString, ANTLR3_TOKEN_INVALID); in errorNode()
990 serializeText(delboy->tokenString, delboy->adaptor->getText(delboy->adaptor, t)); in errorNode()
991 delboy->tokenString->addc(delboy->tokenString, '\n'); in errorNode()
998 transmit(delboy, (const char *)(delboy->tokenString->toUTF8(delboy->tokenString)->chars)); in errorNode()
1003 createNodeTok (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE node, pANTLR3_COMMON_TOKEN … in createNodeTok() argument
1007 …sprintf(buffer, "createNode\t%d\t%d\n", delboy->adaptor->getUniqueID(delboy->adaptor, node), (ANTL… in createNodeTok()
1009 transmit(delboy, buffer); in createNodeTok()
1013 becomeRoot (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE newRoot, pANTLR3_BASE_TREE ol… in becomeRoot() argument
1017 sprintf(buffer, "becomeRoot\t%d\t%d\n", delboy->adaptor->getUniqueID(delboy->adaptor, newRoot), in becomeRoot()
1018 delboy->adaptor->getUniqueID(delboy->adaptor, oldRoot) in becomeRoot()
1020 transmit(delboy, buffer); in becomeRoot()
1025 addChild (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE root, pANTLR3_BASE_TREE child) in addChild() argument
1029 sprintf(buffer, "addChild\t%d\t%d\n", delboy->adaptor->getUniqueID(delboy->adaptor, root), in addChild()
1030 delboy->adaptor->getUniqueID(delboy->adaptor, child) in addChild()
1032 transmit(delboy, buffer); in addChild()
1036 setTokenBoundaries (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t, ANTLR3_MARKER tokenS… in setTokenBoundaries() argument
1040 sprintf(buffer, "becomeRoot\t%d\t%d\t%d\n", delboy->adaptor->getUniqueID(delboy->adaptor, t), in setTokenBoundaries()
1044 transmit(delboy, buffer); in setTokenBoundaries()