Skip to content

Commit

Permalink
Merge pull request #42 from 422404/feature/modularization
Browse files Browse the repository at this point in the history
Feature/modularization
  • Loading branch information
422404 committed Jan 21, 2023
2 parents b47ec46 + bcca6db commit 6fa7228
Show file tree
Hide file tree
Showing 110 changed files with 883 additions and 544 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./build/reports/jacoco/report.xml
files: ./parser/build/reports/jacoco/report.xml, ./runtime/build/reports/jacoco/report.xml
name: codecov-actorlang
fail_ci_if_error: true

20 changes: 4 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.5.0'
id 'application'
id 'antlr'
id 'org.jlleitschuh.gradle.ktlint' version '10.0.0'
id 'com.adarshr.test-logger' version '3.0.0'
id 'jacoco'
}

group = 'org.actorlang'
version = '1.1.0-RELEASE'
version = '1.1.1-SNAPSHOT'
archivesBaseName = 'org.actorlang.cli'

repositories {
mavenCentral()
Expand All @@ -19,11 +19,6 @@ application {
applicationName = 'actorlang'
}

generateGrammarSource {
arguments += ["-visitor", "-long-messages"]
outputDirectory = file("src/main/java/")
}

jacoco {
toolVersion = '0.8.7'
}
Expand All @@ -36,18 +31,11 @@ jacocoTestReport {
html.destination = file("${buildDir}/reports/jacoco/html")
csv.enabled = false
}

afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it, exclude: [
"org/actorlang/antlr/gen/*"
])
}))
}
}

dependencies {
antlr 'org.antlr:antlr4:4.9'
implementation project(":parser")
implementation project(":runtime")

// Tests
testImplementation "org.mockito:mockito-core:3.+"
Expand Down
68 changes: 68 additions & 0 deletions parser/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
plugins {
id 'org.jetbrains.kotlin.jvm'
id 'antlr'
id 'org.jlleitschuh.gradle.ktlint'
id 'com.adarshr.test-logger'
id 'jacoco'
}

group = 'org.actorlang'
version = '1.1.1-SNAPSHOT'
archivesBaseName = 'org.actorlang.parser'

repositories {
mavenCentral()
}

generateGrammarSource {
arguments += ["-visitor", "-long-messages"]
outputDirectory = file("src/main/java/")
}

jacoco {
toolVersion = '0.8.7'
}

jacocoTestReport {
reports {
xml.enabled = true
xml.destination = file("${buildDir}/reports/jacoco/report.xml")
html.enabled = true
html.destination = file("${buildDir}/reports/jacoco/html")
csv.enabled = false
}

afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it, exclude: [
"org/actorlang/antlr/gen/*"
])
}))
}
}

dependencies {
antlr 'org.antlr:antlr4:4.9'

// Tests
testImplementation "org.mockito:mockito-core:3.+"
testImplementation 'org.mockito:mockito-inline:3.11.0'
testImplementation "org.mockito.kotlin:mockito-kotlin:3.2.0"
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit5'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
}

test {
useJUnitPlatform()
finalizedBy jacocoTestReport
}

compileKotlin {
kotlinOptions.jvmTarget = '1.8'
}

compileTestKotlin {
kotlinOptions.jvmTarget = '1.8'
}
153 changes: 153 additions & 0 deletions parser/src/main/java/org/actorlang/antlr/gen/ActorLangLexer.interp
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
token literal names:
null
'..'
null
null
null
null
'true'
'false'
'self'
'create'
'become'
'display'
'send'
'to'
'if'
'else'
'for'
'in'
'put'
'fun'
'return'
'call'
null
'('
')'
'['
']'
'{'
'}'
','
';'
null
'=='
null
'<'
null
'>'
null
'&&'
'||'
'+'
'-'
'*'
'/'
'%'
null

token symbolic names:
null
null
WS
COMMENT
IntegerLiteral
StringLiteral
True
False
Self
Create
Become
Display
Send
To
If
Else
For
In
Put
Fun
Return
Call
Identifier
LParen
RParen
LBracket
RBracket
LCurly
RCurly
Comma
Semi
Assign
Eq
Neq
Lower
Leq
Greater
Geq
And
Or
Plus
Minus
Star
Slash
Percent
Not

rule names:
T__0
WS
COMMENT
Digit
IntegerLiteral
StringLiteral
True
False
Self
Create
Become
Display
Send
To
If
Else
For
In
Put
Fun
Return
Call
Identifier
LParen
RParen
LBracket
RBracket
LCurly
RCurly
Comma
Semi
Assign
Eq
Neq
Lower
Leq
Greater
Geq
And
Or
Plus
Minus
Star
Slash
Percent
Not

channel names:
DEFAULT_TOKEN_CHANNEL
HIDDEN

mode names:
DEFAULT_MODE

atn:
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 47, 296, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 3, 2, 3, 2, 3, 2, 3, 3, 6, 3, 100, 10, 3, 13, 3, 14, 3, 101, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 7, 4, 110, 10, 4, 12, 4, 14, 4, 113, 11, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 6, 6, 6, 123, 10, 6, 13, 6, 14, 6, 124, 3, 7, 3, 7, 3, 7, 3, 7, 7, 7, 131, 10, 7, 12, 7, 14, 7, 134, 11, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 7, 24, 221, 10, 24, 12, 24, 14, 24, 224, 11, 24, 3, 25, 3, 25, 3, 26, 3, 26, 3, 27, 3, 27, 3, 28, 3, 28, 3, 29, 3, 29, 3, 30, 3, 30, 3, 31, 3, 31, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 33, 5, 33, 246, 10, 33, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 5, 35, 256, 10, 35, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 5, 37, 265, 10, 37, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 5, 39, 274, 10, 39, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, 43, 3, 43, 3, 44, 3, 44, 3, 45, 3, 45, 3, 46, 3, 46, 3, 47, 3, 47, 3, 47, 5, 47, 295, 10, 47, 3, 111, 2, 48, 3, 3, 5, 4, 7, 5, 9, 2, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 3, 2, 7, 5, 2, 11, 12, 15, 15, 34, 34, 3, 2, 50, 59, 3, 2, 36, 36, 5, 2, 67, 92, 97, 97, 99, 124, 6, 2, 50, 59, 67, 92, 97, 97, 99, 124, 2, 305, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, 2, 81, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 85, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, 2, 91, 3, 2, 2, 2, 2, 93, 3, 2, 2, 2, 3, 95, 3, 2, 2, 2, 5, 99, 3, 2, 2, 2, 7, 105, 3, 2, 2, 2, 9, 119, 3, 2, 2, 2, 11, 122, 3, 2, 2, 2, 13, 126, 3, 2, 2, 2, 15, 137, 3, 2, 2, 2, 17, 142, 3, 2, 2, 2, 19, 148, 3, 2, 2, 2, 21, 153, 3, 2, 2, 2, 23, 160, 3, 2, 2, 2, 25, 167, 3, 2, 2, 2, 27, 175, 3, 2, 2, 2, 29, 180, 3, 2, 2, 2, 31, 183, 3, 2, 2, 2, 33, 186, 3, 2, 2, 2, 35, 191, 3, 2, 2, 2, 37, 195, 3, 2, 2, 2, 39, 198, 3, 2, 2, 2, 41, 202, 3, 2, 2, 2, 43, 206, 3, 2, 2, 2, 45, 213, 3, 2, 2, 2, 47, 218, 3, 2, 2, 2, 49, 225, 3, 2, 2, 2, 51, 227, 3, 2, 2, 2, 53, 229, 3, 2, 2, 2, 55, 231, 3, 2, 2, 2, 57, 233, 3, 2, 2, 2, 59, 235, 3, 2, 2, 2, 61, 237, 3, 2, 2, 2, 63, 239, 3, 2, 2, 2, 65, 245, 3, 2, 2, 2, 67, 247, 3, 2, 2, 2, 69, 255, 3, 2, 2, 2, 71, 257, 3, 2, 2, 2, 73, 264, 3, 2, 2, 2, 75, 266, 3, 2, 2, 2, 77, 273, 3, 2, 2, 2, 79, 275, 3, 2, 2, 2, 81, 278, 3, 2, 2, 2, 83, 281, 3, 2, 2, 2, 85, 283, 3, 2, 2, 2, 87, 285, 3, 2, 2, 2, 89, 287, 3, 2, 2, 2, 91, 289, 3, 2, 2, 2, 93, 294, 3, 2, 2, 2, 95, 96, 7, 48, 2, 2, 96, 97, 7, 48, 2, 2, 97, 4, 3, 2, 2, 2, 98, 100, 9, 2, 2, 2, 99, 98, 3, 2, 2, 2, 100, 101, 3, 2, 2, 2, 101, 99, 3, 2, 2, 2, 101, 102, 3, 2, 2, 2, 102, 103, 3, 2, 2, 2, 103, 104, 8, 3, 2, 2, 104, 6, 3, 2, 2, 2, 105, 106, 7, 49, 2, 2, 106, 107, 7, 44, 2, 2, 107, 111, 3, 2, 2, 2, 108, 110, 11, 2, 2, 2, 109, 108, 3, 2, 2, 2, 110, 113, 3, 2, 2, 2, 111, 112, 3, 2, 2, 2, 111, 109, 3, 2, 2, 2, 112, 114, 3, 2, 2, 2, 113, 111, 3, 2, 2, 2, 114, 115, 7, 44, 2, 2, 115, 116, 7, 49, 2, 2, 116, 117, 3, 2, 2, 2, 117, 118, 8, 4, 2, 2, 118, 8, 3, 2, 2, 2, 119, 120, 9, 3, 2, 2, 120, 10, 3, 2, 2, 2, 121, 123, 5, 9, 5, 2, 122, 121, 3, 2, 2, 2, 123, 124, 3, 2, 2, 2, 124, 122, 3, 2, 2, 2, 124, 125, 3, 2, 2, 2, 125, 12, 3, 2, 2, 2, 126, 132, 7, 36, 2, 2, 127, 128, 7, 94, 2, 2, 128, 131, 11, 2, 2, 2, 129, 131, 10, 4, 2, 2, 130, 127, 3, 2, 2, 2, 130, 129, 3, 2, 2, 2, 131, 134, 3, 2, 2, 2, 132, 130, 3, 2, 2, 2, 132, 133, 3, 2, 2, 2, 133, 135, 3, 2, 2, 2, 134, 132, 3, 2, 2, 2, 135, 136, 7, 36, 2, 2, 136, 14, 3, 2, 2, 2, 137, 138, 7, 118, 2, 2, 138, 139, 7, 116, 2, 2, 139, 140, 7, 119, 2, 2, 140, 141, 7, 103, 2, 2, 141, 16, 3, 2, 2, 2, 142, 143, 7, 104, 2, 2, 143, 144, 7, 99, 2, 2, 144, 145, 7, 110, 2, 2, 145, 146, 7, 117, 2, 2, 146, 147, 7, 103, 2, 2, 147, 18, 3, 2, 2, 2, 148, 149, 7, 117, 2, 2, 149, 150, 7, 103, 2, 2, 150, 151, 7, 110, 2, 2, 151, 152, 7, 104, 2, 2, 152, 20, 3, 2, 2, 2, 153, 154, 7, 101, 2, 2, 154, 155, 7, 116, 2, 2, 155, 156, 7, 103, 2, 2, 156, 157, 7, 99, 2, 2, 157, 158, 7, 118, 2, 2, 158, 159, 7, 103, 2, 2, 159, 22, 3, 2, 2, 2, 160, 161, 7, 100, 2, 2, 161, 162, 7, 103, 2, 2, 162, 163, 7, 101, 2, 2, 163, 164, 7, 113, 2, 2, 164, 165, 7, 111, 2, 2, 165, 166, 7, 103, 2, 2, 166, 24, 3, 2, 2, 2, 167, 168, 7, 102, 2, 2, 168, 169, 7, 107, 2, 2, 169, 170, 7, 117, 2, 2, 170, 171, 7, 114, 2, 2, 171, 172, 7, 110, 2, 2, 172, 173, 7, 99, 2, 2, 173, 174, 7, 123, 2, 2, 174, 26, 3, 2, 2, 2, 175, 176, 7, 117, 2, 2, 176, 177, 7, 103, 2, 2, 177, 178, 7, 112, 2, 2, 178, 179, 7, 102, 2, 2, 179, 28, 3, 2, 2, 2, 180, 181, 7, 118, 2, 2, 181, 182, 7, 113, 2, 2, 182, 30, 3, 2, 2, 2, 183, 184, 7, 107, 2, 2, 184, 185, 7, 104, 2, 2, 185, 32, 3, 2, 2, 2, 186, 187, 7, 103, 2, 2, 187, 188, 7, 110, 2, 2, 188, 189, 7, 117, 2, 2, 189, 190, 7, 103, 2, 2, 190, 34, 3, 2, 2, 2, 191, 192, 7, 104, 2, 2, 192, 193, 7, 113, 2, 2, 193, 194, 7, 116, 2, 2, 194, 36, 3, 2, 2, 2, 195, 196, 7, 107, 2, 2, 196, 197, 7, 112, 2, 2, 197, 38, 3, 2, 2, 2, 198, 199, 7, 114, 2, 2, 199, 200, 7, 119, 2, 2, 200, 201, 7, 118, 2, 2, 201, 40, 3, 2, 2, 2, 202, 203, 7, 104, 2, 2, 203, 204, 7, 119, 2, 2, 204, 205, 7, 112, 2, 2, 205, 42, 3, 2, 2, 2, 206, 207, 7, 116, 2, 2, 207, 208, 7, 103, 2, 2, 208, 209, 7, 118, 2, 2, 209, 210, 7, 119, 2, 2, 210, 211, 7, 116, 2, 2, 211, 212, 7, 112, 2, 2, 212, 44, 3, 2, 2, 2, 213, 214, 7, 101, 2, 2, 214, 215, 7, 99, 2, 2, 215, 216, 7, 110, 2, 2, 216, 217, 7, 110, 2, 2, 217, 46, 3, 2, 2, 2, 218, 222, 9, 5, 2, 2, 219, 221, 9, 6, 2, 2, 220, 219, 3, 2, 2, 2, 221, 224, 3, 2, 2, 2, 222, 220, 3, 2, 2, 2, 222, 223, 3, 2, 2, 2, 223, 48, 3, 2, 2, 2, 224, 222, 3, 2, 2, 2, 225, 226, 7, 42, 2, 2, 226, 50, 3, 2, 2, 2, 227, 228, 7, 43, 2, 2, 228, 52, 3, 2, 2, 2, 229, 230, 7, 93, 2, 2, 230, 54, 3, 2, 2, 2, 231, 232, 7, 95, 2, 2, 232, 56, 3, 2, 2, 2, 233, 234, 7, 125, 2, 2, 234, 58, 3, 2, 2, 2, 235, 236, 7, 127, 2, 2, 236, 60, 3, 2, 2, 2, 237, 238, 7, 46, 2, 2, 238, 62, 3, 2, 2, 2, 239, 240, 7, 61, 2, 2, 240, 64, 3, 2, 2, 2, 241, 246, 7, 63, 2, 2, 242, 243, 7, 228, 2, 2, 243, 244, 7, 8226, 2, 2, 244, 246, 7, 65535, 2, 2, 245, 241, 3, 2, 2, 2, 245, 242, 3, 2, 2, 2, 246, 66, 3, 2, 2, 2, 247, 248, 7, 63, 2, 2, 248, 249, 7, 63, 2, 2, 249, 68, 3, 2, 2, 2, 250, 251, 7, 35, 2, 2, 251, 256, 7, 63, 2, 2, 252, 253, 7, 228, 2, 2, 253, 254, 7, 8242, 2, 2, 254, 256, 7, 162, 2, 2, 255, 250, 3, 2, 2, 2, 255, 252, 3, 2, 2, 2, 256, 70, 3, 2, 2, 2, 257, 258, 7, 62, 2, 2, 258, 72, 3, 2, 2, 2, 259, 260, 7, 62, 2, 2, 260, 265, 7, 63, 2, 2, 261, 262, 7, 228, 2, 2, 262, 263, 7, 8242, 2, 2, 263, 265, 7, 166, 2, 2, 264, 259, 3, 2, 2, 2, 264, 261, 3, 2, 2, 2, 265, 74, 3, 2, 2, 2, 266, 267, 7, 64, 2, 2, 267, 76, 3, 2, 2, 2, 268, 269, 7, 64, 2, 2, 269, 274, 7, 63, 2, 2, 270, 271, 7, 228, 2, 2, 271, 272, 7, 8242, 2, 2, 272, 274, 7, 167, 2, 2, 273, 268, 3, 2, 2, 2, 273, 270, 3, 2, 2, 2, 274, 78, 3, 2, 2, 2, 275, 276, 7, 40, 2, 2, 276, 277, 7, 40, 2, 2, 277, 80, 3, 2, 2, 2, 278, 279, 7, 126, 2, 2, 279, 280, 7, 126, 2, 2, 280, 82, 3, 2, 2, 2, 281, 282, 7, 45, 2, 2, 282, 84, 3, 2, 2, 2, 283, 284, 7, 47, 2, 2, 284, 86, 3, 2, 2, 2, 285, 286, 7, 44, 2, 2, 286, 88, 3, 2, 2, 2, 287, 288, 7, 49, 2, 2, 288, 90, 3, 2, 2, 2, 289, 290, 7, 39, 2, 2, 290, 92, 3, 2, 2, 2, 291, 295, 7, 35, 2, 2, 292, 293, 7, 196, 2, 2, 293, 295, 7, 174, 2, 2, 294, 291, 3, 2, 2, 2, 294, 292, 3, 2, 2, 2, 295, 94, 3, 2, 2, 2, 14, 2, 101, 111, 124, 130, 132, 222, 245, 255, 264, 273, 294, 3, 2, 3, 2]

0 comments on commit 6fa7228

Please sign in to comment.