SwePub
Sök i LIBRIS databas

  Utökad sökning

onr:"swepub:oai:research.chalmers.se:bd02717e-d548-44f6-baab-31a6fd6d82fa"
 

Sökning: onr:"swepub:oai:research.chalmers.se:bd02717e-d548-44f6-baab-31a6fd6d82fa" > Embedded Parser Gen...

Embedded Parser Generators

Almström Duregård, Jonas, 1984 (författare)
Chalmers tekniska högskola,Chalmers University of Technology
Jansson, Patrik, 1972 (författare)
Chalmers tekniska högskola,Chalmers University of Technology
 (creator_code:org_t)
2011-09-22
2011
Engelska.
Ingår i: SIGPLAN Notices (ACM Special Interest Group on Programming Languages). - : Association for Computing Machinery (ACM). - 0730-8566 .- 0362-1340 .- 1558-1160. ; 46:12, s. 107-117
  • Tidskriftsartikel (refereegranskat)
Abstract Ämnesord
Stäng  
  • We present a novel method of embedding context-free grammars in Haskell, and to automatically generate parsers and pretty-printers from them. We have implemented this method in a library called BNFC-meta (from the BNF Converter, which it is built on). The library builds compiler front ends using metaprogramming instead of conventional code generation. Parsers are built from labelled BNF grammars that are defined directly in Haskell modules. Our solution combines features of parser generators (static grammar checks, a highly specialised grammar DSL) and adds several features that are otherwise exclusive to combinatory libraries such as the ability to reuse, parameterise and generate grammars inside Haskell. To allow writing grammars in concrete syntax, BNFC-meta provides a quasi-quoter that can parse grammars (embedded in Haskell files) at compile time and use metaprogramming to replace them with their abstract syntax. We also generate quasi-quoters so that the languages we define with BNFC-meta can be embedded in the same way. With a minimal change to the grammar, we support adding anti-quotation to the generated quasi-quoters, which allows users of the defined language to mix concrete and abstract syntax almost seamlessly. Unlike previous methods of achieving anti-quotation, the method used by BNFC-meta is simple, efficient and avoids polluting the abstract syntax types.

Ämnesord

NATURVETENSKAP  -- Data- och informationsvetenskap -- Programvaruteknik (hsv//swe)
NATURAL SCIENCES  -- Computer and Information Sciences -- Software Engineering (hsv//eng)

Nyckelord

Domain Specific
Languages
Metaprogramming
Design
Languages
Experimentation

Publikations- och innehållstyp

art (ämneskategori)
ref (ämneskategori)

Hitta via bibliotek

Till lärosätets databas

Hitta mer i SwePub

Av författaren/redakt...
Almström Duregår ...
Jansson, Patrik, ...
Om ämnet
NATURVETENSKAP
NATURVETENSKAP
och Data och informa ...
och Programvarutekni ...
Artiklar i publikationen
SIGPLAN Notices ...
Av lärosätet
Chalmers tekniska högskola

Sök utanför SwePub

Kungliga biblioteket hanterar dina personuppgifter i enlighet med EU:s dataskyddsförordning (2018), GDPR. Läs mer om hur det funkar här.
Så här hanterar KB dina uppgifter vid användning av denna tjänst.

 
pil uppåt Stäng

Kopiera och spara länken för att återkomma till aktuell vy