Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
Lark
Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.
Some lexer generators (notably Flex) take input from a file handle by default. While you can always read a file into a string before passing it to the generated lexer, this is not seen as "the best" since you have to read in all the data into memory, which can be a lot.
These algorithms can be very useful in editors (Tree-sitter is built into Atom) and IDE/language-server contexts, where the compiler must be able to parse and elaborate input extremely quickly.
Have you looked at Lark recently?
visibly pushdown parsing! it's one of the few techniques that can detect and report grammar ambiguity consistently