Skip to content

Commit

Permalink
Merge pull request #156 from ortus-boxlang/development
Browse files Browse the repository at this point in the history
beta26
  • Loading branch information
lmajano authored Jan 17, 2025
2 parents 2ba1ba4 + 24f3343 commit b57de01
Show file tree
Hide file tree
Showing 359 changed files with 13,446 additions and 3,442 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4


- name: Setup Java
uses: actions/setup-java@v4
with:
Expand All @@ -52,8 +53,16 @@ jobs:
# mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} -e 'CREATE DATABASE mementifier;'
# mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} < test-harness/tests/resources/coolblog.sql

#- name: Setup CommandBox CLI
# uses: Ortus-Solutions/setup-commandbox@v2.0.1
- name: Setup CommandBox CLI Linux
if: ${{ matrix.os != 'windows-latest' }}
uses: Ortus-Solutions/setup-commandbox@v2.0.1

- name: Setup CommandBox CLI Windows
if: ${{ matrix.os == 'windows-latest' }}
run: choco install commandbox

- name: Install TestBox
run: box install testbox@be src/test/resources --verbose --noSave

# Not Needed in this module
#- name: Setup Environment For Testing Process
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ derby.log

src/test/java/ortus/boxlang/compiler/Precompiled.bx
src/test/java/ortus/boxlang/compiler/Precompiled.bxs
/src/test/resources/testbox
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ plugins {
id "application"
id 'antlr'
// For source code formatting
id "com.diffplug.spotless" version "6.25.0"
id "com.diffplug.spotless" version "7.0.1"
// For building shadow jars with jdk 17 ONLY
//id 'com.github.johnrengelman.shadow' version '8.1.1'
// For building shadow jars using JDK 21 +, they had to fork
Expand Down Expand Up @@ -109,12 +109,12 @@ dependencies {
// https://mvnrepository.com/artifact/commons-io/commons-io
implementation "commons-io:commons-io:2.18.0"
// https://mvnrepository.com/artifact/com.github.javaparser/javaparser-symbol-solver-core
implementation 'com.github.javaparser:javaparser-symbol-solver-core:3.26.2'
implementation 'com.github.javaparser:javaparser-symbol-solver-core:3.26.3'
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
implementation 'org.apache.commons:commons-lang3:3.17.0'
// https://mvnrepository.com/artifact/org.apache.commons/commons-text
// Many of these classes ( e.g. StringEscapeUtils ) are currently deprecated in commons-lang and others will be moved in the future
implementation 'org.apache.commons:commons-text:1.12.0'
implementation 'org.apache.commons:commons-text:1.13.0'
// https://mvnrepository.com/artifact/org.apache.commons/commons-cli
implementation "commons-cli:commons-cli:1.9.0"
// https://mvnrepository.com/artifact/com.fasterxml.jackson.jr/jackson-jr-objects
Expand All @@ -128,15 +128,15 @@ dependencies {
// https://mvnrepository.com/artifact/org.slf4j/slf4j-api
implementation 'org.slf4j:slf4j-api:2.0.16'
// https://mvnrepository.com/artifact/ch.qos.logback/logback-classic
implementation 'ch.qos.logback:logback-classic:1.5.12'
implementation 'ch.qos.logback:logback-classic:1.5.16'
// https://mvnrepository.com/artifact/com.zaxxer/HikariCP
implementation 'com.zaxxer:HikariCP:6.2.1'
// https://mvnrepository.com/artifact/org.ow2.asm/asm-tree
implementation 'org.ow2.asm:asm-tree:9.7.1'
// https://mvnrepository.com/artifact/org.ow2.asm/asm-util
implementation 'org.ow2.asm:asm-util:9.7.1'
// https://mvnrepository.com/artifact/org.semver4j/semver4j
implementation 'org.semver4j:semver4j:5.4.1'
implementation 'org.semver4j:semver4j:5.5.0'

}

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Mon Dec 02 11:29:56 UTC 2024
#Fri Dec 13 21:14:22 UTC 2024
antlrVersion=4.13.1
jdkVersion=21
version=1.0.0-beta25
version=1.0.0-beta26
20 changes: 15 additions & 5 deletions src/main/antlr/BoxScriptGrammar.g4
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ identifier: IDENTIFIER | reservedKeyword
componentName
:
// Ask the component service if the component exists and verify that this context is actually a component.
{ isComponent(_input) }? identifier
//identifier
// { isComponent(_input) }? identifier
identifier
;

specialComponentName: TRANSACTION | LOCK | THREAD | ABORT | EXIT | PARAM
;

// These are reserved words in the lexer, but are allowed to be an indentifer (variable name, method name)
Expand Down Expand Up @@ -92,6 +95,11 @@ reservedKeyword
| VAR
| WHEN
| WHILE
| TRANSACTION
| LOCK
| THREAD
| ABORT
| EXIT
;

reservedOperators
Expand Down Expand Up @@ -313,9 +321,11 @@ not: NOT expression

// bx:http url="google.com" {}?
component
:
// COMPONENT_PREFIX componentName componentAttribute* (normalStatementBlock | SEMICOLON)
componentName componentAttribute* (normalStatementBlock | SEMICOLON)
: (( COMPONENT_PREFIX componentName) | specialComponentName) componentAttribute* (
normalStatementBlock
| SEMICOLON
)
//componentName componentAttribute* (normalStatementBlock | SEMICOLON)
;

componentAttribute: identifier ((EQUALSIGN | COLON) expression)?
Expand Down
141 changes: 73 additions & 68 deletions src/main/antlr/BoxScriptLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -19,74 +19,79 @@ options {
caseInsensitive = true;
}

ABSTRACT : 'ABSTRACT';
ANY : 'ANY';
ARRAY : 'ARRAY';
AS : 'AS';
ASSERT : 'ASSERT';
BOOLEAN : 'BOOLEAN';
BREAK : 'BREAK';
CASE : 'CASE';
CASTAS : 'CASTAS';
CATCH : 'CATCH';
CONTAIN : 'CONTAIN';
CONTAINS : 'CONTAINS';
CONTINUE : 'CONTINUE';
DEFAULT : 'DEFAULT';
DO : 'DO';
DOES : 'DOES';
ELIF : 'ELIF';
ELSE : 'ELSE';
EQV : 'EQV';
FALSE : 'FALSE';
FINAL : 'FINAL';
FINALLY : 'FINALLY';
FOR : 'FOR';
FUNCTION : 'FUNCTION';
GREATER : 'GREATER';
IF : 'IF';
IMP : 'IMP';
IMPORT : 'IMPORT';
IN : 'IN';
INCLUDE : 'INCLUDE';
INSTANCEOF : 'INSTANCEOF';
INTERFACE : 'INTERFACE';
IS : 'IS';
JAVA : 'JAVA';
LESS : 'LESS';
MESSAGE : 'MESSAGE';
MOD : 'MOD';
NEW : 'NEW';
NULL : 'NULL';
NUMERIC : 'NUMERIC';
PARAM : 'PARAM';
PACKAGE : 'PACKAGE';
PRIVATE : 'PRIVATE';
PROPERTY : 'PROPERTY';
PUBLIC : 'PUBLIC';
QUERY : 'QUERY';
REMOTE : 'REMOTE';
REQUIRED : 'REQUIRED';
RETHROW : 'RETHROW';
RETURN : 'RETURN';
REQUEST : 'REQUEST';
SERVER : 'SERVER';
SETTING : 'SETTING';
STATIC : 'STATIC';
STRING : 'STRING';
STRUCT : 'STRUCT';
SWITCH : 'SWITCH';
THAN : 'THAN';
THROW : 'THROW';
TO : 'TO';
TRUE : 'TRUE';
TRY : 'TRY';
TYPE : 'TYPE';
VAR : 'VAR';
VARIABLES : 'VARIABLES';
WHEN : 'WHEN';
WHILE : 'WHILE';
XOR : 'XOR';
ABORT : 'ABORT';
ABSTRACT : 'ABSTRACT';
ANY : 'ANY';
ARRAY : 'ARRAY';
AS : 'AS';
ASSERT : 'ASSERT';
BOOLEAN : 'BOOLEAN';
BREAK : 'BREAK';
CASE : 'CASE';
CASTAS : 'CASTAS';
CATCH : 'CATCH';
CONTAIN : 'CONTAIN';
CONTAINS : 'CONTAINS';
CONTINUE : 'CONTINUE';
DEFAULT : 'DEFAULT';
DO : 'DO';
DOES : 'DOES';
ELIF : 'ELIF';
ELSE : 'ELSE';
EQV : 'EQV';
EXIT : 'EXIT';
FALSE : 'FALSE';
FINAL : 'FINAL';
FINALLY : 'FINALLY';
FOR : 'FOR';
FUNCTION : 'FUNCTION';
GREATER : 'GREATER';
IF : 'IF';
IMP : 'IMP';
IMPORT : 'IMPORT';
IN : 'IN';
INCLUDE : 'INCLUDE';
INSTANCEOF : 'INSTANCEOF';
INTERFACE : 'INTERFACE';
IS : 'IS';
JAVA : 'JAVA';
LESS : 'LESS';
LOCK : 'LOCK';
MESSAGE : 'MESSAGE';
MOD : 'MOD';
NEW : 'NEW';
NULL : 'NULL';
NUMERIC : 'NUMERIC';
PARAM : 'PARAM';
PACKAGE : 'PACKAGE';
PRIVATE : 'PRIVATE';
PROPERTY : 'PROPERTY';
PUBLIC : 'PUBLIC';
QUERY : 'QUERY';
REMOTE : 'REMOTE';
REQUIRED : 'REQUIRED';
RETHROW : 'RETHROW';
RETURN : 'RETURN';
REQUEST : 'REQUEST';
SERVER : 'SERVER';
SETTING : 'SETTING';
STATIC : 'STATIC';
STRING : 'STRING';
STRUCT : 'STRUCT';
SWITCH : 'SWITCH';
THAN : 'THAN';
THREAD : 'THREAD';
THROW : 'THROW';
TO : 'TO';
TRANSACTION : 'TRANSACTION';
TRUE : 'TRUE';
TRY : 'TRY';
TYPE : 'TYPE';
VAR : 'VAR';
VARIABLES : 'VARIABLES';
WHEN : 'WHEN';
WHILE : 'WHILE';
XOR : 'XOR';

CLASS: 'CLASS';

Expand Down
1 change: 1 addition & 0 deletions src/main/antlr/CFGrammar.g4
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ structKey
| INTEGER_LITERAL
| ILLEGAL_IDENTIFIER
| fqn
| SWITCH
;

new: NEW preFix? (fqn | stringLiteral) LPAREN argumentList? RPAREN
Expand Down
Loading

0 comments on commit b57de01

Please sign in to comment.