Extending the functionality of a host programming language
First Claim
1. A computer-implemented method for extending the functionality of a host language, the method comprising:
- providing a language extension file that defines at least a portion of a domain specific language;
applying a lexer to the language extension file to generate a first portion of a domain specific language specification, the first portion of the domain specific language specification relating tokens that include strings of characters from the domain specific language to corresponding tokens that include strings of characters from the host language;
applying a parser to the language extension file to generate a second portion of a domain specific language specification, the second portion of the of the domain specific language relating at least one grammatical rule for operations on tokens from the domain specific language to at least one corresponding grammatical rule for operations on tokens from the host language; and
incorporating the domain specific language specification into a system for executing program code in the host language, the domain specific language specification describing a procedure in the host language for executing a set of functions from the domain specific language by relating operations on strings of characters from the domain specific language to operations on strings of characters from the host language.
2 Assignments
0 Petitions
Accused Products
Abstract
To enable language-level integration of multiple programming languages into a single programming framework, one or more domain specific languages (DSLs) are specified as incremental extensions to a host programming language. An application created in this framework may include program code written in the host language as well as DSL inset code that is written in any of the DSLs. The extensions to the host language are described in DSL specifications, which define how the DSL inset code is processed. At runtime, DSL inset code in the source code is detected and passed to a DSL inset processor for execution according to an appropriate DSL specification, whereas source code in the host language is executed by a host language processor.
-
Citations
23 Claims
-
1. A computer-implemented method for extending the functionality of a host language, the method comprising:
-
providing a language extension file that defines at least a portion of a domain specific language; applying a lexer to the language extension file to generate a first portion of a domain specific language specification, the first portion of the domain specific language specification relating tokens that include strings of characters from the domain specific language to corresponding tokens that include strings of characters from the host language; applying a parser to the language extension file to generate a second portion of a domain specific language specification, the second portion of the of the domain specific language relating at least one grammatical rule for operations on tokens from the domain specific language to at least one corresponding grammatical rule for operations on tokens from the host language; and incorporating the domain specific language specification into a system for executing program code in the host language, the domain specific language specification describing a procedure in the host language for executing a set of functions from the domain specific language by relating operations on strings of characters from the domain specific language to operations on strings of characters from the host language. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
-
-
15. A computer program product for extending the functionality of a host language, the computer program product comprising a non-transitory computer-readable storage medium containing computer program code for:
-
providing a language extension file that defines at least a portion of a domain specific language; applying a lexer to the language extension file to generate a first portion of a domain specific language specification, the first portion of the domain specific language specification relating tokens that include strings of characters from the domain specific language to corresponding tokens that include strings of characters from the host language; applying a parser to the language extension file to generate a second portion of a domain specific language specification, the second portion of the of the domain specific language relating at least one grammatical rule for operations on tokens from the domain specific language to at least one corresponding grammatical rule for operations on tokens from the host language; and incorporating the domain specific language specification into a system for executing program code in the host language, the domain specific language specification describing a procedure in the host language for executing a set of functions from the domain specific language by relating operations on strings of characters from the domain specific language to operations on strings of characters from the host language. - View Dependent Claims (16, 17, 18, 19, 20, 21)
-
-
22. An apparatus for extending the functionality of a host language, the apparatus comprising at least one computer that performs operations for computer-implemented modules including:
-
a file-access module configured to access a language extension file that defines at least a portion of a domain specific language; a lexing module configured to apply a lexer to the language extension file to generate a first portion of a domain specific language specification, the first portion of the domain specific language specification relating tokens that include strings of characters from the domain specific language to corresponding tokens that include strings of characters from the host language; a parsing module configured to apply a parser to the language extension file to generate a second portion of a domain specific language specification, the second portion of the of the domain specific language relating at least one grammatical rule for operations on tokens from the domain specific language to at least one corresponding grammatical rule for operations on tokens from the host language; and a program-execution module configured to incorporate the domain specific language specification into a system for executing program code in the host language, the domain specific language specification describing a procedure in the host language for executing a set of functions from the domain specific language by relating operations on strings of characters from the domain specific language to operations on strings of characters from the host language. - View Dependent Claims (23)
-
Specification