Skip to content

Commit

Permalink
switch to GitHub CI and codecov.io
Browse files Browse the repository at this point in the history
  • Loading branch information
alyst committed Jul 10, 2021
1 parent 5be8ec9 commit 128f17e
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 42 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI
on:
push:
branches: [master]
tags: ["*"]
pull_request:
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.0'
- '1' # automatically expands to the latest stable 1.x release of Julia
- 'nightly'
os:
- ubuntu-latest
- macOS-latest
#- windows-latest
arch:
- x64
- x86
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
file: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-docdeploy@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

45 changes: 22 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![Build Status](https://travis-ci.org/andrewcooke/ParserCombinator.jl.png)](https://travis-ci.org/andrewcooke/ParserCombinator.jl)
[![Coverage Status](https://coveralls.io/repos/andrewcooke/ParserCombinator.jl/badge.svg)](https://coveralls.io/r/andrewcooke/ParserCombinator.jl)
[![Build status](https://github.com/andrewcooke/ParserCombinator.jl/workflows/CI/badge.svg)](https://github.com/andrewcooke/ParserCombinator.jl/actions?query=workflow%3ACI+branch%3Amaster)
[![Codecov](https://codecov.io/gh/andrewcooke/ParserCombinator.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/andrewcooke/ParserCombinator.jl)

[![ParserCombinator](http://pkg.julialang.org/badges/ParserCombinator_0.3.svg)](http://pkg.julialang.org/?pkg=ParserCombinator&ver=0.3)
[![ParserCombinator](http://pkg.julialang.org/badges/ParserCombinator_0.4.svg)](http://pkg.julialang.org/?pkg=ParserCombinator&ver=0.4)
Expand Down Expand Up @@ -68,7 +68,7 @@ sum.matcher = prd + (add | sub)[0:end] |> Sum
all = sum + Eos()


# and test
# and test

# this prints 2.5
calc(parse_one("1+2*3/4", all)[1])
Expand Down Expand Up @@ -270,7 +270,7 @@ flattening lists was useful above.
```julia
julia> parse_one("abc", And(Drop(Equal("a")), Equal("b")))
2-element Array{Any,1}:
Any[]
Any[]
Any["b"]

julia> parse_one("abc", Seq(Drop(Equal("a")), Equal("b")))
Expand Down Expand Up @@ -362,7 +362,7 @@ julia> parse_one("abc", Repeat(p".", 2))
julia> collect(parse_all("abc", Repeat(p".", 2, 3)))
2-element Array{Any,1}:
Any["a","b","c"]
Any["a","b"]
Any["a","b"]

julia> parse_one("abc", Repeat(p".", 2; flatten=false))
2-element Array{Any,1}:
Expand All @@ -372,15 +372,15 @@ julia> parse_one("abc", Repeat(p".", 2; flatten=false))
julia> collect(parse_all("abc", Repeat(p".", 0, 3)))
4-element Array{Any,1}:
Any["a","b","c"]
Any["a","b"]
Any["a"]
Any[]
Any["a","b"]
Any["a"]
Any[]

julia> collect(parse_all("abc", Repeat(p".", 0, 3; greedy=false)))
4-element Array{Any,1}:
Any[]
Any["a"]
Any["a","b"]
Any[]
Any["a"]
Any["a","b"]
Any["a","b","c"]
```

Expand Down Expand Up @@ -418,15 +418,15 @@ There are also some well-known special cases:
julia> collect(parse_all("abc", Plus(p".")))
3-element Array{Any,1}:
Any["a","b","c"]
Any["a","b"]
Any["a"]
Any["a","b"]
Any["a"]

julia> collect(parse_all("abc", Star(p".")))
4-element Array{Any,1}:
Any["a","b","c"]
Any["a","b"]
Any["a"]
Any[]
Any["a","b"]
Any["a"]
Any[]
```

#### Full Match
Expand Down Expand Up @@ -484,12 +484,12 @@ something works a certain way.
```julia
julia> parse_one("12c", Lookahead(p"\d") + PInt() + Dot())
2-element Array{Any,1}:
12
12
'c'

julia> parse_one("12c", Not(Lookahead(p"[a-z]")) + PInt() + Dot())
2-element Array{Any,1}:
12
12
'c'
```

Expand Down Expand Up @@ -596,7 +596,7 @@ character of the first line.

Finally, note that this is implemented at the source level, by restricting
what text is visible to the matchers. Matchers that *could* backtrack will
still make the attempt. So you should also [disable backtracking in the
still make the attempt. So you should also [disable backtracking in the
matchers](#backtracking), where you do not need it, for an efficient grammar.

#### Spaces - Pre And Post-Fixes
Expand Down Expand Up @@ -727,15 +727,15 @@ matchers you care about):

neg = Delayed() # allow multiple negations (eg ---3)
neg.matcher = val | (E"-" + neg > Neg)

mul = E"*" + neg
div = E"/" + neg > Inv
prd = neg + (mul | div)[0:end] |> Prd

add = E"+" + prd
sub = E"-" + prd > Neg
sum.matcher = prd + (add | sub)[0:end] |> Sum

all = sum + Eos()
end

Expand Down Expand Up @@ -1272,4 +1272,3 @@ patch.
1.1.0 - 2015-06-07 - Fixed calc example; debug mode; much rewriting.

1.0.0 - ~2015-06-03 - More or less feature complete.

0 comments on commit 128f17e

Please sign in to comment.