-
Notifications
You must be signed in to change notification settings - Fork 85
Modularize happy #191
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
Closed
Closed
Modularize happy #191
Changes from all commits
Commits
Show all changes
82 commits
Select commit
Hold shift + click to select a range
1b2bdba
Create frontend package
knothed f1c2c1b
Create middleend package
knothed d94c4dd
Create backend package
knothed 13afe4a
Fix name shadowing warnings
knothed 155bcf5
Create main package (happy)
knothed bed8653
Re-add debugging options
knothed 67fe0a8
Add changeLog entry
knothed e8a864a
Fix test suite
knothed 463c610
Small modifications for RAD package
knothed 9fccd01
Outsource cli flag declaration into respective packages
knothed 2277ed7
Don't require an unnamed argument (like filename)
knothed 2ee6ea8
OptionParsing: add sorting and duplication checking
knothed ab273a8
Supply `version` from Main.hs
knothed 8cf532c
Prefix packages with `happy-`
knothed 1a7e8f1
Create happy-core package
knothed 5f0e1c7
Move tests into happy-test package
knothed a101f3d
Replace Makefile with Test.hs to allow for customised test setups
knothed 5899364
Fix tests which failed to signalise failure
knothed acd2296
Add `stopOnFailure` option to happy-test
knothed f8dc26f
Some fixes; remove `make sdist`
knothed 8d6fa5d
Undo bogus change
knothed 8412424
Remove makefile from happy.cabal
knothed 7ab584c
Remove build-windows-dist.sh
knothed 7a6021d
Disable stdout-buffering for cabal test
knothed 0264bdd
Improve Test.hs
knothed 0507f52
Reintroduce `make sdist-test`
knothed 89a7e68
Use `make sdist-test` for travis and appveyor
knothed 04ba22b
Remove redundant dependencies
knothed 1fd5f90
Use sequence_
knothed 38588fa
Add explicit version requirements
knothed ea9c902
Custom `dropWhileEnd` (for GHC < 7.4)
knothed 0442ee7
CI: just perform `cabal build`
knothed e884419
Don't require Data.Bifunctor
knothed f8240b5
Custom `Functor OptDescr` (for GHC < 7.6)
knothed 144006e
Functor OptDescr seems to exist since base-4.7.0.0
knothed dcead12
Windows-specific shell adjustments
knothed 33b7ded
Pin exact sub-package versions
knothed d10ea68
GHC 7.0-specific things
knothed 6c04aaf
Use absolute path for calling the exe
knothed e72c4aa
Use correct parentheses
knothed 5b30076
CI: run make-sdist on GHC ≥ 8.0
knothed be14d21
Use mapM_ instead of sequence_ (map • •)
knothed fb641ce
Change CI script again
knothed 09c735f
Don't use `catchIOError` (GHC 7.0 doesn't have it)
knothed e75af81
Fix test grammars for GHC 7.0
knothed 3501c68
Remove `(.*)` and `(..*)`
knothed 3600a14
Organize modules into Happy.* hierarchy
knothed 85f3fa4
Fix testing
knothed 676f94a
Remove type of test parse function
knothed da196f4
Remove unnecessary `IO` annotations
knothed a2a25ba
Remove misleading `Eq` instance
knothed f70dc19
Remove useless ErrorHandlerType' type
knothed 886c88e
Minor things
knothed 179b16b
Update ChangeLog.md
knothed ea59588
AttrGrammarParser -> AttrGrammar.Parser
Ericson2314 f6dc01e
Move happy package into packages/happy
knothed 5084f06
Update Readme
knothed eec989c
isBootstrapped -> supportsParsingAttributeGrammars
knothed accf5c7
Remove disable-benchmarks flags
knothed 6401925
Fix package path
knothed 4bd9ecd
Don't install all
knothed 4fffee8
Try ghc=HC
knothed fff4ca4
Put ghc-dir in path
knothed 6ce8962
Unify cabal files
knothed 4566fc8
Fix appveyor
knothed 44ff6ed
Update haskell-ci.patch
knothed fd8d833
Fix silly mistake
knothed 5f5b163
Fix some examples
knothed 088f01b
Split off GLRBackend
knothed 25ef214
Remove `defaultArguments` for testing
knothed df4d156
Remove `elem` parsing functions
knothed e2d5a75
Implement GLR option parsing
knothed 7cd8704
Update packages/test/data/monad002.ly
knothed 3411489
Update haskell-ci.yml
knothed a2d6f3f
Fixes and adaptions
knothed 1bf9dca
Move glr-backend's characteristic flag to top-level
knothed f640745
Rename middleend to tabular
knothed 0633fc9
Split happy-core into happy-cli and happy-grammar
knothed 08a53f2
Fix rebase issues
knothed 9db33f3
Liquidate GenUtils
knothed b6def85
Declare `die` for GHC 7.8 and below
knothed 0e235b4
Remove GLR datas file accidentally coppied instead of moved
Ericson2314 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,48 +1,13 @@ | ||
CABAL = cabal | ||
|
||
HAPPY_VER = `awk '/^version:/ { print $$2 }' happy.cabal` | ||
|
||
ALEX = alex | ||
ALEX_OPTS = -g | ||
|
||
SDIST_DIR=dist-newstyle/sdist | ||
|
||
sdist :: | ||
@case "`$(CABAL) --numeric-version`" in \ | ||
2.[2-9].* | [3-9].* ) ;; \ | ||
* ) echo "Error: needs cabal 2.2.0.0 or later (but got : `$(CABAL) --numeric-version`)" ; exit 1 ;; \ | ||
esac | ||
@if [ "`git status -s`" != '' ]; then \ | ||
echo "Error: Tree is not clean"; \ | ||
exit 1; \ | ||
fi | ||
$(CABAL) v2-sdist | ||
@if [ ! -f "${SDIST_DIR}/happy-$(HAPPY_VER).tar.gz" ]; then \ | ||
echo "Error: source tarball not found: dist/happy-$(HAPPY_VER).tar.gz"; \ | ||
exit 1; \ | ||
fi | ||
git checkout . | ||
git clean -f | ||
|
||
sdist-test :: sdist sdist-test-only | ||
@rm -rf "${SDIST_DIR}/happy-${HAPPY_VER}/" | ||
|
||
sdist-test-only :: | ||
@if [ ! -f "${SDIST_DIR}/happy-$(HAPPY_VER).tar.gz" ]; then \ | ||
echo "Error: source tarball not found: ${SDIST_DIR}/happy-$(HAPPY_VER).tar.gz"; \ | ||
exit 1; \ | ||
fi | ||
rm -rf "${SDIST_DIR}/happy-$(HAPPY_VER)/" | ||
tar -xf "${SDIST_DIR}/happy-$(HAPPY_VER).tar.gz" -C ${SDIST_DIR}/ | ||
echo "packages: ." > "${SDIST_DIR}/happy-$(HAPPY_VER)/cabal.project" | ||
echo "tests: True" >> "${SDIST_DIR}/happy-$(HAPPY_VER)/cabal.project" | ||
cd "${SDIST_DIR}/happy-$(HAPPY_VER)/" \ | ||
&& cabal v2-build all --flag -bootstrap \ | ||
&& cabal v2-install --flag -bootstrap --installdir="./bootstrap-root" \ | ||
&& cabal v2-test all -j --flag -bootstrap \ | ||
&& export PATH=./bootstrap-root:$$PATH \ | ||
&& cabal v2-build all --flag +bootstrap \ | ||
&& cabal v2-test all -j --flag +bootstrap | ||
@echo "" | ||
@echo "Success! ${SDIST_DIR}/happy-$(HAPPY_VER).tar.gz is ready for distribution!" | ||
@echo "" | ||
ENV = .local.env | ||
HC ?= ghc | ||
CABAL ?= cabal | ||
|
||
EXECUTABLE = "happy" | ||
PACKAGES = ["happy", "happy-cli", "happy-grammar", "happy-frontend", "happy-tabular", "happy-backend", "happy-test"] | ||
BOOTSTRAPPING = True | ||
|
||
sdist-test :: | ||
rm -f ${ENV} | ||
$(CABAL) v2-install --lib happy-test --package-env ${ENV} | ||
$(HC) -package-env ${ENV} -e 'Happy.Test.SDist.sdist_test "${CABAL}" "$(shell pwd)" ${EXECUTABLE} ${PACKAGES} ${BOOTSTRAPPING}' | ||
rm -f ${ENV} |
This file contains hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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,2 +1,9 @@ | ||
packages: | ||
./ | ||
packages/backend, | ||
packages/backend-glr, | ||
packages/cli, | ||
packages/frontend, | ||
packages/grammar, | ||
packages/happy, | ||
packages/tabular, | ||
packages/test |
This file contains hidden or 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 Calc where | ||
> import Char | ||
> import Data.Char | ||
> } | ||
|
||
First thing to declare is the name of your parser, | ||
|
This file contains hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
Tests %monad without %lexer. | ||
|
||
> { | ||
> import Char | ||
> import Data.Char | ||
> } | ||
|
||
> %name calc | ||
|
This file contains hidden or 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 @@ | ||
../../LICENSE |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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.
Uh oh!
There was an error while loading. Please reload this page.