-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New package happy-lib
; make previous happy-*
packages sublibraries (#288)
#297
Merged
+188
−352
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
packages: | ||
packages/*/happy-*.cabal | ||
./ | ||
happy.cabal | ||
lib/happy-lib.cabal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../ChangeLog.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../README.md |
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...ages/backend-glr/src/Happy/Backend/GLR.hs → lib/backend-glr/src/Happy/Backend/GLR.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module Happy.Backend.GLR where | ||
|
||
import Paths_happy_backend_glr | ||
import Paths_happy_lib | ||
|
||
glrBackendDataDir :: IO String | ||
glrBackendDataDir = getDataDir | ||
glrBackendDataDir = getDataDir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...es/backend-lalr/src/Happy/Backend/LALR.hs → lib/backend-lalr/src/Happy/Backend/LALR.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
cabal-version: 3.0 | ||
name: happy-lib | ||
version: 2.0 | ||
license: BSD-2-Clause | ||
copyright: (c) Andy Gill, Simon Marlow | ||
author: Andy Gill and Simon Marlow | ||
maintainer: https://github.com/haskell/happy | ||
bug-reports: https://github.com/haskell/happy/issues | ||
stability: stable | ||
homepage: https://www.haskell.org/happy/ | ||
synopsis: Happy is a parser generator for Haskell implemented using this library | ||
category: Development | ||
build-type: Simple | ||
|
||
Description: | ||
Happy is a parser generator for Haskell. Given a grammar | ||
specification in BNF, Happy generates Haskell code to parse the | ||
grammar. Happy works in a similar way to the @yacc@ tool for C. | ||
|
||
This library provides the following functionality: | ||
|
||
* Data type definitions for the Grammar AST type, capturing the information in .y-files (Happy.Grammar) | ||
|
||
* A parser for happy grammar files (.y) to produce a Grammar (Happy.Frontend.*) | ||
|
||
* Implementations of the text book algorithms that compute the LR action and | ||
goto tables for the given 'Grammar' (Happy.Tabular.*) | ||
|
||
* An LALR code generator to produce table-driven, deterministic parsing code | ||
in Haskell (Happy.Backend.LALR.*) | ||
|
||
* A (less maintained) GLR code generator to produce table-driven, | ||
non-deterministic parsing code in Haskell, where ambiguous parses produce | ||
multiple parse trees (Happy.Backend.GLR.*) | ||
|
||
tested-with: | ||
GHC == 9.10.1 | ||
GHC == 9.8.2 | ||
GHC == 9.6.5 | ||
GHC == 9.4.8 | ||
GHC == 9.2.8 | ||
GHC == 9.0.2 | ||
GHC == 8.10.7 | ||
GHC == 8.8.4 | ||
GHC == 8.6.5 | ||
GHC == 8.4.4 | ||
GHC == 8.2.2 | ||
GHC == 8.0.2 | ||
|
||
extra-source-files: | ||
ChangeLog.md | ||
README.md | ||
frontend/bootstrap.sh | ||
frontend/boot-src/Parser.ly | ||
frontend/boot-src/AttrGrammarParser.ly | ||
|
||
data-dir: data | ||
|
||
data-files: | ||
HappyTemplate.hs | ||
GLR_Base.hs | ||
GLR_Lib.hs | ||
|
||
source-repository head | ||
type: git | ||
location: https://github.com/haskell/happy.git | ||
|
||
library grammar | ||
hs-source-dirs: grammar/src | ||
|
||
exposed-modules: Happy.Grammar | ||
build-depends: base < 5, array | ||
|
||
default-language: Haskell98 | ||
default-extensions: CPP, MagicHash, FlexibleContexts | ||
ghc-options: -Wall | ||
other-modules: | ||
|
||
library frontend | ||
hs-source-dirs: frontend/src | ||
exposed-modules: Happy.Frontend, | ||
Happy.Frontend.AbsSyn, | ||
Happy.Frontend.Mangler, | ||
Happy.Frontend.PrettyGrammar | ||
|
||
build-depends: base < 5, array, transformers, containers, mtl, happy-lib:grammar | ||
|
||
default-language: Haskell98 | ||
default-extensions: CPP, MagicHash, FlexibleContexts | ||
ghc-options: -Wall -Wno-incomplete-uni-patterns | ||
other-modules: | ||
Happy.Frontend.ParseMonad | ||
Happy.Frontend.ParseMonad.Class | ||
Happy.Frontend.Mangler.Monad | ||
Happy.Frontend.Parser | ||
Happy.Frontend.Lexer | ||
Happy.Frontend.ParamRules | ||
Happy.Frontend.AttrGrammar | ||
Happy.Frontend.AttrGrammar.Parser | ||
Happy.Frontend.AttrGrammar.Mangler | ||
|
||
library tabular | ||
hs-source-dirs: tabular/src | ||
|
||
exposed-modules: Happy.Tabular, | ||
Happy.Tabular.First, | ||
Happy.Tabular.Info, | ||
Happy.Tabular.LALR, | ||
Happy.Tabular.NameSet | ||
build-depends: base < 5, array, containers, happy-lib:grammar | ||
|
||
default-language: Haskell98 | ||
default-extensions: CPP, MagicHash, FlexibleContexts, NamedFieldPuns | ||
ghc-options: -Wall | ||
|
||
library backend-lalr | ||
hs-source-dirs: backend-lalr/src | ||
|
||
exposed-modules: Happy.Backend.LALR, | ||
Happy.Backend.LALR.ProduceCode | ||
build-depends: base < 5, array, happy-lib:grammar, happy-lib:tabular | ||
|
||
default-language: Haskell98 | ||
default-extensions: CPP, MagicHash, FlexibleContexts | ||
ghc-options: -Wall -Wno-incomplete-uni-patterns | ||
other-modules: Paths_happy_lib | ||
autogen-modules: Paths_happy_lib | ||
|
||
library backend-glr | ||
hs-source-dirs: backend-glr/src | ||
|
||
exposed-modules: Happy.Backend.GLR, | ||
Happy.Backend.GLR.ProduceCode | ||
build-depends: base < 5, array, happy-lib:grammar, happy-lib:tabular | ||
|
||
default-language: Haskell98 | ||
default-extensions: CPP, MagicHash, FlexibleContexts | ||
ghc-options: -Wall -Wno-incomplete-uni-patterns | ||
other-modules: Paths_happy_lib | ||
autogen-modules: Paths_happy_lib | ||
|
||
library | ||
reexported-modules: Happy.Grammar, | ||
Happy.Frontend, | ||
Happy.Frontend.AbsSyn, | ||
Happy.Frontend.Mangler, | ||
Happy.Frontend.PrettyGrammar, | ||
Happy.Tabular, | ||
Happy.Tabular.First, | ||
Happy.Tabular.Info, | ||
Happy.Tabular.LALR, | ||
Happy.Tabular.NameSet, | ||
Happy.Backend.LALR, | ||
Happy.Backend.LALR.ProduceCode, | ||
Happy.Backend.GLR, | ||
Happy.Backend.GLR.ProduceCode | ||
|
||
build-depends: base >= 4.9 && < 5, | ||
array >= 0.5, | ||
containers >= 0.4.2, | ||
transformers >= 0.5.6.2, | ||
mtl >= 2.2.1, | ||
happy-lib:grammar, | ||
happy-lib:tabular, | ||
happy-lib:frontend, | ||
happy-lib:backend-lalr, | ||
happy-lib:backend-glr | ||
default-language: Haskell98 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the relation between this
library tabular
subsection andlib/tabular/happy-tabular.cabal
? I didn't expect to see the latter.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can just remove the others?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I forgot to remove the .cabal files. The main thing about this approach :)
Should be done now.