4 ms·
This is actually pretty true based upon what I've personally observed too. While Apache Spark [0] and Presto [1] use ANTLR to implement their parsers, when I se
by rajnathani 7y ago
This is actually pretty true based upon what I've personally observed too.
While Apache Spark [0] and Presto [1] use ANTLR to implement their parsers, when I searched about TypeScript's parser and noticed that they implement their own parser [2] (in TypeScript itself), the reason I was able to find was that the nuanced error messages which a language like TypeScript has to provide is only feasible by hand-writing the parser.
[0] https://github.com/apache/spark/blob/master/sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 https://github.com/apache/spark/blob/master/sql/catalyst/src...
[1] https://github.com/prestodb/presto/blob/master/presto-parser/src/main/antlr4/com/facebook/presto/sql/parser/SqlBase.g4 https://github.com/prestodb/presto/blob/master/presto-parser...
[2] https://github.com/microsoft/TypeScript/blob/master/src/compiler/parser.ts https://github.com/microsoft/TypeScript/blob/master/src/comp...
- lloydatkinson 7y ago> the nuanced error messages which a language like TypeScript has to provide is only feasible by hand-writing the parser. I wonder if this is relevant to how bad the error messages generally are in Typescript.