Skip to content

Commit bf95501

Browse files
authored
Merge pull request #3 from tomerghelber/develop
Develop
2 parents 5ce1260 + 755b067 commit bf95501

24 files changed

+177
-85
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
*.class
22
*.log
3+
target/*
4+
project/target/*

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ project.excludeFilters = [
1010
".git/.*"
1111
]
1212

13-
maxColumn = 100
13+
maxColumn = 120
1414

1515
continuationIndent {
1616
callSite = 2

.travis.yml

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,6 @@ language: scala
22
scala:
33
- 2.12.8
44

5-
jobs:
6-
include:
7-
- stage: test
8-
name: "Unit Tests"
9-
script:
10-
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
11-
- chmod +x ./cc-test-reporter
12-
- ./cc-test-reporter before-build
13-
- sbt ++$TRAVIS_SCALA_VERSION clean coverage test coverageReport
14-
# "Mutation Tests" are too long and travis kills the job.
15-
# - name: "Mutation Tests"
16-
# script: sbt stryker
17-
- SCALA_TARGET_DIRECTORY=target/scala-$(echo $TRAVIS_SCALA_VERSION | grep -o -P '^\d+\.\d+' '-')
18-
- ./cc-test-reporter format-coverage -t cobertura $SCALA_TARGET_DIRECTORY/coverage-report/cobertura.xml
19-
- ./cc-test-reporter upload-coverage
20-
21-
# run ci-release only if previous stages passed
22-
- stage: release
23-
script: sbt ci-release
24-
25-
stages:
26-
- name: test
27-
- name: release
28-
if: ((branch = master AND type = push) OR (tag IS present)) AND NOT fork
29-
305
before_cache:
316
# Tricks to avoid unnecessary cache updates
327
- find $HOME/.sbt -name "*.lock" | xargs rm
@@ -46,3 +21,25 @@ before_install:
4621

4722
install:
4823
- sbt compile
24+
25+
before_script:
26+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
27+
- chmod +x ./cc-test-reporter
28+
- ./cc-test-reporter before-build
29+
30+
script:
31+
- sbt ++$TRAVIS_SCALA_VERSION clean coverage test coverageReport
32+
33+
after_script:
34+
- SCALA_TARGET_DIRECTORY=target/scala-$(echo $TRAVIS_SCALA_VERSION | grep -o -P '^\d+\.\d+' '-')
35+
- ./cc-test-reporter format-coverage -t cobertura $SCALA_TARGET_DIRECTORY/coverage-report/cobertura.xml
36+
- ./cc-test-reporter upload-coverage
37+
38+
deploy:
39+
provider: script
40+
script: sbt ci-release
41+
edge: true
42+
on:
43+
branch: master
44+
tags: true
45+
condition: ((branch = master AND type = push) OR (tag IS present)) AND NOT fork

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
[![Maintainability](https://api.codeclimate.com/v1/badges/fec458e9b494f6428613/maintainability)](https://codeclimate.com/github/tomerghelber/mathematica-scala-parser-combinators/maintainability)
66
[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fapi%2Fgithub.com%2Ftomerghelber%2Fmathematica-scala-parser-combinators%2Fmaster)](https://stryker-mutator.github.io)
77

8+
[![Sonatype Nexus (Releases)](https://img.shields.io/nexus/r/https/oss.sonatype.org/com.github.tomerghelber/mathimatica-parser_2.12.svg)](https://img.shields.io/nexus/r/https/oss.sonatype.org/com.github.tomerghelber/mathimatica-parser_2.12.svg)
9+
[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/https/oss.sonatype.org/com.github.tomerghelber/mathimatica-parser_2.12.svg)](https://img.shields.io/nexus/s/https/oss.sonatype.org/com.github.tomerghelber/mathimatica-parser_2.12.svg)
10+
811
This repository directed to crate a parser for [Mathematica Language](https://www.wolfram.com/mathematica).
912
The parser is written in scala using [scala-parser-combinators](https://github.com/scala/scala-parser-combinators)
1013

src/main/scala/tomerghelber/mathematica/ast/ASTNode.scala renamed to src/main/scala/com/github/tomerghelber/mathematica/ast/ASTNode.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package tomerghelber.mathematica.ast
1+
package com.github.tomerghelber.mathematica.ast
22

33
trait ASTNode
44

@@ -40,6 +40,9 @@ object NotExistsNode extends ApplyBinaryFunctionNode with UnapplyFunctionNode {
4040
object EquivalentNode extends ApplyBinaryFunctionNode with UnapplyFunctionNode {
4141
protected val name = "Equivalent"
4242
}
43+
object ListNode extends UnapplyFunctionNode {
44+
protected val name = "List"
45+
}
4346

4447
case class LimitNode(expr1: ASTNode, expr3: ASTNode, expr2: ASTNode) extends ASTNode
4548
case class MaxLimitNode(expr1: ASTNode, expr3: ASTNode, expr2: ASTNode) extends ASTNode

src/main/scala/tomerghelber/mathematica/ast/BinaryOperationNode.scala renamed to src/main/scala/com/github/tomerghelber/mathematica/ast/BinaryOperationNode.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package tomerghelber.mathematica.ast
1+
package com.github.tomerghelber.mathematica.ast
22

33
object NotNode extends ApplyUnaryFunctionNode with UnapplyFunctionNode {
44
protected val name: String = "Not"

src/main/scala/tomerghelber/mathematica/ast/ComparationNode.scala renamed to src/main/scala/com/github/tomerghelber/mathematica/ast/ComparationNode.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package tomerghelber.mathematica.ast
1+
package com.github.tomerghelber.mathematica.ast
22

33
object EqualNode extends ApplyBinaryFunctionNode with UnapplyFunctionNode {
44
protected val name: String = "Equal"

src/main/scala/tomerghelber/mathematica/ast/MatrixOperationNode.scala renamed to src/main/scala/com/github/tomerghelber/mathematica/ast/MatrixOperationNode.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package tomerghelber.mathematica.ast
1+
package com.github.tomerghelber.mathematica.ast
22

33
trait MatrixOperationNode extends ASTNode
44

src/main/scala/tomerghelber/mathematica/ast/NumberOperationNode.scala renamed to src/main/scala/com/github/tomerghelber/mathematica/ast/NumberOperationNode.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package tomerghelber.mathematica.ast
1+
package com.github.tomerghelber.mathematica.ast
22

33
object IncrementNode extends ApplyUnaryFunctionNode with UnapplyFunctionNode {
44
protected val name: String = "Increment"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.github.tomerghelber.mathematica.ast
2+
3+
object RuleNode extends ApplyBinaryFunctionNode with UnapplyFunctionNode {
4+
protected val name: String = "Rule"
5+
}
6+
object RuleDelayedNode extends ApplyBinaryFunctionNode with UnapplyFunctionNode {
7+
protected val name: String = "RuleDelayed"
8+
}

0 commit comments

Comments
 (0)