sharwell/antlr4cs — pull request #18 by andrevdm (2013-08-04 06:02:37+00:00)
Title: Fix infinite loop in ANTLRInputStream

Checking for Stream.Read != -1 in ANTLRInputStream was causing an infinite loop.
Changing this to check for >0 fixed the problem.

See: http://msdn.microsoft.com/en-us/library/system.io.stream.read.aspx
Specifically " Read returns 0 only when there is no more data in the stream and no more is expected (such as a closed socket or end of file). "