Please use this identifier to cite or link to this item: http://hdl.handle.net/1822/40556

TitleBiYacc: Roll your parser and reflective printer into one
Author(s)Zhu, Zirun
Ko, Hsiang-Shang
Martins, Pedro Miguel Ribeiro
Saraiva, João Alexandre
Hu, Zhenjiang
Issue date24-Jul-2015
PublisherCEUR-Ws
JournalCEUR Workshop Proceedings
CitationZhu, Z., Ko, H. S., Martins, P., Saraiva, J., & Hu, Z. (2015). BiYacc: roll your parser and reflective printer into one. In Proceedings of 4th International Workshop on Bidirectional Transformations co-located with Software Technologies: Applications and Foundations (STAF 2015) (pp. 43-50)
Abstract(s)Language designers usually need to implement parsers and printers. Despite being two related programs, in practice they are designed and implemented separately. This approach has an obvious disadvantage: as a language evolves, both its parser and printer need to be separately revised and kept synchronised. Such tasks are routine but complicated and error-prone. To facilitate these tasks, we propose a language called BiYacc, whose programs denote both a parser and a printer. In essence, BiYacc is a domain-specific language for writing putback-based bidirectional transformations — the printer is a putback transformation, and the parser is the corresponding get transformation. The pairs of parsers and printers generated by BiYacc are thus always guaranteed to satisfy the usual round-trip properties. The highlight that distinguishes this reflective printer from others is that the printer — being a putback transformation — accepts not only an abstract syntax tree but also a string, and produces an updated string consistent with the given abstract syntax tree. We can thus make use of the additional input string, with mechanisms such as simultaneous pattern matching on the view and the source, to provide users with full control over the printing-strategies.
TypeConference paper
DescriptionIn: A. Cunha, E. Kindler (eds.): Proceedings of the Fourth International Workshop on Bidirectional Transformations (Bx 2015), L’Aquila, Italy, July 24, 2015, published at http://ceur-ws.org
URIhttp://hdl.handle.net/1822/40556
ISSN1613-0073
Publisher versionhttp://ceur-ws.org/Vol-1396/
Peer-Reviewedyes
AccessOpen access
Appears in Collections:HASLab - Artigos em atas de conferências nacionais (texto completo)

Files in This Item:
File Description SizeFormat 
2597.pdf248,76 kBAdobe PDFView/Open

Partilhe no FacebookPartilhe no TwitterPartilhe no DeliciousPartilhe no LinkedInPartilhe no DiggAdicionar ao Google BookmarksPartilhe no MySpacePartilhe no Orkut
Exporte no formato BibTex mendeley Exporte no formato Endnote Adicione ao seu ORCID