Using Java Reflection to Automate Extension Language Parsing
01 January 2000
An extension language is an interpreted programming language designed to be embedded in a domain-specific framework. The addition of domain-specific primitive operations to an embedded extension language, as well as subsequent extension through user-written interpreted procedures, evolves a vanilla extension language into a domain-specific language. After an overview of extension language embedding and LUxWORKS experience, this paper examines the design of a Java class that simplifies the work of passing primitive function calls and arguments from an extension language to a Java-based domain framework. This utility class uses Java reflection, recursive parameter matching and match-directed backtracking to align and convert weakly typed textual arguments to strongly typed Java method parameters. The paper concludes by examining the applicability of this utility class to several extension languages.