-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use JSONx to transfer parse tree between processes
By default, the language of the parsers generated from grammars is Python and they are executed in-process. However, the generation of Java parsers is also supported for performance reasons, in which case the parsers are executed in a separate process and their result must be communicated back to the Python part of the reducer. The data exchange format used to be JSON, but JSON is not a first-class citizen in Java and standard edition contains no packages to read/write JSON. Unfortunately, the latest releases of ANTLR have stopped bundling a JSON implementation with the tool jar. To avoid the need for adding dependencies to the use of Java parsers, the data exchange format is changed to JSONx. Serialization to JSONx in Java is supportd by a minimal partial implementation, while deserialization in Python is supported by the XSON project.
- Loading branch information
1 parent
e6d46e2
commit fc4dd29
Showing
3 changed files
with
87 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters