摘要:
Parse tables or like representations are augmented with extension points to enable call out to arbitrary code. Such parse tables can be automatically generated from a specification including fixed information along with information about extensibility points provided. The extensibility points enable incorporation of dynamic data into a fixed parse table. In one instance, this allows a parser to determine if a character is acceptable at the time of execution rather than when the parse table was defined.
摘要:
Error recovery and diagnosis is afforded for pushdown automata. Upon detection of an error, a recovery strategy is selected and dispatched to recover from the error to place an automaton in an error free state to enable continued processing. In one instance, recovery strategies can be specified and matched with respect to automaton configuration. Errors can be diagnosed as a function of the difference between a first error configuration and a second recovered configuration.
摘要:
A plethora of strategies is afforded to facilitate conflict resolution and error recovery with respect to parsing, among other things. Grammar authors can select amongst a range of strategies or options on a case-by-case basis to address conflicts, ambiguities, errors, and the like. The strategies can be either static or dynamic. In one instance, code external to a parsing system can be invoked to resolve conflicts or recover from errors, and further enable change of strategy without requiring modification of the parser. Interaction between the parsing system and the external code can also be formalized to ensure general type safety of the system.
摘要:
Parsing functionality is automatically generated. In particular, abstract syntax tree types and/or other programmatic constructs are created automatically from a grammar specification in a manner that resembles hand-written code. An abstract syntax tree can subsequently be constructed as a function of the generated types. Further, a plurality of supporting functionality can be generated to consume or produce abstract syntax tree types, among other things.
摘要:
Immutable structures are employed to effect immutable parsing. In particular, an immutable parsing configuration, comprising a stack and lookahead buffer, is utilized by a parser to perform lexical and syntactical analysis of an input stream and optionally output an immutable parse tree or the like. Performance with respect to the immutable structures can be optimized utilizing sharing and lazy computation. In turn, immutability benefits are afforded with respect to parsing including safe sharing amongst services and/or across multiple threads as well as history preservation, among other things.
摘要:
Immutable structures are employed to effect immutable parsing. In particular, an immutable parsing configuration, comprising a stack and lookahead buffer, is utilized by a parser to perform lexical and syntactical analysis of an input stream and optionally output an immutable parse tree or the like. Performance with respect to the immutable structures can be optimized utilizing sharing and lazy computation. In turn, immutability benefits are afforded with respect to parsing including safe sharing amongst services and/or across multiple threads as well as history preservation, among other things.
摘要:
Data transformation is lazily performed to facilitate reduced memory footprint, among other things. Rather than constituting an entire data structure, information is saved to enable iterative construction the structure. Moreover, an interface is afforded that appears to operate over a fully resolved structure but which is implemented on top of a restartable transformation mechanism that computes values in response to requests. These computed values could also be released based on one or more configurable policies.
摘要:
A mechanism is provided for inferring a computer user's intent in developing computer system code. Specifically, an inference mechanism is provided that can infer a user's intent at least on three levels: a lexical level, a syntactic level, and a semantic level. The inference mechanism employs various rule-based and heuristic-based techniques including type coercion, scope proximity, parameter count and arguments, and so on. Various inference mechanism controls are also employed to increase inference robustness, including timing of making suggestions, the number of suggestions, and the extensibility of suggestions.
摘要:
Systems, methods, and media for presenting panel-based electronic documents are provided. In accordance with some embodiments, systems for presenting panel-based electronic documents are provided, the systems comprising: at least one processor programmed to: receive an electronic document, a definition of a first panel on a page in the electronic document, and a definition of a second panel on the page in the electronic document; control a display of the first panel based on the definition of the first panel; and transition from the display of the first panel to a display of the second panel by re-scaling the display and panning from the first panel to the second panel.
摘要:
Systems, methods, and media for presenting panel-based electronic documents are provided. In accordance with some embodiments, systems for presenting panel-based electronic documents are provided, the systems comprising: at least one processor programmed to: receive an electronic document, a definition of a first panel on a page in the electronic document, and a definition of a second panel on the page in the electronic document; control a display of the first panel based on the definition of the first panel; and transition from the display of the first panel to a display of the second panel by re-scaling the display and panning from the first panel to the second panel.