Operator Overloading as a DSL Parsing Mechanism

This chapter describes an approach for the implementation of embedded domainspecific languages by using operator overloads and the creation of abstract syntax trees in run-time. Using the host language parser, an AST is created stating the structure of the DSL expression that is later analyzed, simp...

ver descrição completa

Detalhes bibliográficos
Autor principal: Simões, Alberto (author)
Outros Autores: Costa Meira, Rui Miguel (author)
Formato: bookPart
Idioma:eng
Publicado em: 2021
Assuntos:
Texto completo:http://hdl.handle.net/11110/2120
País:Portugal
Oai:oai:ciencipca.ipca.pt:11110/2120
Descrição
Resumo:This chapter describes an approach for the implementation of embedded domainspecific languages by using operator overloads and the creation of abstract syntax trees in run-time. Using the host language parser, an AST is created stating the structure of the DSL expression that is later analyzed, simplified, and optimized before the evaluation step. For the illustration of this process, the chapter proposes a domain-specific language for a basic linear algebra system dealing with matrices algebra and its optimization.