Diff

tools/erlparse.lua @ 2947:ff7f6668b34f

tools/erlparse: Discard erlang PIDs instead of choking on them as a syntax error
author Matthew Wild <mwild1@gmail.com>
date Thu, 25 Mar 2010 19:34:41 +0000
parent 2946:ad306c5ae689
child 5079:2ab99e239d45
line wrap: on
line diff
--- a/tools/erlparse.lua	Thu Mar 25 19:34:05 2010 +0000
+++ b/tools/erlparse.lua	Thu Mar 25 19:34:41 2010 +0000
@@ -121,6 +121,12 @@
 end
 local function readBinary()
 	read("<"); -- read <
+	-- Discard PIDs
+	if isNumeric(peek()) then
+		while peek() ~= ">" do read(); end
+		read(">");
+		return {};
+	end
 	local t = readTuple();
 	read(">") -- read >
 	local ch = peek();