13. A system for modifying a file written in a formal language, the system comprising a computer system comprising one or more processors and one or more memories, the one or more processors programmed with instructions to: parse, based on code of a parser, an input file written in a formal language to generate by the parser a data structure of the input file, the parser implemented using a formal language specification for the formal language of the input file; issue, at an intermediate point in generation of the data structure of the input file by the parser and according to one or more query triggers in the code of the parser, one or more queries to a rule engine for evaluation of a first plurality of rules for modifying the input file, wherein the one or more queries include a subset of terminal symbols used to make up the data structure, wherein modifying the input file comprises altering the functionality of the input file by altering computer code of the input file according to the first plurality of rules; the first plurality of rules comprising at least one rule distinct from the formal language specification used to implement the parser, the rule engine configured to analyze the one or more queries, determine whether the one or more queries trigger any of the first plurality of rules for modifying the input file, and communicate a query result to the parser, the query result instructing the parser to take an action in accordance with any of the triggered first plurality of rules as determined by the rule engine; generate, at the intermediate point, the data structure by executing the action indicated by the query result; and wherein the one or more processors are programmed with instructions to reuse the parser with a second plurality of rules distinct from the first plurality of rules.
13. A system for modifying a file written in a formal language, the system comprising a computer system comprising one or more processors and one or more memories, the one or more processors programmed with instructions to: parse, based on code of a parser, an input file written in a formal language to generate by the parser a data structure of the input file, the parser implemented using a formal language specification for the formal language of the input file; issue, at an intermediate point in generation of the data structure of the input file by the parser and according to one or more query triggers in the code of the parser, one or more queries to a rule engine for evaluation of a first plurality of rules for modifying the input file, wherein the one or more queries include a subset of terminal symbols used to make up the data structure, wherein modifying the input file comprises altering the functionality of the input file by altering computer code of the input file according to the first plurality of rules; the first plurality of rules comprising at least one rule distinct from the formal language specification used to implement the parser, the rule engine configured to analyze the one or more queries, determine whether the one or more queries trigger any of the first plurality of rules for modifying the input file, and communicate a query result to the parser, the query result instructing the parser to take an action in accordance with any of the triggered first plurality of rules as determined by the rule engine; generate, at the intermediate point, the data structure by executing the action indicated by the query result; and wherein the one or more processors are programmed with instructions to reuse the parser with a second plurality of rules distinct from the first plurality of rules. 14. The system of claim 13 , wherein the one or more processors are further operable to generate a modified file according to the generated data structure.