{'fraction_non_alphanumeric': 0.023809523809523808, 'fraction_numerical': 0.0, 'mean_word_length': 5.2387096774193544, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Building an Enhanced Syntax-Directed Processing Environment for XML Documents by Combining StAX and CUP

Building on our previous work on the combination of JavaCC and SAX, we developed a new syntax-directed processing environment for XML documents. In this new environment, we use CUP as the parser-generation tool and StAX as the interface with the underlying XML parsing framework. The new environment supports a richer set of processing-specific context-free grammars (i.e., the grammars used for representing the processing-oriented structure of the processed documents) and enables the construction of more efficient and complex processors. In particular, the environment makes possible an event-driven computation style that enables processes that require multiple passes on the document tree, although such a tree is never explicitly built. This paper describes the environment and illustrates its use in the development of , an XML-driven courseware system.