summaryrefslogtreecommitdiff
path: root/language-oberon.cabal
blob: 99702e7e940246e15f5df572dccc7d9ad7ff34f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
-- Initial language-oberon.cabal generated by cabal init.  For further 
-- documentation, see http://haskell.org/cabal/users-guide/

name:                language-oberon
version:             0.1.1
synopsis:            Parser and pretty-printer for the Oberon programming language
description:
   The library and the executable support both the original Oberon and the Oberon-2 programming language, as described
   in the respective <http://www.ethoberon.ethz.ch/compiler/index.html#report language reports>.
   .
   The grammars in "Language.Oberon.Grammar" attempt to follow the language grammars from the reports, while
   generating a semantically meaningful abstract syntax tree; the latter is defined in "Language.Oberon.AST". As the
   grammars are ambiguous, it is necessary to resolve the ambiguities after parsing all Oberon modules in use.
   "Language.Oberon.Resolver" provides this functionality. Only after the ambiguity resolution can the abstract syntax
   tree be pretty-printed using the instances from "Language.Oberon.Pretty".
   .
   The original purpose for the library was to be a test of the underlying
   <http://hackage.haskell.org/package/grammatical-parsers grammatical-parsers> library. The experiment succeeded, so    the package can be used in practice.

homepage:            https://github.com/blamario/language-oberon
bug-reports:         https://github.com/blamario/language-oberon/issues
license:             GPL-3
license-file:        LICENSE
author:              Mario Blažević
maintainer:          blamario@protonmail.com
-- copyright:           
category:            Language
build-type:          Simple
extra-source-files:  ChangeLog.md, examples/AGRS/*.Def, examples/AGRS/*.Mod
cabal-version:       >=1.10

library
  hs-source-dirs:       src
  exposed-modules:      Language.Oberon,
                        Language.Oberon.AST, Language.Oberon.Grammar,
                        Language.Oberon.Pretty, Language.Oberon.Resolver
  build-depends:        base >= 4.7 && < 5, text < 1.3, containers >= 0.5 && < 1.0, filepath < 1.5, directory < 1.4,
                        parsers >= 0.12.7 && < 0.13, prettyprinter >= 1 && < 1.3, either == 5.*,
                        rank2classes < 1.1, grammatical-parsers == 0.3.*
  default-language:     Haskell2010

executable parse
  main-is:             app/Parse.hs
  -- other-modules:       
  other-extensions:    RankNTypes, RecordWildCards, ScopedTypeVariables, FlexibleInstances, DeriveDataTypeable
  build-depends:       base >= 4.7 && < 5, text < 1.3, either == 5.*, containers >= 0.5 && < 1.0,
                       repr-tree-syb < 0.2, filepath < 1.5, prettyprinter >= 1 && < 1.3,
                       rank2classes < 1.1, grammatical-parsers == 0.3.*, language-oberon,
                       optparse-applicative
  default-language:    Haskell2010

test-suite             examples
  type:                exitcode-stdio-1.0
  build-depends:       base >= 4.7 && < 5,
                       either == 5.*, directory < 2, filepath < 1.5,
                       tasty >= 0.7, tasty-hunit,
                       language-oberon
  main-is:             test/Test.hs
  default-language:    Haskell2010