I am trying to parse very large gzip compressed (10+GB) file in python3. Instead of creating the parse tree, instead I used embedded actions based on the suggestions in this answer.
However, looking at the FileStream
code it wants to read the entire file and then parse it. This will not work for big files.
So, this is a two part question.
- Can ANTLR4 use a file stream, probably custom, that allows it to read chunks of the file at a time? What should the class interface look like?
- Predicated on the above having "yes", would that class need to handle seek operations, which would be a problem if the underlying file is gzip compressed?