tools/erlparse: Discard erlang PIDs instead of choking on them as a syntax error

Thu, 25 Mar 2010 19:34:41 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 25 Mar 2010 19:34:41 +0000
changeset 2947
ff7f6668b34f
parent 2946
ad306c5ae689
child 2948
1ac5ef6ce1a0
child 2951
294c359a05f5
child 2952
5069534f7f36

tools/erlparse: Discard erlang PIDs instead of choking on them as a syntax error

tools/erlparse.lua file | annotate | diff | comparison | revisions
--- 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();

mercurial