You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Benedikt Kristinsson 874fb219a1 README 6 years ago
.gitignore Initial commit 6 years ago README 6 years ago
VCL.BNF quotes around iprange were missing from BNF 6 years ago
vcl.hs Explciit AclEntry and using instance declerations 6 years ago


This is a simple AST, Pretty Printer and Parser for VCL (the DSL for configuring Varnish).

This is a learning project, with the goal of being able to correctly generating ACLs in VCL. (I may or may not iplement the rest of this grammar).

The source BNF can be found here.

I have submitted an improvement that hasn't been added yet, see VCL.BNF in this repository.

λ > let ip_a = IPRange "" $ Just 24
λ > let ip_b = IPRange "" Nothing
λ > let entries = [AclEntry ip_a True, AclEntry ip_b False]
λ > Acl (Identifier "testacl") entries
λ> Acl (Identifier "test") [AclEntry ip_a True, AclEntry ip_b False]
  ! "";