gdritter repos puggle / 999c30a
initial commit; AST and little else Getty Ritter 9 years ago
5 changed file(s) with 98 addition(s) and 0 deletion(s). Collapse all Expand all
1 Copyright (c) 2015, Getty Ritter
2
3 All rights reserved.
4
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7
8 * Redistributions of source code must retain the above copyright
9 notice, this list of conditions and the following disclaimer.
10
11 * Redistributions in binary form must reproduce the above
12 copyright notice, this list of conditions and the following
13 disclaimer in the documentation and/or other materials provided
14 with the distribution.
15
16 * Neither the name of Getty Ritter nor the names of other
17 contributors may be used to endorse or promote products derived
18 from this software without specific prior written permission.
19
20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1 # puggle
2
3 TODO: Write description here
4
5 ## Installation
6
7 TODO: Write installation instructions here
8
9 ## Usage
10
11 TODO: Write usage instructions here
12
13 ## How to run tests
14
15 ```
16 cabal configure --enable-tests && cabal build && cabal test
17 ```
18
19 ## Contributing
20
21 TODO: Write contribution instructions here
1 module Text.Puggle.AST where
2
3 data PGDefinition = PGDefinition
4 { defName :: String
5 , defDelim :: Bool
6 , defType :: String
7 , defRules :: [Expr]
8 } deriving (Eq, Show)
9
10 data Indent = IEq | IGE | IGt | IAny
11 deriving (Eq, Show)
12
13 data Expr
14 = ELiteral String
15 | ECharset String
16 | EChoice Expr Expr
17 | ESequence Expr Expr
18 | EAction Expr Code
19 | EStar Expr
20 | EPlus Expr
21 | EQues Expr
22 | EPred Bool Expr
23 | EIndent Expr Indent
24 | EBars Expr
25 deriving (Eq, Show)
1 module Text.Puggle where
1 Name: puggle
2 Version: 0.0.0
3 Author: Getty Ritter <gdritter@galois.com>
4 Maintainer: Getty Ritter <gdritter@galois.com>
5 License: BSD3
6 License-File: LICENSE
7 -- Synopsis:
8 -- Description:
9 Cabal-Version: >= 1.10
10 Build-Type: Simple
11 Extra-Source-Files: README.md, ChangeLog.md
12
13 Library
14 Default-Language: Haskell2010
15 GHC-Options: -Wall
16 Exposed-Modules: Text.Puggle
17 Build-Depends: base >= 4 && < 5
18
19 Source-Repository head
20 Type: git
21 -- Location: