摘要:
An augmented parser can create an augmented parse tree that captures all the information in the source code as additional elements. Information included in the augmented parse tree can include whitespace, comments, pre-processor directives, line continuation characters, missing text, text errors, and original text. Thus, the augmented parse tree can be used to fully reconstruct the original source code, character for character, including spaces, comments, and incorrect code. The improved parser can store syntactic error information in the original source code in the parse tree. The augmented parse tree can be used to generate or modify source code. The parse tree created by the augmented parser can be used for incremental parsing to create a new augmented parse tree after a change.
摘要:
A type system employing structural subtyping is disclosed herein. A core type system supports several structural types, such as stream, choice, intersection and sequence. Also part of the core type system is a new invariant type, which denotes values whose dynamic type is the same as its static type, and type restrictions for limiting a range of a base type. Furthermore, a streamlined structural version of delegates, called structural delegates and a validation method thereof are introduce into the type system. To further facilitate type safety, strict statically checked interface casts are introduced.
摘要:
A type system employing structural subtyping is disclosed herein. A core type system supports several structural types, such as stream, choice, intersection and sequence. Also part of the core type system is a new invariant type, which denotes values whose dynamic type is the same as its static type, and type restrictions for limiting a range of a base type. Furthermore, a streamlined structural version of delegates, called structural delegates and a validation method thereof are introduce into the type system. To further facilitate type safety, strict statically checked interface casts are introduced.
摘要:
A system and method for employing a programming language based on structural types on top of a nominal type runtime environment is disclosed. The system utilizes adapters and coercive subtyping to achieve precise typing while preserving aliasing. Furthermore, the system employs a universal value representation to achieve cross-assembly type equivalence.
摘要:
A system and method for interfacing additional translation logic via composer(s) to a compiler to extend the capabilities of the compiler is provided. Generally, composer(s) can be software libraries that provide employment of componentization and polymorphism to compiler add-ons in order to extend compiler capabilities. One or more composers can be accessible to the compilation process by reference(s) made in a source code file. For example, additional translation logic for data types and/or expressions (e.g., markup language) created after compiler design can be made accessible to a compiler via composer(s), thus extending the existing compiler. The present invention mitigates problems associated with conventional compiler extending schemes and affords for compile code optimization without having to consider substantially all of the operations of a single query.