[MLton] mllex fails when actions include unbalanced parentheses

Michael Norrish Michael Norrish <Michael.Norrish@nicta.com.au>
Thu, 21 Jul 2005 17:05:27 +1000


--bAdg7Ng5Ua
Content-Type: text/plain; charset=us-ascii
Content-Description: message body text
Content-Transfer-Encoding: 7bit

I think the attached is a correct patch for this problem.  (Copying
from an SML/NJ mllex.)

Michael.


--bAdg7Ng5Ua
Content-Type: application/octet-stream
Content-Description: patch for lexgen.sml
Content-Disposition: attachment;
	filename="foo"
Content-Transfer-Encoding: base64

QEAgLTYyMiwxNSArNjA5LDM0IEBACiAgICAgICAgaW4gTmV4dFRvayA6PSBtYWtlVG9rKCkKICAg
ICAgICBlbmQKICAgICAgICB8IDIgPT4gTmV4dFRvayA6PQotICAgICAgICAgICAgKGNhc2Ugc2tp
cHdzKCkKLSAgICAgICAgICAgICAgICBvZiAjIigiID0+IGxldAotICAgICAgICAgICAgICAgICAg
ICAgICBmdW4gR2V0QWN0IChscGN0LHgpID0gKGNhc2UgZ2V0Y2goIUxleEJ1ZikKLSAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgIG9mICMiKCIgPT4gR2V0QWN0IChscGN0KzEsICMiKCI6Ongp
Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAjIikiID0+IGlmIGxwY3QgPSAwIHRo
ZW4gKGltcGxvZGUgKHJldiB4KSkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgZWxzZSBHZXRBY3QobHBjdC0xLCAjIikiOjoKeCkKLSAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICB8IHkgPT4gR2V0QWN0KGxwY3QseTo6eCkKLSAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgKCogZW5kIGNhc2UgKikpCi0gICAgICAgICAgICAgICAgICAg
ICAgIGluIEFDVElPTiAoR2V0QWN0ICgwLG5pbCkpCisgICAgICAgICAgICAgICAoY2FzZSBza2lw
d3MoKSBvZgorICAgICAgICAgICAgICAgICAgIyIoIiA9PgorICAgICAgICAgICAgICAgICAgbGV0
CisgICAgICAgICAgICAgICAgICAgIGZ1biBsb29wX3RvX2VuZCAoYmFja3NsYXNoLCB4KSA9Cisg
ICAgICAgICAgICAgICAgICAgICAgbGV0CisgICAgICAgICAgICAgICAgICAgICAgICB2YWwgYyAg
ICA9IGdldGNoICghIExleEJ1ZikKKyAgICAgICAgICAgICAgICAgICAgICAgIHZhbCBub3RiID0g
bm90IGJhY2tzbGFzaAorICAgICAgICAgICAgICAgICAgICAgICAgdmFsIG5zdHIgPSBjIDo6IHgK
KyAgICAgICAgICAgICAgICAgICAgICBpbgorICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBj
IG9mCisgICAgICAgICAgICAgICAgICAgICAgICAgICMiXCIiID0+IGlmIG5vdGIgdGhlbiBuc3Ry
CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgbG9vcF90b19lbmQgKGZh
bHNlLCBuc3RyKQorICAgICAgICAgICAgICAgICAgICAgICAgfCBfID0+IGxvb3BfdG9fZW5kIChj
ID0gIyJcXCIgYW5kYWxzbyBub3RiLCBuc3RyKQorICAgICAgICAgICAgICAgICAgICAgIGVuZAor
ICAgICAgICAgICAgICAgICAgICBmdW4gR2V0QWN0IChscGN0LCB4KSA9CisgICAgICAgICAgICAg
ICAgICAgICAgbGV0CisgICAgICAgICAgICAgICAgICAgICAgICB2YWwgYyAgICA9IGdldGNoICgh
IExleEJ1ZikKKyAgICAgICAgICAgICAgICAgICAgICAgIHZhbCBuc3RyID0gYyA6OiB4CisgICAg
ICAgICAgICAgICAgICAgICAgaW4KKyAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgYyBvZgor
ICAgICAgICAgICAgICAgICAgICAgICAgICAjIlwiIiA9PiBHZXRBY3QgKGxwY3QsIGxvb3BfdG9f
ZW5kIChmYWxzZSwgbnN0cikpCisgICAgICAgICAgICAgICAgICAgICAgICB8ICMiKCIgPT4gR2V0
QWN0IChscGN0ICsgMSwgbnN0cikKKyAgICAgICAgICAgICAgICAgICAgICAgIHwgIyIpIiA9PiBp
ZiBscGN0ID0gMCB0aGVuIGltcGxvZGUgKHJldiB4KQorICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgIGVsc2UgR2V0QWN0KGxwY3QgLSAxLCBuc3RyKQorICAgICAgICAgICAgICAgICAg
ICAgICAgfCBfID0+IEdldEFjdChscGN0LCBuc3RyKQorICAgICAgICAgICAgICAgICAgICAgIGVu
ZAorICAgICAgICAgICAgICAgICAgaW4KKyAgICAgICAgICAgICAgICAgICAgQUNUSU9OIChHZXRB
Y3QgKDAsbmlsKSkKICAgICAgICAgICAgICAgICAgICAgICAgZW5kCiAgICAgICAgICAgICAgICAg
fCAjIjsiID0+IFNFTUkKICAgICAgICAgICAgICAgICB8IGMgPT4gKHByU3luRXJyICgiaW52YWxp
ZCBjaGFyYWN0ZXIgIiBeIFN0cmluZy5zdHIgYykpKQo=
--bAdg7Ng5Ua--