Skip to content

Instantly share code, notes, and snippets.

View datacompboy's full-sized avatar

Anton Fedorov datacompboy

View GitHub Profile
@datacompboy
datacompboy / javacc_stack_limit.patch
Created February 6, 2015 10:48
JavaCC 6 maximum recursion limit
diff --git a/javacc/classes/templates/cpp/Node.h.template b/javacc/classes/templates/cpp/Node.h.template
index 5596567..4180b7f 100644
--- a/javacc/classes/templates/cpp/Node.h.template
+++ b/javacc/classes/templates/cpp/Node.h.template
@@ -48,6 +48,17 @@ class Node {
/** Accept the visitor. **/
public: virtual ${VISITOR_RETURN_TYPE:-void} jjtAccept(${PARSER_NAME}Visitor *visitor, ${VISITOR_DATA_TYPE:-void *} data) const = 0;
#fi
+
+ /** Clear list of children, and return children that we have before.
import SocketServer
class MyTCPHandler(SocketServer.BaseRequestHandler):
def handle(self):
self.data = self.request.recv(1500).strip()
print 1, self.data
self.request.sendall("Session: aaaa\r\n\r\n")
self.data = self.request.recv(1500).strip()
print 2, self.data
self.request.sendall(self.data)