Mon Jun 24 08:18:31 2024
EVENTS
 FREE
SOFTWARE
INSTITUTE

POLITICS
JOBS
MEMBERS'
CORNER

MAILING
LIST

NYLXS Mailing Lists and Archives
NYLXS Members have a lot to say and share but we don't keep many secrets. Join the Hangout Mailing List and say your peice.

DATE 2016-04-01

HANGOUT

2024-06-24 | 2024-05-24 | 2024-04-24 | 2024-03-24 | 2024-02-24 | 2024-01-24 | 2023-12-24 | 2023-11-24 | 2023-10-24 | 2023-09-24 | 2023-08-24 | 2023-07-24 | 2023-06-24 | 2023-05-24 | 2023-04-24 | 2023-03-24 | 2023-02-24 | 2023-01-24 | 2022-12-24 | 2022-11-24 | 2022-10-24 | 2022-09-24 | 2022-08-24 | 2022-07-24 | 2022-06-24 | 2022-05-24 | 2022-04-24 | 2022-03-24 | 2022-02-24 | 2022-01-24 | 2021-12-24 | 2021-11-24 | 2021-10-24 | 2021-09-24 | 2021-08-24 | 2021-07-24 | 2021-06-24 | 2021-05-24 | 2021-04-24 | 2021-03-24 | 2021-02-24 | 2021-01-24 | 2020-12-24 | 2020-11-24 | 2020-10-24 | 2020-09-24 | 2020-08-24 | 2020-07-24 | 2020-06-24 | 2020-05-24 | 2020-04-24 | 2020-03-24 | 2020-02-24 | 2020-01-24 | 2019-12-24 | 2019-11-24 | 2019-10-24 | 2019-09-24 | 2019-08-24 | 2019-07-24 | 2019-06-24 | 2019-05-24 | 2019-04-24 | 2019-03-24 | 2019-02-24 | 2019-01-24 | 2018-12-24 | 2018-11-24 | 2018-10-24 | 2018-09-24 | 2018-08-24 | 2018-07-24 | 2018-06-24 | 2018-05-24 | 2018-04-24 | 2018-03-24 | 2018-02-24 | 2018-01-24 | 2017-12-24 | 2017-11-24 | 2017-10-24 | 2017-09-24 | 2017-08-24 | 2017-07-24 | 2017-06-24 | 2017-05-24 | 2017-04-24 | 2017-03-24 | 2017-02-24 | 2017-01-24 | 2016-12-24 | 2016-11-24 | 2016-10-24 | 2016-09-24 | 2016-08-24 | 2016-07-24 | 2016-06-24 | 2016-05-24 | 2016-04-24 | 2016-03-24 | 2016-02-24 | 2016-01-24 | 2015-12-24 | 2015-11-24 | 2015-10-24 | 2015-09-24 | 2015-08-24 | 2015-07-24 | 2015-06-24 | 2015-05-24 | 2015-04-24 | 2015-03-24 | 2015-02-24 | 2015-01-24 | 2014-12-24 | 2014-11-24 | 2014-10-24 | 2014-09-24 | 2014-08-24 | 2014-07-24 | 2014-06-24 | 2014-05-24 | 2014-04-24 | 2014-03-24 | 2014-02-24 | 2014-01-24 | 2013-12-24 | 2013-11-24 | 2013-10-24 | 2013-09-24 | 2013-08-24 | 2013-07-24 | 2013-06-24 | 2013-05-24 | 2013-04-24 | 2013-03-24 | 2013-02-24 | 2013-01-24 | 2012-12-24 | 2012-11-24 | 2012-10-24 | 2012-09-24 | 2012-08-24 | 2012-07-24 | 2012-06-24 | 2012-05-24 | 2012-04-24 | 2012-03-24 | 2012-02-24 | 2012-01-24 | 2011-12-24 | 2011-11-24 | 2011-10-24 | 2011-09-24 | 2011-08-24 | 2011-07-24 | 2011-06-24 | 2011-05-24 | 2011-04-24 | 2011-03-24 | 2011-02-24 | 2011-01-24 | 2010-12-24 | 2010-11-24 | 2010-10-24 | 2010-09-24 | 2010-08-24 | 2010-07-24 | 2010-06-24 | 2010-05-24 | 2010-04-24 | 2010-03-24 | 2010-02-24 | 2010-01-24 | 2009-12-24 | 2009-11-24 | 2009-10-24 | 2009-09-24 | 2009-08-24 | 2009-07-24 | 2009-06-24 | 2009-05-24 | 2009-04-24 | 2009-03-24 | 2009-02-24 | 2009-01-24 | 2008-12-24 | 2008-11-24 | 2008-10-24 | 2008-09-24 | 2008-08-24 | 2008-07-24 | 2008-06-24 | 2008-05-24 | 2008-04-24 | 2008-03-24 | 2008-02-24 | 2008-01-24 | 2007-12-24 | 2007-11-24 | 2007-10-24 | 2007-09-24 | 2007-08-24 | 2007-07-24 | 2007-06-24 | 2007-05-24 | 2007-04-24 | 2007-03-24 | 2007-02-24 | 2007-01-24 | 2006-12-24 | 2006-11-24 | 2006-10-24 | 2006-09-24 | 2006-08-24 | 2006-07-24 | 2006-06-24 | 2006-05-24 | 2006-04-24 | 2006-03-24 | 2006-02-24 | 2006-01-24 | 2005-12-24 | 2005-11-24 | 2005-10-24 | 2005-09-24 | 2005-08-24 | 2005-07-24 | 2005-06-24 | 2005-05-24 | 2005-04-24 | 2005-03-24 | 2005-02-24 | 2005-01-24 | 2004-12-24 | 2004-11-24 | 2004-10-24 | 2004-09-24 | 2004-08-24 | 2004-07-24 | 2004-06-24 | 2004-05-24 | 2004-04-24 | 2004-03-24 | 2004-02-24 | 2004-01-24 | 2003-12-24 | 2003-11-24 | 2003-10-24 | 2003-09-24 | 2003-08-24 | 2003-07-24 | 2003-06-24 | 2003-05-24 | 2003-04-24 | 2003-03-24 | 2003-02-24 | 2003-01-24 | 2002-12-24 | 2002-11-24 | 2002-10-24 | 2002-09-24 | 2002-08-24 | 2002-07-24 | 2002-06-24 | 2002-05-24 | 2002-04-24 | 2002-03-24 | 2002-02-24 | 2002-01-24 | 2001-12-24 | 2001-11-24 | 2001-10-24 | 2001-09-24 | 2001-08-24 | 2001-07-24 | 2001-06-24 | 2001-05-24 | 2001-04-24 | 2001-03-24 | 2001-02-24 | 2001-01-24 | 2000-12-24 | 2000-11-24 | 2000-10-24 | 2000-09-24 | 2000-08-24 | 2000-07-24 | 2000-06-24 | 2000-05-24 | 2000-04-24 | 2000-03-24 | 2000-02-24 | 2000-01-24 | 1999-12-24

Key: Value:

Key: Value:

MESSAGE
DATE 2016-04-26
FROM Christopher League
SUBJECT Re: [Hangout-NYLXS] heart burn
From hangout-bounces-at-nylxs.com Wed Apr 27 00:07:50 2016
Return-Path:
X-Original-To: archive-at-mrbrklyn.com
Delivered-To: archive-at-mrbrklyn.com
Received: from www.mrbrklyn.com (www.mrbrklyn.com [96.57.23.82])
by mrbrklyn.com (Postfix) with ESMTP id 434D7163D48;
Wed, 27 Apr 2016 00:07:50 -0400 (EDT)
X-Original-To: hangout-at-nylxs.com
Delivered-To: hangout-at-nylxs.com
Received: by mrbrklyn.com (Postfix, from userid 1000)
id 53C2F162A0A; Wed, 27 Apr 2016 00:06:55 -0400 (EDT)
Resent-From: Ruben Safir
Resent-Date: Wed, 27 Apr 2016 00:06:55 -0400
Resent-Message-ID: <20160427040655.GC1115-at-www.mrbrklyn.com>
Resent-To: hangout-at-nylxs.com
X-Original-To: ruben-at-mrbrklyn.com
Delivered-To: ruben-at-mrbrklyn.com
Received: from B-EXH-EDGE1.liunet.edu (b-edge1.smtp.liu.edu [148.4.248.206])
by mrbrklyn.com (Postfix) with ESMTP id 3FBE9161224
for ; Tue, 26 Apr 2016 09:59:20 -0400 (EDT)
Received: from B-EXH-3.liunet.edu (148.4.250.212) by B-EXH-EDGE1.liunet.edu
(148.4.248.206) with Microsoft SMTP Server (TLS) id 14.3.210.2; Tue, 26 Apr
2016 09:59:14 -0400
Received: from localhost (96.250.202.133) by B-EXH-3.liunet.edu
(148.4.250.212) with Microsoft SMTP Server (TLS) id 15.0.1156.6; Tue, 26 Apr
2016 09:59:19 -0400
From: Christopher League
To: Ruben Safir
In-Reply-To: <571EFDE3.3090603-at-mrbrklyn.com>
References: <571EFDE3.3090603-at-mrbrklyn.com>
User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1
(x86_64-unknown-linux-gnu)
Date: Tue, 26 Apr 2016 09:59:17 -0400
Message-ID: <878u00qxmy.fsf-at-lydrik.home.lan>
MIME-Version: 1.0
X-Originating-IP: [96.250.202.133]
X-ClientProxiedBy: U-EXH-CAS.liunet.edu (148.4.184.26) To B-EXH-3.liunet.edu
(148.4.250.212)
X-Content-Filtered-By: Mailman/MimeDel 2.1.17
Subject: Re: [Hangout-NYLXS] heart burn
X-BeenThere: hangout-at-nylxs.com
X-Mailman-Version: 2.1.17
Precedence: list
Reply-To: NYLXS Discussions List
List-Id: NYLXS Discussions List
List-Unsubscribe: ,

List-Archive:
List-Post:
List-Help:
List-Subscribe: ,

Content-Type: multipart/mixed; boundary="===============1496153992=="
Errors-To: hangout-bounces-at-nylxs.com
Sender: "hangout"

--===============1496153992==
Content-Type: multipart/signed; boundary="===-=-="; micalg=pgp-sha256;
protocol="application/pgp-signature"

--===-=-=
Content-Type: multipart/alternative; boundary="==-=-="

--==-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable


I feel like the comment summarizes what TestTypeChecker is meant to do:

// All the files in `test/bad/` should parse correctly, but contain typ=
e errors.
// All the files in `tests/good/` should parse correctly, with no type =
errors.

Each test file should print out whatever your TypeChecker prints out, in
terms of tracing or error messages, but otherwise it just relies on the
counter to be accurate:

chk.parseErrors

counts the number of errors reported by the lexer or parser. It gets
incremented by the `syntaxError` method in `TypeChecker`, which would
get called by ANTLR each time it reports an error because we do

parser.addErrorListener(this);

The other counter, over which you have more control, is:

chk.visitor.errors

So that is defined in `TypeCheckingVisitor`. So you should increment it
whenever you report a type error. In the given code, that is done in the
`error()` method, which is called by `typeMismatch()`, `checkNumArgs()`
and perhaps a few other places.

There isn't really an expected output vs an actual output of the type
checker, it only comes down to what those two counters say:

- All the files in `test/bad/` should parse correctly
(`chk.parseErrors=3D=3D0`) but contain type errors (`chk.visitor.errors=
>0`).

- All the files in `tests/good/` should parse correctly
(`chk.parseErrors=3D=3D0`), with no type errors
(`chk.visitor.errors=3D=3D0`).

Your `gradle run` should output lines like these, right?

**** PASS **** good/105-var-reassign.txt **** syntax=3D0, type=3D0
**** FAIL **** good/106-var-reassign-coerce.txt **** syntax=3D0, type=
=3D1
**** PASS **** good/110-if-lt.txt **** syntax=3D0, type=3D0

Anything *in between* those lines is the output of your type checker
itself, whether error messages about type mismatches, or debugging
output, for which I used the `trace()` method.

CL

Ruben Safir writes:

> import org.antlr.v4.runtime.ANTLRFileStream;
>
>
> Please Tell me what you expect this to do. What I need to know is what
> you expected to happen and what happened so I can fix it.
>
>
>
>
> import java.io.File;
> import java.io.IOException;
> import java.util.Arrays;
>
> // All the files in `test/bad/` should parse correctly, but contain type
> errors.
> // All the files in `tests/good/` should parse correctly, with no type
> errors.
> public class TestTypeChecker {
>
> static int numTests =3D 0;
> static int numPass =3D 0;
>
> public static void main(String[] args) throws IOException {
> testInDir("tests/bad", false);
> testInDir("tests/good", true);
> System.err.printf("\nPassed %d/%d tests.\n\n", numPass, numTests);
> }
>
> private static void testInDir(String dir, boolean good) throws
> IOException {
> String[] fileList =3D new File(dir).list();
> Arrays.sort(fileList);
> for(String name : fileList) {
> TypeChecker chk =3D new TypeChecker(new ANTLRFileStream(
> dir + File.separator + name));
> boolean pass;
> if(good) {
> pass =3D chk.parseErrors =3D=3D 0 && chk.visitor.errors =
=3D=3D 0;
> }
> else {
> pass =3D chk.parseErrors =3D=3D 0 && chk.visitor.errors >=
0;
> }
> System.err.printf("**** %s **** %s/%s **** syntax=3D%d,
> type=3D%d\n\n",
> pass? "PASS" : "FAIL",
> good? "good" : "bad",
> name,
> chk.parseErrors,
> chk.visitor.errors
> );
> numTests++;
> if(pass) numPass++;
> }
> }
>
>
> }
> --=20
> So many immigrant groups have swept through our town
> that Brooklyn, like Atlantis, reaches mythological
> proportions in the mind of the world - RI Safir 1998
> http://www.mrbrklyn.com
>
> DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
> http://www.nylxs.com - Leadership Development in Free Software
> http://www2.mrbrklyn.com/resources - Unpublished Archive
> http://www.coinhangout.com - coins!
> http://www.brooklyn-living.com
>
> Being so tracked is for FARM ANIMALS and and extermination camps,
> but incompatible with living as a free human being. -RI Safir 2013

--==-=-=
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"


I feel like the comment summarizes what TestTypeChecker is meant to do:
// All the files in `test/bad/` should parse correctly, but contain type errors.
// All the files in `tests/good/` should parse correctly, with no type errors.

Each test file should print out whatever your TypeChecker prints out,
in terms of tracing or error messages, but otherwise it just relies on
the counter to be accurate:
chk.parseErrors

counts the number of errors reported by the lexer or parser. It gets
incremented by the syntaxError method in TypeChecker, which would get
called by ANTLR each time it reports an error because we do
parser.addErrorListener(this);

The other counter, over which you have more control, is:
chk.visitor.errors

So that is defined in TypeCheckingVisitor. So you should increment it
whenever you report a type error. In the given code, that is done in
the error() method, which is called by typeMismatch(), checkNumArgs()
and perhaps a few other places.

There isn't really an expected output vs an actual output of the type
checker, it only comes down to what those two counters say:
* All the files in test/bad/ should parse correctly
(chk.parseErrors==0) but contain type errors
(chk.visitor.errors>0).
* All the files in tests/good/ should parse correctly
(chk.parseErrors==0), with no type errors (chk.visitor.errors==0).

Your gradle run should output lines like these, right?
**** PASS **** good/105-var-reassign.txt **** syntax=0, type=0
**** FAIL **** good/106-var-reassign-coerce.txt **** syntax=0, type=1
**** PASS **** good/110-if-lt.txt **** syntax=0, type=0

Anything in between those lines is the output of your type checker
itself, whether error messages about type mismatches, or debugging
output, for which I used the trace() method.

CL

Ruben Safir [1]ruben-at-mrbrklyn.com writes:

import org.antlr.v4.runtime.ANTLRFileStream;

Please Tell me what you expect this to do. What I need to know is
what you expected to happen and what happened so I can fix it.

import java.io.File; import java.io.IOException; import
java.util.Arrays;

// All the files in test/bad/ should parse correctly, but contain
type errors. // All the files in tests/good/ should parse correctly,
with no type errors. public class TestTypeChecker {
static int numTests = 0;
static int numPass = 0;

public static void main(String[] args) throws IOException {
testInDir("tests/bad", false);
testInDir("tests/good", true);
System.err.printf("\nPassed %d/%d tests.\n\n", numPass, numTests);
}

private static void testInDir(String dir, boolean good) throws

IOException { String[] fileList = new File(dir).list();
Arrays.sort(fileList); for(String name : fileList) { TypeChecker chk
= new TypeChecker(new ANTLRFileStream( dir + File.separator +
name)); boolean pass; if(good) { pass = chk.parseErrors == 0 &&
chk.visitor.errors == 0; } else { pass = chk.parseErrors == 0 &&
chk.visitor.errors > 0; } System.err.printf("**** %s **** %s/%s ****
syntax=%d, type=%d", pass? "PASS" : "FAIL", good? "good" : "bad",
name, chk.parseErrors, chk.visitor.errors ); numTests++; if(pass)
numPass++; } }

}

So many immigrant groups have swept through our town that Brooklyn,
like Atlantis, reaches mythological proportions in the mind of the
world - RI Safir 1998 http://www.mrbrklyn.com

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive
http://www.coinhangout.com - coins! http://www.brooklyn-living.com

Being so tracked is for FARM ANIMALS and and extermination camps,
but incompatible with living as a free human being. -RI Safir 2013

References

1. mailto:ruben-at-mrbrklyn.com

--==-=-=--

--===-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJXH3Q1AAoJEGuLsz1PMbCLHmsH/i825nnQxL/d5o6hEKtqEPRv
dc6IrjU3sVSk1nyc95YBsTkc1jnXuJkfbOGCE/dcdUHtG396LHGh6mxFFPU60eGu
xQhjp96bpkDHLvKyCuSpHyyaTBH1+SFZdx6/j+SVLeFudRmNLBl+J7PW7a4QSOzf
2Joqecx7wbNG5tZ2uyQAGbWK+TFfo1R2g1afb49DqptCBIZPBtNUufkrDCwyWsTu
Jd7mPc503QGp56ds972MvBI5QYCBY5ydTO/tXgvCZqJ/laz0cy8i1U5eHqzZ81J7
utxMnHmziIAuj2Oy0LlNZfXLqED2d/xbSRwQVNJ+a7F07IH8U7RFlxRZ1Yteurw=
=50dc
-----END PGP SIGNATURE-----
--===-=-=--

--===============1496153992==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
hangout mailing list
hangout-at-nylxs.com
http://www.nylxs.com/
--===============1496153992==--

--===============1496153992==
Content-Type: multipart/signed; boundary="===-=-="; micalg=pgp-sha256;
protocol="application/pgp-signature"

--===-=-=
Content-Type: multipart/alternative; boundary="==-=-="

--==-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable


I feel like the comment summarizes what TestTypeChecker is meant to do:

// All the files in `test/bad/` should parse correctly, but contain typ=
e errors.
// All the files in `tests/good/` should parse correctly, with no type =
errors.

Each test file should print out whatever your TypeChecker prints out, in
terms of tracing or error messages, but otherwise it just relies on the
counter to be accurate:

chk.parseErrors

counts the number of errors reported by the lexer or parser. It gets
incremented by the `syntaxError` method in `TypeChecker`, which would
get called by ANTLR each time it reports an error because we do

parser.addErrorListener(this);

The other counter, over which you have more control, is:

chk.visitor.errors

So that is defined in `TypeCheckingVisitor`. So you should increment it
whenever you report a type error. In the given code, that is done in the
`error()` method, which is called by `typeMismatch()`, `checkNumArgs()`
and perhaps a few other places.

There isn't really an expected output vs an actual output of the type
checker, it only comes down to what those two counters say:

- All the files in `test/bad/` should parse correctly
(`chk.parseErrors=3D=3D0`) but contain type errors (`chk.visitor.errors=
>0`).

- All the files in `tests/good/` should parse correctly
(`chk.parseErrors=3D=3D0`), with no type errors
(`chk.visitor.errors=3D=3D0`).

Your `gradle run` should output lines like these, right?

**** PASS **** good/105-var-reassign.txt **** syntax=3D0, type=3D0
**** FAIL **** good/106-var-reassign-coerce.txt **** syntax=3D0, type=
=3D1
**** PASS **** good/110-if-lt.txt **** syntax=3D0, type=3D0

Anything *in between* those lines is the output of your type checker
itself, whether error messages about type mismatches, or debugging
output, for which I used the `trace()` method.

CL

Ruben Safir writes:

> import org.antlr.v4.runtime.ANTLRFileStream;
>
>
> Please Tell me what you expect this to do. What I need to know is what
> you expected to happen and what happened so I can fix it.
>
>
>
>
> import java.io.File;
> import java.io.IOException;
> import java.util.Arrays;
>
> // All the files in `test/bad/` should parse correctly, but contain type
> errors.
> // All the files in `tests/good/` should parse correctly, with no type
> errors.
> public class TestTypeChecker {
>
> static int numTests =3D 0;
> static int numPass =3D 0;
>
> public static void main(String[] args) throws IOException {
> testInDir("tests/bad", false);
> testInDir("tests/good", true);
> System.err.printf("\nPassed %d/%d tests.\n\n", numPass, numTests);
> }
>
> private static void testInDir(String dir, boolean good) throws
> IOException {
> String[] fileList =3D new File(dir).list();
> Arrays.sort(fileList);
> for(String name : fileList) {
> TypeChecker chk =3D new TypeChecker(new ANTLRFileStream(
> dir + File.separator + name));
> boolean pass;
> if(good) {
> pass =3D chk.parseErrors =3D=3D 0 && chk.visitor.errors =
=3D=3D 0;
> }
> else {
> pass =3D chk.parseErrors =3D=3D 0 && chk.visitor.errors >=
0;
> }
> System.err.printf("**** %s **** %s/%s **** syntax=3D%d,
> type=3D%d\n\n",
> pass? "PASS" : "FAIL",
> good? "good" : "bad",
> name,
> chk.parseErrors,
> chk.visitor.errors
> );
> numTests++;
> if(pass) numPass++;
> }
> }
>
>
> }
> --=20
> So many immigrant groups have swept through our town
> that Brooklyn, like Atlantis, reaches mythological
> proportions in the mind of the world - RI Safir 1998
> http://www.mrbrklyn.com
>
> DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
> http://www.nylxs.com - Leadership Development in Free Software
> http://www2.mrbrklyn.com/resources - Unpublished Archive
> http://www.coinhangout.com - coins!
> http://www.brooklyn-living.com
>
> Being so tracked is for FARM ANIMALS and and extermination camps,
> but incompatible with living as a free human being. -RI Safir 2013

--==-=-=
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"


I feel like the comment summarizes what TestTypeChecker is meant to do:
// All the files in `test/bad/` should parse correctly, but contain type errors.
// All the files in `tests/good/` should parse correctly, with no type errors.

Each test file should print out whatever your TypeChecker prints out,
in terms of tracing or error messages, but otherwise it just relies on
the counter to be accurate:
chk.parseErrors

counts the number of errors reported by the lexer or parser. It gets
incremented by the syntaxError method in TypeChecker, which would get
called by ANTLR each time it reports an error because we do
parser.addErrorListener(this);

The other counter, over which you have more control, is:
chk.visitor.errors

So that is defined in TypeCheckingVisitor. So you should increment it
whenever you report a type error. In the given code, that is done in
the error() method, which is called by typeMismatch(), checkNumArgs()
and perhaps a few other places.

There isn't really an expected output vs an actual output of the type
checker, it only comes down to what those two counters say:
* All the files in test/bad/ should parse correctly
(chk.parseErrors==0) but contain type errors
(chk.visitor.errors>0).
* All the files in tests/good/ should parse correctly
(chk.parseErrors==0), with no type errors (chk.visitor.errors==0).

Your gradle run should output lines like these, right?
**** PASS **** good/105-var-reassign.txt **** syntax=0, type=0
**** FAIL **** good/106-var-reassign-coerce.txt **** syntax=0, type=1
**** PASS **** good/110-if-lt.txt **** syntax=0, type=0

Anything in between those lines is the output of your type checker
itself, whether error messages about type mismatches, or debugging
output, for which I used the trace() method.

CL

Ruben Safir [1]ruben-at-mrbrklyn.com writes:

import org.antlr.v4.runtime.ANTLRFileStream;

Please Tell me what you expect this to do. What I need to know is
what you expected to happen and what happened so I can fix it.

import java.io.File; import java.io.IOException; import
java.util.Arrays;

// All the files in test/bad/ should parse correctly, but contain
type errors. // All the files in tests/good/ should parse correctly,
with no type errors. public class TestTypeChecker {
static int numTests = 0;
static int numPass = 0;

public static void main(String[] args) throws IOException {
testInDir("tests/bad", false);
testInDir("tests/good", true);
System.err.printf("\nPassed %d/%d tests.\n\n", numPass, numTests);
}

private static void testInDir(String dir, boolean good) throws

IOException { String[] fileList = new File(dir).list();
Arrays.sort(fileList); for(String name : fileList) { TypeChecker chk
= new TypeChecker(new ANTLRFileStream( dir + File.separator +
name)); boolean pass; if(good) { pass = chk.parseErrors == 0 &&
chk.visitor.errors == 0; } else { pass = chk.parseErrors == 0 &&
chk.visitor.errors > 0; } System.err.printf("**** %s **** %s/%s ****
syntax=%d, type=%d", pass? "PASS" : "FAIL", good? "good" : "bad",
name, chk.parseErrors, chk.visitor.errors ); numTests++; if(pass)
numPass++; } }

}

So many immigrant groups have swept through our town that Brooklyn,
like Atlantis, reaches mythological proportions in the mind of the
world - RI Safir 1998 http://www.mrbrklyn.com

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive
http://www.coinhangout.com - coins! http://www.brooklyn-living.com

Being so tracked is for FARM ANIMALS and and extermination camps,
but incompatible with living as a free human being. -RI Safir 2013

References

1. mailto:ruben-at-mrbrklyn.com

--==-=-=--

--===-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJXH3Q1AAoJEGuLsz1PMbCLHmsH/i825nnQxL/d5o6hEKtqEPRv
dc6IrjU3sVSk1nyc95YBsTkc1jnXuJkfbOGCE/dcdUHtG396LHGh6mxFFPU60eGu
xQhjp96bpkDHLvKyCuSpHyyaTBH1+SFZdx6/j+SVLeFudRmNLBl+J7PW7a4QSOzf
2Joqecx7wbNG5tZ2uyQAGbWK+TFfo1R2g1afb49DqptCBIZPBtNUufkrDCwyWsTu
Jd7mPc503QGp56ds972MvBI5QYCBY5ydTO/tXgvCZqJ/laz0cy8i1U5eHqzZ81J7
utxMnHmziIAuj2Oy0LlNZfXLqED2d/xbSRwQVNJ+a7F07IH8U7RFlxRZ1Yteurw=
=50dc
-----END PGP SIGNATURE-----
--===-=-=--

--===============1496153992==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
hangout mailing list
hangout-at-nylxs.com
http://www.nylxs.com/
--===============1496153992==--

  1. 2016-04-05 ISOC-NY announcements <announce-at-lists.isoc-ny.org> Subject: [Hangout-NYLXS] [isoc-ny] ISOC-NY President Resigns
  2. 2016-04-06 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] Returned from the Crussades
  3. 2016-04-06 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] pics
  4. 2016-04-06 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] For Rickie!!!
  5. 2016-04-06 Rick Moen <rick-at-linuxmafia.com> Re: [Hangout-NYLXS] For Rickie!!!
  6. 2016-04-06 Rick Moen <rick-at-linuxmafia.com> Re: [Hangout-NYLXS] Returned from the Crussades
  7. 2016-04-06 James E Keenan <jkeen-at-verizon.net> Subject: [Hangout-NYLXS] Perl 6 Group Update
  8. 2016-04-07 eminker-at-gmail.com Re: [Hangout-NYLXS] Returned from the Crussades
  9. 2016-04-07 From: "David H. Adler" <dha-at-panix.com> Re: [Hangout-NYLXS] Perl 6 Group Update
  10. 2016-04-08 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] Fanless Desktop Solutions
  11. 2016-04-08 Rick Moen <rick-at-linuxmafia.com> Re: [Hangout-NYLXS] Fanless Desktop Solutions
  12. 2016-04-08 Ruben Safir <ruben.safir-at-my.liu.edu> Re: [Hangout-NYLXS] Fanless Desktop Solutions
  13. 2016-04-08 einker <eminker-at-gmail.com> Re: [Hangout-NYLXS] Fanless Desktop Solutions
  14. 2016-04-08 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] technight Announcement for Sunday
  15. 2016-04-08 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Hangout-NYLXS] technight Announcement for Sunday
  16. 2016-04-08 Asia Suarez <as9795-at-nyu.edu> Re: [Hangout-NYLXS] technight Announcement for Sunday
  17. 2016-04-08 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Hangout-NYLXS] Fanless Desktop Solutions
  18. 2016-04-08 Rick Moen <rick-at-linuxmafia.com> Re: [Hangout-NYLXS] Fanless Desktop Solutions
  19. 2016-04-08 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] Fwd: Linux Journal Weekly News - April 8, 2015
  20. 2016-04-08 Ruben Safir <ruben.safir-at-my.liu.edu> Re: [Hangout-NYLXS] Fanless Desktop Solutions
  21. 2016-04-08 Rick Moen <rick-at-linuxmafia.com> Re: [Hangout-NYLXS] Fanless Desktop Solutions
  22. 2016-04-08 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] visitor programming
  23. 2016-04-08 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] Fwd: Re: visitor programming
  24. 2016-04-08 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Hangout-NYLXS] visitor programming
  25. 2016-04-08 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Hangout-NYLXS] visitor programming
  26. 2016-04-08 Ruben Safir <ruben.safir-at-my.liu.edu> Re: [Hangout-NYLXS] visitor programming
  27. 2016-04-08 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] Antlr visitor Programming - kicking it around
  28. 2016-04-08 Ruben Safir <ruben.safir-at-my.liu.edu> Subject: [Hangout-NYLXS] visitor programming
  29. 2016-04-08 Ruben Safir <ruben.safir-at-my.liu.edu> Subject: [Hangout-NYLXS] visitor programming in Antlr
  30. 2016-04-09 Christopher League <christopher.league-at-liu.edu> Re: [Hangout-NYLXS] Antlr visitor Programming - kicking it around
  31. 2016-04-09 ISOC-NY announcements <announce-at-lists.isoc-ny.org> Subject: [Hangout-NYLXS] =?utf-8?q?=5Bisoc-ny=5D_SAT/SUN_=E2=80=93_ISOC_Bo?=
  32. 2016-04-09 Ruben Safir <mrbrklyn-at-panix.com> Re: [Hangout-NYLXS] Antlr visitor Programming - kicking it around
  33. 2016-04-10 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] Through my ole pal Billy - Milliniums are mulch
  34. 2016-04-10 Ruben Safir <mrbrklyn-at-panix.com> Subject: [Hangout-NYLXS] Movie of the Week
  35. 2016-04-10 Asia Suarez <as9795-at-nyu.edu> Re: [Hangout-NYLXS] technight Announcement for Sunday
  36. 2016-04-10 Ruben Safir <ruben.safir-at-my.liu.edu> Re: [Hangout-NYLXS] technight Announcement for Sunday
  37. 2016-04-11 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] Kernel Workshop announcement
  38. 2016-04-11 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] NYLXS Announcement Kernel Study Group
  39. 2016-04-11 Asia Suarez <as9795-at-nyu.edu> Re: [Hangout-NYLXS] NYLXS Announcement Kernel Study Group
  40. 2016-04-11 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Hangout-NYLXS] NYLXS Announcement Kernel Study Group
  41. 2016-04-11 Asia Suarez <as9795-at-nyu.edu> Re: [Hangout-NYLXS] NYLXS Announcement Kernel Study Group
  42. 2016-04-11 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Hangout-NYLXS] NYLXS Announcement Kernel Study Group
  43. 2016-04-11 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] Rocky Racoon
  44. 2016-04-11 einker <eminker-at-gmail.com> Re: [Hangout-NYLXS] Rocky Racoon
  45. 2016-04-11 Rick Moen <rick-at-linuxmafia.com> Re: [Hangout-NYLXS] Rocky Racoon
  46. 2016-04-11 Rick Moen <rick-at-linuxmafia.com> Re: [Hangout-NYLXS] NYLXS Announcement Kernel Study Group
  47. 2016-04-11 Ruben Safir <mrbrklyn-at-panix.com> Re: [Hangout-NYLXS] NYLXS Announcement Kernel Study Group
  48. 2016-04-11 Rick Moen <rick-at-linuxmafia.com> Re: [Hangout-NYLXS] Kernel Workshop announcement
  49. 2016-04-11 Ruben Safir <mrbrklyn-at-panix.com> Re: [Hangout-NYLXS] NYLXS Announcement Kernel Study Group
  50. 2016-04-11 Ruben Safir <ruben.safir-at-my.liu.edu> Re: [Hangout-NYLXS] Kernel Workshop announcement
  51. 2016-04-11 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] networking and fragments
  52. 2016-04-11 Ruben Safir <mrbrklyn-at-panix.com> Subject: [Hangout-NYLXS] Fwd: [nylug-talk] RSVP open: Wed Apr 20,
  53. 2016-04-11 From: "Jose A. Rodriguez" <Jose.Rodriguez-at-liu.edu> Re: [Hangout-NYLXS] networking and fragments
  54. 2016-04-10 James E Keenan <jkeen-at-verizon.net> Subject: [Hangout-NYLXS] 2 events this week
  55. 2016-04-11 prmarino1-at-gmail.com Re: [Hangout-NYLXS] networking and fragments
  56. 2016-04-11 Ruben Safir <mrbrklyn-at-panix.com> Re: [Hangout-NYLXS] Winners of the LIU Hackathon
  57. 2016-04-11 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Hangout-NYLXS] networking and fragments
  58. 2016-04-12 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] the EASY and PAINLESS guil to CRC checksums
  59. 2016-04-13 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Hangout-NYLXS] compiling java
  60. 2016-04-13 Rick Moen <rick-at-linuxmafia.com> Re: [Hangout-NYLXS] the EASY and PAINLESS guil to CRC checksums
  61. 2016-04-13 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] confused as to arp tables
  62. 2016-04-13 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Hangout-NYLXS] confused as to arp tables
  63. 2016-04-13 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Hangout-NYLXS] confused as to arp tables
  64. 2016-04-13 Rick Moen <rick-at-linuxmafia.com> Re: [Hangout-NYLXS] confused as to arp tables
  65. 2016-04-13 prmarino1-at-gmail.com Re: [Hangout-NYLXS] confused as to arp tables
  66. 2016-04-13 From: "Deutsch, Chaim" <CDeutsch-at-council.nyc.gov> Subject: [Hangout-NYLXS] THE DEUTSCH REPORT: News From Councilman Chaim
  67. 2016-04-13 prmarino1-at-gmail.com Re: [Hangout-NYLXS] confused as to arp tables
  68. 2016-04-14 William Parker <saurian55-at-gmail.com> Subject: [Hangout-NYLXS] [dinosaur] New Seasonal Paleontology Position with
  69. 2016-04-14 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] Networking Tools
  70. 2016-04-14 Rick Moen <rick-at-linuxmafia.com> Re: [Hangout-NYLXS] Networking Tools
  71. 2016-04-14 Ruben Safir <mrbrklyn-at-panix.com> Re: [Hangout-NYLXS] Networking Tools
  72. 2016-04-17 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] meetings
  73. 2016-04-18 Ruben Safir <mrbrklyn-at-panix.com> Subject: [Hangout-NYLXS] taking a few days off
  74. 2016-04-18 ruben <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] google booked copyright
  75. 2016-04-18 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] Fwd: THE DEUTSCH REPORT: News From Councilman Chaim
  76. 2016-04-19 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] Passover is here
  77. 2016-04-21 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] turn off your god damn phone
  78. 2016-04-21 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] Java is just retarted
  79. 2016-04-21 Ruben Safir <mrbrklyn-at-panix.com> Subject: [Hangout-NYLXS] Khol Meod
  80. 2016-04-21 Rick Moen <rick-at-linuxmafia.com> Re: [Hangout-NYLXS] Java is just retarted
  81. 2016-04-21 Ruben Safir <mrbrklyn-at-panix.com> Re: [Hangout-NYLXS] Java is just retarted
  82. 2016-04-22 Ruben Safir <ruben.safir-at-my.liu.edu> Re: [Hangout-NYLXS] Denim Day - Wear Jeans with a Purpose, April 27
  83. 2016-04-23 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] must have tech
  84. 2016-04-24 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] you have to love this story
  85. 2016-04-24 prmarino1-at-gmail.com Re: [Hangout-NYLXS] must have tech
  86. 2016-04-24 prmarino1-at-gmail.com Re: [Hangout-NYLXS] must have tech
  87. 2016-04-25 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] [kamran.mirzayev-at-my.liu.edu: Re: Programming
  88. 2016-04-25 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] + behavior in the shell
  89. 2016-04-26 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] error: unclosed character literal
  90. 2016-04-26 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Hangout-NYLXS] error: unclosed character literal
  91. 2016-04-26 Rshana Shurriah <rshanashurriah-at-gmail.com> Re: [Hangout-NYLXS] error: unclosed character literal
  92. 2016-04-26 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Hangout-NYLXS] error: unclosed character literal
  93. 2016-04-26 Christopher League <christopher.league-at-liu.edu> Re: [Hangout-NYLXS] fwiw with errors
  94. 2016-04-26 Christopher League <christopher.league-at-liu.edu> Re: [Hangout-NYLXS] Good Morning Sunshine
  95. 2016-04-26 Christopher League <christopher.league-at-liu.edu> Re: [Hangout-NYLXS] heart burn
  96. 2016-04-26 Christopher League <christopher.league-at-liu.edu> Re: [Hangout-NYLXS] error: unclosed character literal
  97. 2016-04-27 IEEE CS Webinars <csconnection-at-computer.org> Subject: [Hangout-NYLXS] Don't forget to register: Is Your DevOps Team
  98. 2016-04-27 Paul Li <paul.li.nyc-at-hotmail.com> Re: [Hangout-NYLXS] hangout Digest, Vol 7, Issue 27
  99. 2016-04-27 Ruben Safir <mrbrklyn-at-panix.com> Re: [Hangout-NYLXS] hangout Digest, Vol 7, Issue 27
  100. 2016-04-27 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] Communications Bill
  101. 2016-04-28 Rick Moen <rick-at-linuxmafia.com> Re: [Hangout-NYLXS] Communications Bill
  102. 2016-04-28 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] AI Conference
  103. 2016-04-28 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Hangout-NYLXS] What is a U (other than a letter in the alphabet)
  104. 2016-04-28 Ruben Safir <mrbrklyn-at-panix.com> Re: [Hangout-NYLXS] Communications Bill
  105. 2016-04-28 Rick Moen <rick-at-linuxmafia.com> Re: [Hangout-NYLXS] What is a U (other than a letter in the
  106. 2016-04-28 Ruben Safir <mrbrklyn-at-panix.com> Re: [Hangout-NYLXS] What is a U (other than a letter in the
  107. 2016-04-28 Ruben Safir <mrbrklyn-at-panix.com> Subject: [Hangout-NYLXS] Fwd: Tell us about your recent Optimum experience.
  108. 2016-04-28 Ruben Safir <mrbrklyn-at-panix.com> Re: [Hangout-NYLXS] Tell us about your recent Optimum experience.
  109. 2016-04-27 James E Keenan <jkeen-at-verizon.net> Subject: [Hangout-NYLXS] NYC Perl 6 Beginners Study Group: Session 4: Sat
  110. 2016-04-28 Christopher League <christopher.league-at-liu.edu> Subject: [Hangout-NYLXS] how to build/run assn7/8 from cmdline
  111. 2016-04-28 prmarino1-at-gmail.com Re: [Hangout-NYLXS] NYC Perl 6 Beginners Study Group: Session 4:
  112. 2016-04-28 prmarino1-at-gmail.com Re: [Hangout-NYLXS] Communications Bill
  113. 2016-04-29 Rick Moen <rick-at-linuxmafia.com> Re: [Hangout-NYLXS] What is a U (other than a letter in the

NYLXS are Do'ers and the first step of Doing is Joining! Join NYLXS and make a difference in your community today!