├── class
├── README.md
├── .otl.sh.swp
├── Main.class
├── loop
│ ├── If.class
│ ├── For.class
│ ├── Loop.class
│ └── Bracket.class
├── etc
│ ├── TryCatch.class
│ └── TryCatchPrint.class
├── extend
│ ├── Class.class
│ └── ClassWork.class
├── item
│ ├── Setting.class
│ ├── VarCheck.class
│ ├── work
│ │ ├── Check.class
│ │ ├── LoopWork.class
│ │ ├── PrintWork.class
│ │ ├── VariableWork.class
│ │ └── ComparisonWork.class
│ ├── ActivityItem.class
│ ├── KeyValueItem.class
│ ├── LoopPosition.class
│ ├── ReservedWord.class
│ └── kind
│ │ ├── VarType.class
│ │ └── LoopType.class
├── math
│ ├── PRandom.class
│ └── MathWork.class
├── print
│ ├── Print.class
│ ├── Println.class
│ └── ScannerP.class
├── Variable
│ ├── FloatP.class
│ ├── LongP.class
│ ├── BooleanP.class
│ ├── DoubleP.class
│ ├── IntegerP.class
│ ├── StringP.class
│ ├── Variable.class
│ ├── CharacterP.class
│ └── SetVariable.class
├── Calculation
│ ├── Account.class
│ └── Calculation.class
└── comparison
│ ├── Comparison.class
│ ├── ComparisonBool.class
│ └── StringComparison.class
├── .gitignore
├── settings.gradle
├── src
└── main
│ └── java
│ ├── etc
│ ├── reader
│ │ ├── controller
│ │ │ ├── Class.java
│ │ │ └── FileRead.java
│ │ ├── define
│ │ │ ├── ClassWork.java
│ │ │ └── FileWork.java
│ │ ├── infor
│ │ │ ├── otl
│ │ │ │ ├── otl.json
│ │ │ │ ├── console.json
│ │ │ │ └── sing.json
│ │ │ └── poison
│ │ │ │ └── html.json
│ │ ├── RunOTL.java
│ │ └── ReadJSON.java
│ ├── Poison.json
│ └── OTLanguage.json
│ ├── http
│ ├── define
│ │ └── HttpMethodType.java
│ ├── model
│ │ ├── HttpWork.java
│ │ ├── HttpMoveWork.java
│ │ └── HttpCreateWork.java
│ ├── controller
│ │ ├── db
│ │ │ ├── define
│ │ │ │ ├── DataBaseWork.java
│ │ │ │ ├── SelectWork.java
│ │ │ │ └── DBType.java
│ │ │ ├── controller
│ │ │ │ ├── sql
│ │ │ │ │ ├── DCL.java
│ │ │ │ │ ├── DDL.java
│ │ │ │ │ └── DML.java
│ │ │ │ ├── DatabaseCheck.java
│ │ │ │ └── pattern
│ │ │ │ │ ├── DataBaseShell.java
│ │ │ │ │ ├── DataBaseShellPattern1.java
│ │ │ │ │ └── DataBaseShellPattern2.java
│ │ │ └── DatabaseSetting.java
│ │ ├── create
│ │ │ └── CreateHTML.java
│ │ ├── move
│ │ │ ├── MoveGetHttp.java
│ │ │ └── MovePostHttp.java
│ │ ├── StartServer.java
│ │ ├── PortVariable.java
│ │ ├── HTMLVariable.java
│ │ └── HttpGetPost.java
│ ├── handler
│ │ ├── HandlerDao.java
│ │ ├── HttpGetHandler.java
│ │ ├── HttpPostHandler.java
│ │ └── UriParser.java
│ ├── server
│ │ ├── Server.java
│ │ ├── HttpServerManager.java
│ │ ├── CreateHTML.java
│ │ └── RootHandler.java
│ └── items
│ │ ├── HttpRepository.java
│ │ └── Color.java
│ ├── input
│ └── conroller
│ │ ├── MouseController.java
│ │ ├── mouse
│ │ ├── define
│ │ │ └── MousePositionWork.java
│ │ └── controller
│ │ │ ├── MousePositionY.java
│ │ │ ├── MousePositionXY.java
│ │ │ └── MousePositionX.java
│ │ ├── Mouse.java
│ │ ├── KeyboardController.java
│ │ └── KeyboardRepository.java
│ ├── origin
│ ├── variable
│ │ ├── define
│ │ │ ├── VariableKind.java
│ │ │ └── VariableType.java
│ │ ├── model
│ │ │ ├── VariableListWork.java
│ │ │ ├── VariableWork.java
│ │ │ └── Repository.java
│ │ └── controller
│ │ │ ├── list
│ │ │ └── ListVariable.java
│ │ │ ├── MakeArrayVariable.java
│ │ │ ├── GetVariable.java
│ │ │ ├── MakeListVariable.java
│ │ │ ├── MakeVariable.java
│ │ │ └── SetVariable.java
│ ├── exception
│ │ ├── IndexMessage.java
│ │ ├── ServerMessage.java
│ │ ├── RandomMessage.java
│ │ ├── DBMessage.java
│ │ ├── MatchMessage.java
│ │ ├── FileFailMessage.java
│ │ ├── DBException.java
│ │ ├── IndexException.java
│ │ ├── MatchException.java
│ │ ├── RandomException.java
│ │ ├── ServerException.java
│ │ ├── FileFailException.java
│ │ ├── VariableException.java
│ │ └── VariableMessage.java
│ ├── consol
│ │ ├── define
│ │ │ ├── PrintWork.java
│ │ │ └── PriorityPrintWork.java
│ │ └── controller
│ │ │ ├── ConsoleScanner.java
│ │ │ ├── Println.java
│ │ │ ├── PriorityPrint.java
│ │ │ ├── PriorityPrintln.java
│ │ │ └── Print.java
│ ├── thead
│ │ ├── model
│ │ │ └── ThreadWork.java
│ │ └── controller
│ │ │ └── Sleep.java
│ └── loop
│ │ ├── model
│ │ └── LoopWork.java
│ │ ├── controller
│ │ ├── If.java
│ │ ├── NewForEach.java
│ │ ├── For.java
│ │ └── ForEach.java
│ │ └── define
│ │ └── Bracket.java
│ ├── method
│ ├── define
│ │ └── MethodWork.java
│ └── controller
│ │ └── Method.java
│ ├── system
│ ├── work
│ │ ├── FinishWork.java
│ │ ├── SystemWork.java
│ │ └── ThreadWork.java
│ └── start
│ │ ├── Finish.java
│ │ ├── OSSetting.java
│ │ ├── keyword
│ │ ├── SpecialKeyword.java
│ │ └── KeyWordRepository.java
│ │ └── exception
│ │ ├── Sleep.java
│ │ └── TryCatch.java
│ ├── math
│ ├── model
│ │ ├── RandomWork.java
│ │ └── CalculationWork.java
│ └── controller
│ │ ├── random
│ │ ├── RandomBoolean.java
│ │ ├── RandomLong.java
│ │ ├── RandomFloat.java
│ │ ├── RandomDouble.java
│ │ └── RandomInteger.java
│ │ ├── StringCalculation.java
│ │ ├── NumberCalculation.java
│ │ └── Calculation.java
│ ├── custom
│ ├── registration
│ │ ├── define
│ │ │ └── RepositoryValue.java
│ │ └── controller
│ │ │ ├── DefineCustomClass.java
│ │ │ └── DefineMainMethod.java
│ ├── tool
│ │ ├── CustomSetVariable.java
│ │ └── CustomGetVariable.java
│ └── use
│ │ └── controller
│ │ ├── UseCustomVoid.java
│ │ ├── UseCustomClass.java
│ │ └── UseCustomString.java
│ ├── pattern
│ ├── MakePatternWork.java
│ └── MakePattern.java
│ ├── event
│ ├── db
│ │ ├── DBRepository.java
│ │ └── DBSetting.java
│ ├── Controller.java
│ └── list
│ │ └── ListSetting.java
│ └── Main.java
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── out
└── production
│ └── classes
│ ├── Main.class
│ ├── event
│ ├── Setting.class
│ ├── Controller.class
│ └── list
│ │ ├── ListSetting.class
│ │ ├── ListSetting$1.class
│ │ ├── ListSetting$2.class
│ │ └── ListSetting$3.class
│ ├── etc
│ └── reader
│ │ ├── RunOTL.class
│ │ └── ReadJSON.class
│ ├── http
│ ├── items
│ │ ├── Color.class
│ │ └── HttpRepository.class
│ ├── server
│ │ ├── Server.class
│ │ ├── CreateHTML.class
│ │ ├── RootHandler.class
│ │ └── HttpServerManager.class
│ ├── model
│ │ ├── HttpWork.class
│ │ ├── HttpMoveWork.class
│ │ └── HttpCreateWork.class
│ ├── handler
│ │ ├── UriParser.class
│ │ ├── HttpGetHandler.class
│ │ └── HttpPostHandler.class
│ ├── controller
│ │ ├── HTMLVariable.class
│ │ ├── HttpGetPost.class
│ │ ├── PortVariable.class
│ │ ├── StartServer.class
│ │ ├── create
│ │ │ └── CreateHTML.class
│ │ ├── db
│ │ │ ├── SQLiteSetting.class
│ │ │ └── DatabaseSetting.class
│ │ └── move
│ │ │ ├── MoveGetHttp.class
│ │ │ └── MovePostHttp.class
│ └── define
│ │ └── HttpMethodType.class
│ ├── pattern
│ ├── MakePattern.class
│ └── MakePatternWork.class
│ ├── math
│ ├── model
│ │ ├── RandomWork.class
│ │ └── CalculationWork.class
│ └── controller
│ │ ├── Calculation.class
│ │ ├── BoolCalculation.class
│ │ ├── NumberCalculation.class
│ │ ├── StringCalculation.class
│ │ └── random
│ │ ├── RandomLong.class
│ │ ├── RandomDouble.class
│ │ ├── RandomFloat.class
│ │ ├── RandomBoolean.class
│ │ └── RandomInteger.class
│ └── origin
│ ├── loop
│ ├── controller
│ │ ├── If.class
│ │ └── For.class
│ ├── define
│ │ └── Bracket.class
│ └── model
│ │ └── LoopWork.class
│ ├── exception
│ ├── DBException.class
│ ├── DBMessage.class
│ ├── MatchMessage.class
│ ├── RandomMessage.class
│ ├── ServerMessage.class
│ ├── FileFailMessage.class
│ ├── MatchException.class
│ ├── RandomException.class
│ ├── ServerException.class
│ ├── VariableMessage.class
│ ├── FileFailException.class
│ └── VariableException.class
│ ├── consol
│ ├── controller
│ │ ├── Print.class
│ │ ├── Println.class
│ │ ├── PriorityPrint.class
│ │ ├── ConsoleScanner.class
│ │ └── PriorityPrintln.class
│ └── define
│ │ ├── PrintWork.class
│ │ └── PriorityPrintWork.class
│ ├── thead
│ ├── controller
│ │ └── Sleep.class
│ └── model
│ │ └── ThreadWork.class
│ └── variable
│ ├── model
│ ├── Repository.class
│ ├── VariableWork.class
│ └── VariableListWork.class
│ ├── define
│ ├── VariableType.class
│ └── VariableCheck.class
│ └── controller
│ ├── GetVariable.class
│ ├── SetVariable.class
│ ├── MakeVariable.class
│ ├── MakeListVariable.class
│ ├── MakeArrayVariable.class
│ └── list
│ └── ListVariable.class
├── sub.html
├── .idea
├── vcs.xml
├── .gitignore
├── misc.xml
├── compiler.xml
├── gradle.xml
└── jarRepositories.xml
├── README.md
├── index.html
└── gradlew.bat
/class/README.md:
--------------------------------------------------------------------------------
1 | 클래스 생성
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Project exclude paths
2 | /.gradle/
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'OTLanguage-Shell'
2 |
3 |
--------------------------------------------------------------------------------
/class/.otl.sh.swp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/.otl.sh.swp
--------------------------------------------------------------------------------
/class/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/Main.class
--------------------------------------------------------------------------------
/class/loop/If.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/loop/If.class
--------------------------------------------------------------------------------
/class/loop/For.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/loop/For.class
--------------------------------------------------------------------------------
/class/loop/Loop.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/loop/Loop.class
--------------------------------------------------------------------------------
/class/etc/TryCatch.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/etc/TryCatch.class
--------------------------------------------------------------------------------
/class/extend/Class.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/extend/Class.class
--------------------------------------------------------------------------------
/class/item/Setting.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/item/Setting.class
--------------------------------------------------------------------------------
/class/loop/Bracket.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/loop/Bracket.class
--------------------------------------------------------------------------------
/class/math/PRandom.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/math/PRandom.class
--------------------------------------------------------------------------------
/class/print/Print.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/print/Print.class
--------------------------------------------------------------------------------
/class/Variable/FloatP.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/Variable/FloatP.class
--------------------------------------------------------------------------------
/class/Variable/LongP.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/Variable/LongP.class
--------------------------------------------------------------------------------
/class/item/VarCheck.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/item/VarCheck.class
--------------------------------------------------------------------------------
/class/item/work/Check.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/item/work/Check.class
--------------------------------------------------------------------------------
/class/math/MathWork.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/math/MathWork.class
--------------------------------------------------------------------------------
/class/print/Println.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/print/Println.class
--------------------------------------------------------------------------------
/class/print/ScannerP.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/print/ScannerP.class
--------------------------------------------------------------------------------
/class/Variable/BooleanP.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/Variable/BooleanP.class
--------------------------------------------------------------------------------
/class/Variable/DoubleP.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/Variable/DoubleP.class
--------------------------------------------------------------------------------
/class/Variable/IntegerP.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/Variable/IntegerP.class
--------------------------------------------------------------------------------
/class/Variable/StringP.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/Variable/StringP.class
--------------------------------------------------------------------------------
/class/Variable/Variable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/Variable/Variable.class
--------------------------------------------------------------------------------
/class/etc/TryCatchPrint.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/etc/TryCatchPrint.class
--------------------------------------------------------------------------------
/class/extend/ClassWork.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/extend/ClassWork.class
--------------------------------------------------------------------------------
/class/item/ActivityItem.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/item/ActivityItem.class
--------------------------------------------------------------------------------
/class/item/KeyValueItem.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/item/KeyValueItem.class
--------------------------------------------------------------------------------
/class/item/LoopPosition.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/item/LoopPosition.class
--------------------------------------------------------------------------------
/class/item/ReservedWord.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/item/ReservedWord.class
--------------------------------------------------------------------------------
/class/item/kind/VarType.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/item/kind/VarType.class
--------------------------------------------------------------------------------
/src/main/java/etc/reader/controller/Class.java:
--------------------------------------------------------------------------------
1 | package etc.reader.controller;
2 |
3 | public class Class {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/class/Calculation/Account.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/Calculation/Account.class
--------------------------------------------------------------------------------
/class/Variable/CharacterP.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/Variable/CharacterP.class
--------------------------------------------------------------------------------
/class/Variable/SetVariable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/Variable/SetVariable.class
--------------------------------------------------------------------------------
/class/item/kind/LoopType.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/item/kind/LoopType.class
--------------------------------------------------------------------------------
/class/item/work/LoopWork.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/item/work/LoopWork.class
--------------------------------------------------------------------------------
/class/item/work/PrintWork.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/item/work/PrintWork.class
--------------------------------------------------------------------------------
/class/comparison/Comparison.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/comparison/Comparison.class
--------------------------------------------------------------------------------
/class/item/work/VariableWork.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/item/work/VariableWork.class
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/out/production/classes/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/Main.class
--------------------------------------------------------------------------------
/src/main/java/http/define/HttpMethodType.java:
--------------------------------------------------------------------------------
1 | package http.define;
2 |
3 | public enum HttpMethodType {
4 | POST, GET
5 | }
6 |
--------------------------------------------------------------------------------
/src/main/java/input/conroller/MouseController.java:
--------------------------------------------------------------------------------
1 | package input.conroller;
2 |
3 | public class MouseController {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/class/Calculation/Calculation.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/Calculation/Calculation.class
--------------------------------------------------------------------------------
/class/comparison/ComparisonBool.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/comparison/ComparisonBool.class
--------------------------------------------------------------------------------
/class/item/work/ComparisonWork.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/item/work/ComparisonWork.class
--------------------------------------------------------------------------------
/class/comparison/StringComparison.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/class/comparison/StringComparison.class
--------------------------------------------------------------------------------
/out/production/classes/event/Setting.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/event/Setting.class
--------------------------------------------------------------------------------
/src/main/java/origin/variable/define/VariableKind.java:
--------------------------------------------------------------------------------
1 | package origin.variable.define;
2 |
3 | public enum VariableKind {
4 | ORIGIN, LIST
5 | }
6 |
--------------------------------------------------------------------------------
/out/production/classes/etc/reader/RunOTL.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/etc/reader/RunOTL.class
--------------------------------------------------------------------------------
/out/production/classes/event/Controller.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/event/Controller.class
--------------------------------------------------------------------------------
/out/production/classes/http/items/Color.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/http/items/Color.class
--------------------------------------------------------------------------------
/out/production/classes/http/server/Server.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/http/server/Server.class
--------------------------------------------------------------------------------
/src/main/java/etc/reader/define/ClassWork.java:
--------------------------------------------------------------------------------
1 | package etc.reader.define;
2 |
3 | public interface ClassWork {
4 | boolean check(String line);
5 | }
6 |
--------------------------------------------------------------------------------
/out/production/classes/etc/reader/ReadJSON.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/etc/reader/ReadJSON.class
--------------------------------------------------------------------------------
/out/production/classes/http/model/HttpWork.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/http/model/HttpWork.class
--------------------------------------------------------------------------------
/out/production/classes/pattern/MakePattern.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/pattern/MakePattern.class
--------------------------------------------------------------------------------
/out/production/classes/event/list/ListSetting.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/event/list/ListSetting.class
--------------------------------------------------------------------------------
/out/production/classes/http/handler/UriParser.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/http/handler/UriParser.class
--------------------------------------------------------------------------------
/out/production/classes/http/model/HttpMoveWork.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/http/model/HttpMoveWork.class
--------------------------------------------------------------------------------
/out/production/classes/http/server/CreateHTML.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/http/server/CreateHTML.class
--------------------------------------------------------------------------------
/out/production/classes/http/server/RootHandler.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/http/server/RootHandler.class
--------------------------------------------------------------------------------
/out/production/classes/math/model/RandomWork.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/math/model/RandomWork.class
--------------------------------------------------------------------------------
/out/production/classes/pattern/MakePatternWork.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/pattern/MakePatternWork.class
--------------------------------------------------------------------------------
/out/production/classes/event/list/ListSetting$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/event/list/ListSetting$1.class
--------------------------------------------------------------------------------
/out/production/classes/event/list/ListSetting$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/event/list/ListSetting$2.class
--------------------------------------------------------------------------------
/out/production/classes/event/list/ListSetting$3.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/event/list/ListSetting$3.class
--------------------------------------------------------------------------------
/out/production/classes/http/items/HttpRepository.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/http/items/HttpRepository.class
--------------------------------------------------------------------------------
/out/production/classes/http/model/HttpCreateWork.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/http/model/HttpCreateWork.class
--------------------------------------------------------------------------------
/out/production/classes/origin/loop/controller/If.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/loop/controller/If.class
--------------------------------------------------------------------------------
/src/main/java/method/define/MethodWork.java:
--------------------------------------------------------------------------------
1 | package method.define;
2 |
3 | public interface MethodWork {
4 | boolean check(String line);
5 | void start();
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/java/origin/exception/IndexMessage.java:
--------------------------------------------------------------------------------
1 | package origin.exception;
2 |
3 | public interface IndexMessage {
4 | String removeError = "삭제 할 수 없는 값입니다.";
5 | }
6 |
--------------------------------------------------------------------------------
/src/main/java/origin/exception/ServerMessage.java:
--------------------------------------------------------------------------------
1 | package origin.exception;
2 |
3 | public interface ServerMessage {
4 | String nullServer = "서버를 먼저 실행해주세요.";
5 | }
6 |
--------------------------------------------------------------------------------
/src/main/java/system/work/FinishWork.java:
--------------------------------------------------------------------------------
1 | package system.work;
2 |
3 | public interface FinishWork {
4 | boolean check(String line);
5 | void start();
6 | }
7 |
--------------------------------------------------------------------------------
/out/production/classes/http/controller/HTMLVariable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/http/controller/HTMLVariable.class
--------------------------------------------------------------------------------
/out/production/classes/http/controller/HttpGetPost.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/http/controller/HttpGetPost.class
--------------------------------------------------------------------------------
/out/production/classes/http/controller/PortVariable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/http/controller/PortVariable.class
--------------------------------------------------------------------------------
/out/production/classes/http/controller/StartServer.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/http/controller/StartServer.class
--------------------------------------------------------------------------------
/out/production/classes/http/define/HttpMethodType.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/http/define/HttpMethodType.class
--------------------------------------------------------------------------------
/out/production/classes/http/handler/HttpGetHandler.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/http/handler/HttpGetHandler.class
--------------------------------------------------------------------------------
/out/production/classes/http/handler/HttpPostHandler.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/http/handler/HttpPostHandler.class
--------------------------------------------------------------------------------
/out/production/classes/math/controller/Calculation.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/math/controller/Calculation.class
--------------------------------------------------------------------------------
/out/production/classes/math/model/CalculationWork.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/math/model/CalculationWork.class
--------------------------------------------------------------------------------
/out/production/classes/origin/exception/DBException.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/exception/DBException.class
--------------------------------------------------------------------------------
/out/production/classes/origin/exception/DBMessage.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/exception/DBMessage.class
--------------------------------------------------------------------------------
/out/production/classes/origin/loop/controller/For.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/loop/controller/For.class
--------------------------------------------------------------------------------
/out/production/classes/origin/loop/define/Bracket.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/loop/define/Bracket.class
--------------------------------------------------------------------------------
/out/production/classes/origin/loop/model/LoopWork.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/loop/model/LoopWork.class
--------------------------------------------------------------------------------
/src/main/java/http/model/HttpWork.java:
--------------------------------------------------------------------------------
1 | package http.model;
2 |
3 | public interface HttpWork {
4 | boolean check(String line);
5 | void start(String line);
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/java/origin/exception/RandomMessage.java:
--------------------------------------------------------------------------------
1 | package origin.exception;
2 |
3 | public interface RandomMessage {
4 | String randomSame = "같은 값을 사용할 수 없습니다.";
5 | }
6 |
--------------------------------------------------------------------------------
/out/production/classes/http/server/HttpServerManager.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/http/server/HttpServerManager.class
--------------------------------------------------------------------------------
/out/production/classes/origin/consol/controller/Print.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/consol/controller/Print.class
--------------------------------------------------------------------------------
/out/production/classes/origin/consol/define/PrintWork.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/consol/define/PrintWork.class
--------------------------------------------------------------------------------
/out/production/classes/origin/exception/MatchMessage.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/exception/MatchMessage.class
--------------------------------------------------------------------------------
/out/production/classes/origin/exception/RandomMessage.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/exception/RandomMessage.class
--------------------------------------------------------------------------------
/out/production/classes/origin/exception/ServerMessage.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/exception/ServerMessage.class
--------------------------------------------------------------------------------
/out/production/classes/origin/thead/controller/Sleep.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/thead/controller/Sleep.class
--------------------------------------------------------------------------------
/out/production/classes/origin/thead/model/ThreadWork.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/thead/model/ThreadWork.class
--------------------------------------------------------------------------------
/src/main/java/http/model/HttpMoveWork.java:
--------------------------------------------------------------------------------
1 | package http.model;
2 |
3 | public interface HttpMoveWork {
4 | boolean check(String line);
5 | void move(String line);
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/java/math/model/RandomWork.java:
--------------------------------------------------------------------------------
1 | package math.model;
2 |
3 | public interface RandomWork {
4 | boolean check(String line);
5 | String start(String line);
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/java/system/work/SystemWork.java:
--------------------------------------------------------------------------------
1 | package system.work;
2 |
3 | public interface SystemWork {
4 | boolean check(String line);
5 | void start(String line);
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/java/system/work/ThreadWork.java:
--------------------------------------------------------------------------------
1 | package system.work;
2 |
3 | public interface ThreadWork {
4 | boolean check(String line);
5 | void start(String line);
6 | }
7 |
--------------------------------------------------------------------------------
/out/production/classes/http/controller/create/CreateHTML.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/http/controller/create/CreateHTML.class
--------------------------------------------------------------------------------
/out/production/classes/http/controller/db/SQLiteSetting.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/http/controller/db/SQLiteSetting.class
--------------------------------------------------------------------------------
/out/production/classes/http/controller/move/MoveGetHttp.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/http/controller/move/MoveGetHttp.class
--------------------------------------------------------------------------------
/out/production/classes/http/controller/move/MovePostHttp.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/http/controller/move/MovePostHttp.class
--------------------------------------------------------------------------------
/out/production/classes/math/controller/BoolCalculation.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/math/controller/BoolCalculation.class
--------------------------------------------------------------------------------
/out/production/classes/math/controller/NumberCalculation.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/math/controller/NumberCalculation.class
--------------------------------------------------------------------------------
/out/production/classes/math/controller/StringCalculation.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/math/controller/StringCalculation.class
--------------------------------------------------------------------------------
/out/production/classes/math/controller/random/RandomLong.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/math/controller/random/RandomLong.class
--------------------------------------------------------------------------------
/out/production/classes/origin/consol/controller/Println.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/consol/controller/Println.class
--------------------------------------------------------------------------------
/out/production/classes/origin/exception/FileFailMessage.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/exception/FileFailMessage.class
--------------------------------------------------------------------------------
/out/production/classes/origin/exception/MatchException.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/exception/MatchException.class
--------------------------------------------------------------------------------
/out/production/classes/origin/exception/RandomException.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/exception/RandomException.class
--------------------------------------------------------------------------------
/out/production/classes/origin/exception/ServerException.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/exception/ServerException.class
--------------------------------------------------------------------------------
/out/production/classes/origin/exception/VariableMessage.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/exception/VariableMessage.class
--------------------------------------------------------------------------------
/out/production/classes/origin/variable/model/Repository.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/variable/model/Repository.class
--------------------------------------------------------------------------------
/src/main/java/etc/reader/define/FileWork.java:
--------------------------------------------------------------------------------
1 | package etc.reader.define;
2 |
3 | public interface FileWork {
4 | boolean check(String line);
5 | void start(String line);
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/java/http/model/HttpCreateWork.java:
--------------------------------------------------------------------------------
1 | package http.model;
2 |
3 | public interface HttpCreateWork {
4 | boolean check(String line);
5 | void start(String line);
6 | }
7 |
--------------------------------------------------------------------------------
/out/production/classes/http/controller/db/DatabaseSetting.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/http/controller/db/DatabaseSetting.class
--------------------------------------------------------------------------------
/out/production/classes/math/controller/random/RandomDouble.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/math/controller/random/RandomDouble.class
--------------------------------------------------------------------------------
/out/production/classes/math/controller/random/RandomFloat.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/math/controller/random/RandomFloat.class
--------------------------------------------------------------------------------
/out/production/classes/origin/exception/FileFailException.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/exception/FileFailException.class
--------------------------------------------------------------------------------
/out/production/classes/origin/exception/VariableException.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/exception/VariableException.class
--------------------------------------------------------------------------------
/out/production/classes/origin/variable/define/VariableType.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/variable/define/VariableType.class
--------------------------------------------------------------------------------
/out/production/classes/origin/variable/model/VariableWork.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/variable/model/VariableWork.class
--------------------------------------------------------------------------------
/src/main/java/math/model/CalculationWork.java:
--------------------------------------------------------------------------------
1 | package math.model;
2 |
3 | public interface CalculationWork {
4 | boolean check(String line);
5 | String start(String line);
6 | }
7 |
--------------------------------------------------------------------------------
/out/production/classes/math/controller/random/RandomBoolean.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/math/controller/random/RandomBoolean.class
--------------------------------------------------------------------------------
/out/production/classes/math/controller/random/RandomInteger.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/math/controller/random/RandomInteger.class
--------------------------------------------------------------------------------
/out/production/classes/origin/consol/controller/PriorityPrint.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/consol/controller/PriorityPrint.class
--------------------------------------------------------------------------------
/out/production/classes/origin/consol/define/PriorityPrintWork.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/consol/define/PriorityPrintWork.class
--------------------------------------------------------------------------------
/out/production/classes/origin/variable/controller/GetVariable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/variable/controller/GetVariable.class
--------------------------------------------------------------------------------
/out/production/classes/origin/variable/controller/SetVariable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/variable/controller/SetVariable.class
--------------------------------------------------------------------------------
/out/production/classes/origin/variable/define/VariableCheck.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/variable/define/VariableCheck.class
--------------------------------------------------------------------------------
/out/production/classes/origin/variable/model/VariableListWork.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/variable/model/VariableListWork.class
--------------------------------------------------------------------------------
/src/main/java/origin/consol/define/PrintWork.java:
--------------------------------------------------------------------------------
1 | package origin.consol.define;
2 |
3 | public interface PrintWork {
4 | boolean check(String line);
5 | void start(String line);
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/java/origin/thead/model/ThreadWork.java:
--------------------------------------------------------------------------------
1 | package origin.thead.model;
2 |
3 | public interface ThreadWork {
4 | boolean check(String line);
5 | void start(String line);
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/java/origin/variable/define/VariableType.java:
--------------------------------------------------------------------------------
1 | package origin.variable.define;
2 |
3 | public enum VariableType {
4 | Boolean, Character, Double, Float, Integer, Long, String
5 | }
6 |
--------------------------------------------------------------------------------
/out/production/classes/origin/consol/controller/ConsoleScanner.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/consol/controller/ConsoleScanner.class
--------------------------------------------------------------------------------
/out/production/classes/origin/consol/controller/PriorityPrintln.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/consol/controller/PriorityPrintln.class
--------------------------------------------------------------------------------
/out/production/classes/origin/variable/controller/MakeVariable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/variable/controller/MakeVariable.class
--------------------------------------------------------------------------------
/out/production/classes/origin/variable/controller/MakeListVariable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/variable/controller/MakeListVariable.class
--------------------------------------------------------------------------------
/sub.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Title
6 |
7 |
8 | 서브페이지에 오신걸 환영합니다.
9 |
10 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/out/production/classes/origin/variable/controller/MakeArrayVariable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/variable/controller/MakeArrayVariable.class
--------------------------------------------------------------------------------
/out/production/classes/origin/variable/controller/list/ListVariable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PersesTitan/OTLanguage-Shell/HEAD/out/production/classes/origin/variable/controller/list/ListVariable.class
--------------------------------------------------------------------------------
/src/main/java/http/controller/db/define/DataBaseWork.java:
--------------------------------------------------------------------------------
1 | package http.controller.db.define;
2 |
3 | public interface DataBaseWork {
4 | boolean check(String line);
5 | void start(String line);
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/java/http/controller/db/define/SelectWork.java:
--------------------------------------------------------------------------------
1 | package http.controller.db.define;
2 |
3 | public interface SelectWork {
4 | boolean check(String line);
5 | String start(String line);
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/java/origin/consol/define/PriorityPrintWork.java:
--------------------------------------------------------------------------------
1 | package origin.consol.define;
2 |
3 | public interface PriorityPrintWork {
4 | boolean check(String line);
5 | void start(String line);
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/java/origin/variable/model/VariableListWork.java:
--------------------------------------------------------------------------------
1 | package origin.variable.model;
2 |
3 | public interface VariableListWork {
4 | boolean check(String line);
5 | String start(String line);
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/java/custom/registration/define/RepositoryValue.java:
--------------------------------------------------------------------------------
1 | package custom.registration.define;
2 |
3 | import java.util.List;
4 |
5 | public record RepositoryValue(List varType, List values) { }
6 |
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Editor-based HTTP Client requests
5 | /httpRequests/
6 | # Datasource local storage ignored files
7 | /dataSources/
8 | /dataSources.local.xml
9 |
--------------------------------------------------------------------------------
/src/main/java/input/conroller/mouse/define/MousePositionWork.java:
--------------------------------------------------------------------------------
1 | package input.conroller.mouse.define;
2 |
3 | public interface MousePositionWork {
4 | boolean check(String line);
5 | String start(String line);
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/java/origin/exception/DBMessage.java:
--------------------------------------------------------------------------------
1 | package origin.exception;
2 |
3 | public interface DBMessage {
4 | String error = "디비생성에 실패하였습니다.";
5 | String noDataBase = "데이터베이스가 존재하지 않습니다. 데이터베이스를 먼저 생성해주세요.";
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/java/etc/Poison.json:
--------------------------------------------------------------------------------
1 | {
2 | "version" : "1.0.0",
3 | "founder" : "PersesTitan",
4 | "link" : "https://gthub.com/OTLanguage",
5 | "kind" : "Web Framework",
6 | "help" : [
7 | "<ㅇㅅㅇ> [변수명]:[초기값] = 웹 변수 등록"
8 | ]
9 | }
--------------------------------------------------------------------------------
/src/main/java/http/handler/HandlerDao.java:
--------------------------------------------------------------------------------
1 | package http.handler;
2 |
3 | import http.define.HttpMethodType;
4 |
5 | import java.util.Map;
6 |
7 | public record HandlerDao(String value, String path, Map parameters) {
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/pattern/MakePatternWork.java:
--------------------------------------------------------------------------------
1 | package pattern;
2 |
3 | import java.util.regex.Pattern;
4 |
5 | public interface MakePatternWork {
6 | boolean check(String line);
7 | Pattern getPattern();
8 | void start(String line);
9 | }
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/src/main/java/origin/exception/MatchMessage.java:
--------------------------------------------------------------------------------
1 | package origin.exception;
2 |
3 | public interface MatchMessage {
4 | String matchError = "괄호의 짝이 맞지 않습니다.";
5 | String boolError = "ㅇㅇ ㄴㄴ 문법이 오류가 발생하였습니다.";
6 | String grammarError = "문법 오류가 발생하였습니다.";
7 | }
8 |
--------------------------------------------------------------------------------
/src/main/java/origin/exception/FileFailMessage.java:
--------------------------------------------------------------------------------
1 | package origin.exception;
2 |
3 | public interface FileFailMessage {
4 | String doNotFindFile = "파일을 찾을 수 없습니다.";
5 | String doNotReadFile = "파일을 읽을 수 없습니다.";
6 | String notMatchExtension = "읽을 수 없는 확장자 입니다.";
7 | }
8 |
--------------------------------------------------------------------------------
/src/main/java/origin/variable/model/VariableWork.java:
--------------------------------------------------------------------------------
1 | package origin.variable.model;
2 |
3 | import java.util.Map;
4 | import java.util.Set;
5 |
6 | public interface VariableWork {
7 | boolean check(String line);
8 | void start(String line,
9 | Map> repository,
10 | Set set);
11 | }
12 |
--------------------------------------------------------------------------------
/src/main/java/http/controller/db/define/DBType.java:
--------------------------------------------------------------------------------
1 | package http.controller.db.define;
2 |
3 | public class DBType {
4 | public enum DDL {
5 | CREATE, ALTER, DROP
6 | }
7 |
8 | public enum DCL {
9 | GRANT, REVOKE, COMMIT, ROLLBACK
10 | }
11 |
12 | public enum DML {
13 | SELECT, INSERT, UPDATE, DELETE
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/java/event/db/DBRepository.java:
--------------------------------------------------------------------------------
1 | package event.db;
2 |
3 | import http.controller.db.define.DataBaseWork;
4 | import http.controller.db.define.SelectWork;
5 |
6 | import java.util.ArrayList;
7 | import java.util.List;
8 |
9 | public interface DBRepository {
10 | List dbWorks = new ArrayList<>();
11 | List selectWorks = new ArrayList<>();
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/src/main/java/etc/reader/infor/otl/otl.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "",
4 | "rescue": "",
5 | "grammar": "",
6 | "version": "",
7 | "explanation": "",
8 | "example": "",
9 | "print": ""
10 | },
11 | {
12 | "name": "",
13 | "rescue": "",
14 | "grammar": "",
15 | "version": "",
16 | "explanation": "",
17 | "example": "",
18 | "print": ""
19 | }
20 | ]
--------------------------------------------------------------------------------
/src/main/java/origin/exception/DBException.java:
--------------------------------------------------------------------------------
1 | package origin.exception;
2 |
3 | public class DBException extends RuntimeException {
4 | public DBException() {
5 | super();
6 | }
7 |
8 | public DBException(String message) {
9 | super(message);
10 | }
11 |
12 | public DBException(String message, Throwable cause) {
13 | super(message, cause);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # OTLanguage-Shell
2 | 다들 시간나실때 심심풀이로 한번 해보시는 건 어떤가요??
3 | ### 다운로드 (download)
4 | ```
5 | curl https://raw.githubusercontent.com/OTLanguage/.github/main/otlmake.sh | sh
6 | ```
7 |
8 | ### 링크 (link)
9 |
10 | - [Github](https://github.com/OTLanguage)
11 | - [Velog](https://velog.io/@persestitan/series/OTLanguage)
12 |
13 | ---
14 |
15 | ### 문법
16 |
17 | #### 변수
18 | - ㅇㅈㅇ [변수명]:[초기값]
19 | - ㅇㅉㅇ
20 | - ㅇㅂㅇ
21 |
--------------------------------------------------------------------------------
/src/main/java/method/controller/Method.java:
--------------------------------------------------------------------------------
1 | package method.controller;
2 |
3 | import method.define.MethodWork;
4 |
5 | import java.util.regex.Pattern;
6 |
7 | public record Method(Pattern pattern) implements MethodWork {
8 |
9 | @Override
10 | public boolean check(String line) {
11 | return pattern.matcher(line).find();
12 | }
13 |
14 | @Override
15 | public void start() {
16 |
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/main/java/etc/reader/RunOTL.java:
--------------------------------------------------------------------------------
1 | package etc.reader;
2 |
3 | import event.Setting;
4 | import origin.exception.FileFailException;
5 | import origin.exception.FileFailMessage;
6 |
7 | import java.io.File;
8 |
9 | public class RunOTL extends Setting {
10 |
11 | public void startOTL(String path) {
12 | if (!new File(path).canRead()) throw new FileFailException(FileFailMessage.doNotReadFile);
13 |
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/java/http/controller/db/controller/sql/DCL.java:
--------------------------------------------------------------------------------
1 | package http.controller.db.controller.sql;
2 |
3 | import http.items.Color;
4 |
5 | import java.sql.Connection;
6 | import java.sql.SQLException;
7 |
8 | public class DCL {
9 |
10 | public void commit(Connection con) throws SQLException {
11 | con.commit();
12 | }
13 |
14 | public void rollback(Connection con) throws SQLException {
15 | con.rollback();
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/main/java/origin/exception/IndexException.java:
--------------------------------------------------------------------------------
1 | package origin.exception;
2 |
3 | public class IndexException extends RuntimeException {
4 | public IndexException() {
5 | super();
6 | }
7 |
8 | public IndexException(String message) {
9 | super(message);
10 | }
11 |
12 | public IndexException(String message, Throwable cause) {
13 | super(message, cause);
14 | }
15 |
16 | public IndexException(Throwable cause) {
17 | super(cause);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/origin/exception/MatchException.java:
--------------------------------------------------------------------------------
1 | package origin.exception;
2 |
3 | public class MatchException extends RuntimeException {
4 |
5 | public MatchException() {
6 | super();
7 | }
8 |
9 | public MatchException(String message) {
10 | super(message);
11 | }
12 |
13 | public MatchException(String message, Throwable cause) {
14 | super(message, cause);
15 | }
16 |
17 | public MatchException(Throwable cause) {
18 | super(cause);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/main/java/origin/exception/RandomException.java:
--------------------------------------------------------------------------------
1 | package origin.exception;
2 |
3 | public class RandomException extends RuntimeException {
4 | public RandomException() {
5 | super();
6 | }
7 |
8 | public RandomException(String message) {
9 | super(message);
10 | }
11 |
12 | public RandomException(String message, Throwable cause) {
13 | super(message, cause);
14 | }
15 |
16 | public RandomException(Throwable cause) {
17 | super(cause);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/origin/exception/ServerException.java:
--------------------------------------------------------------------------------
1 | package origin.exception;
2 |
3 | public class ServerException extends RuntimeException {
4 | public ServerException() {
5 | super();
6 | }
7 |
8 | public ServerException(String message) {
9 | super(message);
10 | }
11 |
12 | public ServerException(String message, Throwable cause) {
13 | super(message, cause);
14 | }
15 |
16 | public ServerException(Throwable cause) {
17 | super(cause);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/origin/exception/FileFailException.java:
--------------------------------------------------------------------------------
1 | package origin.exception;
2 |
3 | public class FileFailException extends RuntimeException {
4 | public FileFailException() {
5 | super();
6 | }
7 |
8 | public FileFailException(String message) {
9 | super(message);
10 | }
11 |
12 | public FileFailException(String message, Throwable cause) {
13 | super(message, cause);
14 | }
15 |
16 | public FileFailException(Throwable cause) {
17 | super(cause);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/origin/exception/VariableException.java:
--------------------------------------------------------------------------------
1 | package origin.exception;
2 |
3 | public class VariableException extends RuntimeException {
4 |
5 | public VariableException() {
6 | super();
7 | }
8 |
9 | public VariableException(String message) {
10 | super(message);
11 | }
12 |
13 | public VariableException(String message, Throwable cause) {
14 | super(message, cause);
15 | }
16 |
17 | public VariableException(Throwable cause) {
18 | super(cause);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/main/java/system/start/Finish.java:
--------------------------------------------------------------------------------
1 | package system.start;
2 |
3 | import system.work.FinishWork;
4 |
5 | import java.util.regex.Pattern;
6 |
7 | public class Finish implements FinishWork {
8 | private final Pattern pattern;
9 |
10 | public Finish(String patternText) {
11 | this.pattern = Pattern.compile("^\\s*" + patternText);
12 | }
13 |
14 | @Override
15 | public boolean check(String line) {
16 | return pattern.matcher(line).find();
17 | }
18 |
19 | @Override
20 | public void start() {
21 | System.exit(0);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/etc/reader/infor/poison/html.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "웹 변수",
4 | "rescue": "<ㅇㅅㅇ>",
5 | "grammar": "<ㅇㅅㅇ> [변수명]:[초기값]",
6 | "version": "2.1.0",
7 | "explanation": "HTML 변수를 정의합니다.",
8 | "example": "<ㅇㅅㅇ> 변수:안녕하세요.
(HTML) <p>{{ :변수 }}</p>",
9 | "print": "안녕하세요."
10 | },
11 | {
12 | "name": "HTML 등록",
13 | "rescue": "[경로] <ㅇㅅㅇ< [HTML파일 경로]",
14 | "grammar": "<ㅇㅅㅇ<",
15 | "version": "2.1.0",
16 | "explanation": "HTML파일을 등록하는 합니다.",
17 | "example": "/ <ㅇㅅㅇ< index.html",
18 | "print": ""
19 | }
20 | ]
--------------------------------------------------------------------------------
/src/main/java/origin/variable/controller/list/ListVariable.java:
--------------------------------------------------------------------------------
1 | package origin.variable.controller.list;
2 |
3 | import origin.variable.model.VariableListWork;
4 |
5 | import java.util.regex.Pattern;
6 |
7 | public abstract class ListVariable implements VariableListWork {
8 | private final Pattern pattern;
9 |
10 | public ListVariable(Pattern pattern) {
11 | this.pattern = pattern;
12 | }
13 |
14 | @Override
15 | public boolean check(String line) {
16 | return pattern.matcher(line).find();
17 | }
18 |
19 | public abstract String start(String line);
20 | }
21 |
--------------------------------------------------------------------------------
/src/main/java/system/start/OSSetting.java:
--------------------------------------------------------------------------------
1 | package system.start;
2 |
3 | import java.util.Arrays;
4 | import java.util.HashMap;
5 | import java.util.Map;
6 | import java.util.Objects;
7 |
8 | public class OSSetting {
9 | public static void main(String[] args) {
10 | Map map = new HashMap<>();
11 | map.put("key", "a");
12 | System.out.println(map);
13 | System.out.println(Arrays.toString("클래스명~".split("~")));
14 | }
15 |
16 | // 슬래쉬 반환
17 | public static String sep() {
18 | return System.getProperty("file.separator");
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/main/java/origin/exception/VariableMessage.java:
--------------------------------------------------------------------------------
1 | package origin.exception;
2 |
3 | public interface VariableMessage {
4 | String typeMatchError = "변수 타입이 일치하지 않습니다.";
5 | String sameVariable = "은(는) 이미 존재하는 변수명 입니다.";
6 | String sameMethod = "은(는) 이미 존재하는 클래스명/메소드명 입니다.";
7 | String doNotFindClass = "은(는) 존재하지않는 클래스명 입니다.";
8 | String doNotFindMethod = "은(는) 존재하지않는 메소드명 입니다.";
9 | String doNotFind = "은(는) 정의되지 않은 변수 입니다.";
10 | String doNotDefine = "은(는) 정의 되지 않은 타입입니다.";
11 | String noHaveInitial = "초기값이 존재하지 않습니다.";
12 | String noHaveVarName = "변수명이 존재하지 않습니다.";
13 | }
14 |
--------------------------------------------------------------------------------
/src/main/java/system/start/keyword/SpecialKeyword.java:
--------------------------------------------------------------------------------
1 | package system.start.keyword;
2 |
3 | import system.work.SystemWork;
4 |
5 | import java.util.regex.Pattern;
6 |
7 | public abstract class SpecialKeyword implements SystemWork {
8 | private final Pattern pattern;
9 |
10 | public SpecialKeyword(String patternText) {
11 | this.pattern = Pattern.compile("^\\s*" + patternText + "\\s*$");
12 | }
13 |
14 | @Override
15 | public boolean check(String line) {
16 | return pattern.matcher(line).find();
17 | }
18 |
19 | @Override
20 | public abstract void start(String line);
21 | }
22 |
--------------------------------------------------------------------------------
/src/main/java/pattern/MakePattern.java:
--------------------------------------------------------------------------------
1 | package pattern;
2 |
3 | import java.util.regex.Pattern;
4 |
5 | public abstract class MakePattern implements MakePatternWork {
6 | private final Pattern pattern;
7 |
8 | public MakePattern(String pattern) {
9 | this.pattern = Pattern.compile(pattern);
10 | }
11 |
12 | @Override
13 | public boolean check(String line) {
14 | return pattern.matcher(line).find();
15 | }
16 |
17 | @Override
18 | public Pattern getPattern() {
19 | return pattern;
20 | }
21 |
22 | @Override
23 | public abstract void start(String line);
24 | }
25 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Title
6 |
7 |
8 | 테스트
9 | {{:aaa}}
10 | 서브페이지로 가는 링크
11 |
16 |
17 |
22 |
23 |
--------------------------------------------------------------------------------
/src/main/java/http/controller/create/CreateHTML.java:
--------------------------------------------------------------------------------
1 | package http.controller.create;
2 |
3 | import pattern.MakePatternWork;
4 |
5 | import java.util.regex.Pattern;
6 |
7 | public abstract class CreateHTML implements MakePatternWork {
8 | private final Pattern pattern;
9 |
10 | public CreateHTML(String pattern) {
11 | this.pattern = Pattern.compile(pattern);
12 | }
13 |
14 | @Override
15 | public boolean check(String line) {
16 | return pattern.matcher(line).find();
17 | }
18 |
19 | @Override
20 | public Pattern getPattern() {
21 | return pattern;
22 | }
23 |
24 | @Override
25 | public abstract void start(String line);
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/http/controller/db/controller/sql/DDL.java:
--------------------------------------------------------------------------------
1 | package http.controller.db.controller.sql;
2 |
3 | import http.items.Color;
4 |
5 | import java.sql.Connection;
6 | import java.sql.SQLException;
7 |
8 | public class DDL {
9 |
10 | public void create(Connection con, String sql) throws SQLException {
11 | var stat = con.createStatement();
12 | stat.execute(sql);
13 | }
14 |
15 | public void alter(Connection con, String sql) throws SQLException {
16 | var stat = con.createStatement();
17 | stat.execute(sql);
18 | }
19 |
20 | public void drop(Connection con, String sql) throws SQLException {
21 | var stat = con.createStatement();
22 | stat.execute(sql);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
18 |
19 |
--------------------------------------------------------------------------------
/src/main/java/origin/consol/controller/ConsoleScanner.java:
--------------------------------------------------------------------------------
1 | package origin.consol.controller;
2 |
3 | import java.util.Scanner;
4 | import java.util.regex.Pattern;
5 |
6 | public class ConsoleScanner {
7 | private final String patternText;
8 | private final Pattern pattern;
9 | private final Scanner scanner = new Scanner(System.in);
10 |
11 | public ConsoleScanner(String patternText) {
12 | this.patternText = ":" + patternText + "[ _]";
13 | pattern = Pattern.compile(this.patternText);
14 | }
15 |
16 | public boolean check(String line) {
17 | return pattern.matcher(line).find();
18 | }
19 |
20 | public String start(String line) {
21 | return line.replaceFirst(patternText, scanner.nextLine());
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/origin/variable/controller/MakeArrayVariable.java:
--------------------------------------------------------------------------------
1 | package origin.variable.controller;
2 |
3 | import origin.variable.model.VariableWork;
4 |
5 | import java.util.Map;
6 | import java.util.Set;
7 | import java.util.regex.Pattern;
8 |
9 | public class MakeArrayVariable implements VariableWork {
10 | Pattern pattern;
11 |
12 | public MakeArrayVariable(String pattern) {
13 | //ㅇㅅㅇ[10][13] 변수명:초기값
14 | this.pattern = Pattern.compile(pattern + "(\\[\\d])+ [ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9_-]+:");
15 | }
16 |
17 | @Override
18 | public boolean check(String line) {
19 | return false;
20 | }
21 |
22 | @Override
23 | public void start(String line, Map> repository, Set set) {
24 |
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/origin/thead/controller/Sleep.java:
--------------------------------------------------------------------------------
1 | package origin.thead.controller;
2 |
3 | import origin.thead.model.ThreadWork;
4 |
5 | import java.util.regex.Matcher;
6 | import java.util.regex.Pattern;
7 |
8 | public class Sleep implements ThreadWork {
9 | // private final String patternText = "^\\s*ㅡ_ㅡ\\s*\\d+";
10 | // private final Pattern pattern = Pattern.compile(patternText);
11 | private final Pattern pattern;
12 |
13 | public Sleep(String pattern) {
14 | this.pattern = Pattern.compile(pattern);
15 | }
16 |
17 | @Override
18 | public boolean check(String line) {
19 | return pattern.matcher(line).find();
20 | }
21 |
22 | @Override
23 | public void start(String line) {
24 | Matcher matcher = pattern.matcher(line);
25 |
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/origin/consol/controller/Println.java:
--------------------------------------------------------------------------------
1 | package origin.consol.controller;
2 |
3 | import origin.consol.define.PrintWork;
4 | import origin.variable.model.Repository;
5 |
6 | import java.util.regex.Pattern;
7 |
8 | public class Println implements PrintWork {
9 | private final String patternText;
10 | private final Pattern pattern;
11 |
12 | public Println(String patternText) {
13 | this.patternText = "(\\n|^)\\s*"+patternText+"($|\\s)";
14 | this.pattern = Pattern.compile(this.patternText);
15 | }
16 |
17 | @Override
18 | public boolean check(String line) {
19 | return pattern.matcher(line).find();
20 | }
21 |
22 | @Override
23 | public void start(String line) {
24 | System.out.println(line.replaceFirst(patternText, ""));
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/origin/consol/controller/PriorityPrint.java:
--------------------------------------------------------------------------------
1 | package origin.consol.controller;
2 |
3 | import origin.consol.define.PriorityPrintWork;
4 | import origin.variable.model.Repository;
5 |
6 | import java.util.regex.Pattern;
7 |
8 | public class PriorityPrint implements PriorityPrintWork {
9 | private final String PATTERN;
10 | private final Pattern pattern;
11 |
12 | public PriorityPrint(String patternText) {
13 | this.PATTERN = "^\\s*"+patternText+"(\\s|$)";
14 | this.pattern = Pattern.compile(this.PATTERN);
15 | }
16 |
17 | @Override
18 | public void start(String line) {
19 | System.out.print(line.replaceFirst(PATTERN, ""));
20 | }
21 |
22 | @Override
23 | public boolean check(String line) {
24 | return pattern.matcher(line).find();
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/origin/consol/controller/PriorityPrintln.java:
--------------------------------------------------------------------------------
1 | package origin.consol.controller;
2 |
3 | import origin.consol.define.PriorityPrintWork;
4 | import origin.variable.model.Repository;
5 |
6 | import java.util.regex.Pattern;
7 |
8 | public class PriorityPrintln implements PriorityPrintWork {
9 | private final String PATTERN;
10 | private final Pattern pattern;
11 |
12 | public PriorityPrintln(String patternText) {
13 | this.PATTERN = "^\\s*"+patternText+"(\\s|$)";
14 | this.pattern = Pattern.compile(PATTERN);
15 | }
16 |
17 | @Override
18 | public boolean check(String line) {
19 | return pattern.matcher(line).find();
20 | }
21 |
22 | @Override
23 | public void start(String line) {
24 | System.out.println(line.replaceFirst(PATTERN, ""));
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/origin/consol/controller/Print.java:
--------------------------------------------------------------------------------
1 | package origin.consol.controller;
2 |
3 | import origin.consol.define.PrintWork;
4 | import origin.variable.model.Repository;
5 |
6 | import java.util.regex.Pattern;
7 |
8 | public class Print implements PrintWork {
9 | private final String patternText;
10 | private final Pattern pattern;
11 |
12 | public Print(String patternText) {
13 | this.patternText = "^\\s*"+patternText+"($|\\s)";
14 | this.pattern = Pattern.compile(this.patternText);
15 | }
16 |
17 | @Override
18 | public boolean check(String line) {
19 | return pattern.matcher(line).find();
20 | }
21 |
22 | @Override
23 | public void start(String line) {
24 | //ㅅㅁㅅ 출력될 값 => 출력될 값
25 | System.out.print(line.replaceFirst(patternText, ""));
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/http/server/Server.java:
--------------------------------------------------------------------------------
1 | package http.server;
2 |
3 | import http.items.Color;
4 | import http.items.HttpRepository;
5 |
6 | public class Server implements HttpRepository {
7 | public static HttpServerManager httpServerManager;
8 |
9 | public Server() {
10 | httpServerManager = new HttpServerManager();
11 | httpServerManager.start();
12 | if (pathMap.isEmpty()) {
13 | System.out.printf("%s경로가 존재하지 않습니다.%s\n", Color.RED, Color.RESET);
14 | httpServerManager.stop();
15 | }
16 | }
17 |
18 | public Server(int port) {
19 | httpServerManager = new HttpServerManager(port);
20 | httpServerManager.start();
21 | if (pathMap.isEmpty()) {
22 | System.out.printf("%s경로가 존재하지 않습니다.%s\n", Color.RED, Color.RESET);
23 | httpServerManager.stop();
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/.idea/jarRepositories.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/main/java/system/start/exception/Sleep.java:
--------------------------------------------------------------------------------
1 | package system.start.exception;
2 |
3 | import system.work.ThreadWork;
4 |
5 | import java.util.StringTokenizer;
6 | import java.util.regex.Pattern;
7 |
8 | public class Sleep implements ThreadWork {
9 | private final Pattern pattern;
10 |
11 | //ㅡ_ㅡ 100.0
12 | public Sleep(String patternText) {
13 | this.pattern = Pattern.compile("^\\s*" + patternText + "\\s+\\d+\\s*$");
14 | }
15 |
16 | @Override
17 | public boolean check(String line) {
18 | return pattern.matcher(line).find();
19 | }
20 |
21 | @Override
22 | public void start(String line) {
23 | StringTokenizer tokenizer = new StringTokenizer(line);
24 | tokenizer.nextToken();
25 | long count = Long.parseLong(tokenizer.nextToken());
26 |
27 | try {
28 | Thread.sleep(count);
29 | } catch (InterruptedException ignored) {}
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/http/handler/HttpGetHandler.java:
--------------------------------------------------------------------------------
1 | package http.handler;
2 |
3 | import com.sun.net.httpserver.HttpExchange;
4 |
5 | import java.io.IOException;
6 | import java.util.HashMap;
7 | import java.util.Map;
8 |
9 | public class HttpGetHandler {
10 |
11 | public HandlerDao handle(HttpExchange exchange) throws IOException {
12 | Map parameters = new HashMap<>();
13 | var requestUri = exchange.getRequestURI();
14 | var query = requestUri.getRawQuery();
15 | var uriParser = new UriParser();
16 | uriParser.parsesQuery(query, parameters);
17 | //경로를 키 값으로 저장
18 | String path = exchange.getRequestURI().getPath(); // /sub
19 | // HttpRepository.GET.get(path).putAll(parameters);
20 |
21 | var response = new StringBuilder();
22 | parameters.forEach((key, value) -> response.append(key).append("=").append(value).append(" "));
23 | return new HandlerDao(response.toString(), path, parameters);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/http/controller/move/MoveGetHttp.java:
--------------------------------------------------------------------------------
1 | package http.controller.move;
2 |
3 | import http.items.HttpRepository;
4 | import http.model.HttpMoveWork;
5 |
6 | import java.util.regex.Matcher;
7 | import java.util.regex.Pattern;
8 |
9 | //페이지 이동 GET 등록
10 | public class MoveGetHttp implements HttpMoveWork, HttpRepository {
11 | //[API] <<ㅇㅅㅇ< [이동할 페이지]
12 | private final String patternText = "^\\s*\\S+\\s*<<ㅇㅅㅇ<\\s*\\S+";
13 | private final Pattern pattern = Pattern.compile(patternText);
14 |
15 | @Override
16 | public boolean check(String line) {
17 | return pattern.matcher(line).find();
18 | }
19 |
20 | @Override
21 | public void move(String line) {
22 | Matcher matcher = pattern.matcher(line);
23 | if (matcher.find()) {
24 | String[] texts = matcher.group().split("\\s*<<ㅇㅅㅇ<\\s*");
25 | String api = texts[0];
26 | String movePage = texts[1];
27 | // GetMove.put(api, movePage);
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/math/controller/random/RandomBoolean.java:
--------------------------------------------------------------------------------
1 | package math.controller.random;
2 |
3 | import math.model.RandomWork;
4 |
5 | import java.util.Random;
6 | import java.util.regex.Matcher;
7 | import java.util.regex.Pattern;
8 |
9 | public class RandomBoolean implements RandomWork {
10 | private final Random random = new Random();
11 | private final String patternText;
12 | private final Pattern pattern;
13 |
14 | public RandomBoolean(String patternText) {
15 | this.patternText = ":"+patternText+"[_ ]";
16 | this.pattern = Pattern.compile(this.patternText);
17 | }
18 |
19 | @Override
20 | public boolean check(String line) {
21 | return pattern.matcher(line).find();
22 | }
23 |
24 | @Override
25 | public String start(String line) {
26 | Matcher matcher = pattern.matcher(line);
27 | while (matcher.find())
28 | line = line.replaceFirst(patternText, random.nextBoolean() ? "ㅇㅇ" : "ㄴㄴ");
29 | return line;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/http/controller/move/MovePostHttp.java:
--------------------------------------------------------------------------------
1 | package http.controller.move;
2 |
3 | import http.items.HttpRepository;
4 | import http.model.HttpMoveWork;
5 |
6 | import java.util.regex.Matcher;
7 | import java.util.regex.Pattern;
8 |
9 | //페이지 이동 POST 등록
10 | public class MovePostHttp implements HttpMoveWork, HttpRepository {
11 | //[API] <<ㅇㅅㅇ<< [이동할 페이지]
12 | private final String patternText = "^\\s*\\S+\\s*<<ㅇㅅㅇ<<\\s*\\S+";
13 | private final Pattern pattern = Pattern.compile(patternText);
14 |
15 | @Override
16 | public boolean check(String line) {
17 | return pattern.matcher(line).find();
18 | }
19 |
20 | @Override
21 | public void move(String line) {
22 | Matcher matcher = pattern.matcher(line);
23 | if (matcher.find()) {
24 | String[] texts = matcher.group().split("\\s*<<ㅇㅅㅇ<<\\s*");
25 | String api = texts[0];
26 | String movePage = texts[1];
27 | // PostMove.put(api, movePage);
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/http/controller/StartServer.java:
--------------------------------------------------------------------------------
1 | package http.controller;
2 |
3 | import http.items.HttpRepository;
4 | import http.model.HttpWork;
5 | import http.server.Server;
6 |
7 | import java.util.regex.Pattern;
8 |
9 | public class StartServer implements HttpRepository, HttpWork {
10 | //=[^ㅇㅅㅇ^]= [숫자]
11 | private final String serverPattern;
12 | private final Pattern pattern;
13 |
14 | public StartServer(String patternText) {
15 | this.serverPattern = "^\\s*"+patternText+"(\\s+[0-9]*)?";
16 | this.pattern = Pattern.compile(serverPattern);
17 | }
18 |
19 | @Override
20 | public boolean check(String line) {
21 | return pattern.matcher(line).find();
22 | }
23 |
24 | @Override
25 | public void start(String line) {
26 | HttpRepository.startSetting();
27 | if (Pattern.compile("[0-9]").matcher(line).find()) {
28 | int port = Integer.parseInt(line.replaceAll("[^0-9]", ""));
29 | new Server(port);
30 | } else new Server();
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/math/controller/StringCalculation.java:
--------------------------------------------------------------------------------
1 | package math.controller;
2 |
3 | import math.model.CalculationWork;
4 | import origin.variable.model.Repository;
5 |
6 | import java.util.regex.Matcher;
7 | import java.util.regex.Pattern;
8 |
9 | public class StringCalculation implements CalculationWork {
10 | private final String patternText = "\\[[\\s\\S]+]ㅇ=ㅇ\\[[\\s\\S]+]";
11 | private final Pattern pattern = Pattern.compile(patternText);
12 |
13 | @Override
14 | public boolean check(String line) {
15 | return pattern.matcher(line).find();
16 | }
17 |
18 | @Override
19 | public String start(String line) {
20 | Matcher matcher = pattern.matcher(line);
21 | while (matcher.find()) {
22 | //[값1]ㅇ=ㅇ[값2]
23 | String[] values = matcher.group().split("ㅇ=ㅇ");
24 | String value1 = values[0].substring(1, values[0].length()-1);
25 | String value2 = values[1].substring(1, values[1].length()-1);
26 | line = line.replaceFirst(patternText, value1.equals(value2)?"ㅇㅇ":"ㄴㄴ");
27 | }
28 | return line;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/origin/loop/model/LoopWork.java:
--------------------------------------------------------------------------------
1 | package origin.loop.model;
2 |
3 | import event.Setting;
4 | import origin.loop.controller.If;
5 |
6 | import java.util.regex.Pattern;
7 |
8 | public interface LoopWork {
9 | boolean check(String line);
10 | void start(String line);
11 | String getPattern();
12 |
13 | default boolean breakCheck(String line) {
14 | return Pattern.compile("^\\s*ㅂㅇㅂ\\s*$").matcher(line).find();
15 | }
16 |
17 | default boolean continueCheck(String line) {
18 | return Pattern.compile("^\\s*ㅋㅇㅋ\\s*$").matcher(line).find();
19 | }
20 |
21 | //break, continue 확인 하고 출력
22 | //실행까지 동작함
23 | default BreakContinue settingStart(String line) {
24 | line = Setting.startString(line);
25 | for (String l : If.lineStart(line).split("\\n")) {
26 | if (breakCheck(line)) return BreakContinue.Break;
27 | if (continueCheck(line)) return BreakContinue.Continue;
28 | Setting.start(l);
29 | }
30 | return BreakContinue.Etc;
31 | }
32 |
33 | enum BreakContinue {
34 | Break, Continue, Etc
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/input/conroller/mouse/controller/MousePositionY.java:
--------------------------------------------------------------------------------
1 | package input.conroller.mouse.controller;
2 |
3 | import input.conroller.mouse.define.MousePositionWork;
4 |
5 | import java.awt.*;
6 | import java.util.regex.Matcher;
7 | import java.util.regex.Pattern;
8 |
9 | public class MousePositionY implements MousePositionWork {
10 | private final String patternText; // :ㅁㅇㅁ~ㅅㄹㅅ(_ )
11 | private final Pattern pattern;
12 |
13 | public MousePositionY(String className, String patternText) {
14 | this.patternText = ":" + className + "~" + patternText + "[ _]";
15 | this.pattern = Pattern.compile(this.patternText);
16 | }
17 |
18 | @Override
19 | public boolean check(String line) {
20 | return pattern.matcher(line).find();
21 | }
22 |
23 | @Override
24 | public String start(String line) {
25 | Matcher matcher = pattern.matcher(line);
26 | while (matcher.find()) {
27 | var position = MouseInfo.getPointerInfo().getLocation().y;
28 | line = line.replaceFirst(this.patternText, String.valueOf(position));
29 | }
30 | return line;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/input/conroller/mouse/controller/MousePositionXY.java:
--------------------------------------------------------------------------------
1 | package input.conroller.mouse.controller;
2 |
3 | import input.conroller.mouse.define.MousePositionWork;
4 |
5 | import java.awt.*;
6 | import java.util.regex.Matcher;
7 | import java.util.regex.Pattern;
8 |
9 | public class MousePositionXY implements MousePositionWork {
10 | private final String patternText; // :ㅁㅇㅁ~ㄱㄹㅅ(_ )
11 | private final Pattern pattern;
12 |
13 | public MousePositionXY(String className, String patternText) {
14 | this.patternText = ":" + className + "~" + patternText + "[ _]";
15 | this.pattern = Pattern.compile(this.patternText);
16 | }
17 |
18 | @Override
19 | public boolean check(String line) {
20 | return pattern.matcher(line).find();
21 | }
22 |
23 | @Override
24 | public String start(String line) {
25 | Matcher matcher = pattern.matcher(line);
26 | while (matcher.find()) {
27 | var position = MouseInfo.getPointerInfo().getLocation().x;
28 | line = line.replaceFirst(this.patternText, String.valueOf(position));
29 | }
30 | return line;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/http/controller/db/controller/sql/DML.java:
--------------------------------------------------------------------------------
1 | package http.controller.db.controller.sql;
2 |
3 | import http.items.Color;
4 |
5 | import java.sql.Connection;
6 | import java.sql.SQLException;
7 | import java.util.ArrayList;
8 | import java.util.List;
9 |
10 | public class DML {
11 |
12 | public List select(Connection con, String sql, String values) throws SQLException {
13 | List list = new ArrayList<>();
14 | var stat= con.createStatement();
15 | var ret = stat.executeQuery(sql);
16 | while (ret.next()) list.add(ret.getString(values));
17 | return list;
18 | }
19 |
20 | public void insert(Connection con, String sql) throws SQLException {
21 | var stat = con.createStatement();
22 | stat.executeUpdate(sql);
23 | }
24 |
25 | public void update(Connection con, String sql) throws SQLException {
26 | var stat = con.createStatement();
27 | stat.executeUpdate(sql);
28 | }
29 |
30 | public void delete(Connection con, String sql) throws SQLException {
31 | var stat = con.createStatement();
32 | stat.executeUpdate(sql);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/http/controller/PortVariable.java:
--------------------------------------------------------------------------------
1 | package http.controller;
2 |
3 | import http.items.HttpRepository;
4 | import http.model.HttpWork;
5 | import origin.exception.VariableException;
6 | import origin.exception.VariableMessage;
7 | import origin.variable.model.Repository;
8 |
9 | import java.util.StringTokenizer;
10 | import java.util.regex.Pattern;
11 |
12 | public class PortVariable implements HttpWork, Repository {
13 | //=(^ㅇㅅㅇ^)= [키]:[값]
14 | private final String webVar = "^\\s*<ㅇㅅㅇ> +[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9_-]+:[\\s\\S]+";
15 | private final Pattern pattern = Pattern.compile(webVar);
16 |
17 | @Override
18 | public boolean check(String line) {
19 | return pattern.matcher(line).find();
20 | }
21 |
22 | //변수를 넣음
23 | @Override
24 | public void start(String line) {
25 | line = line.replaceFirst("^\\s*<ㅇㅅㅇ> +", "");
26 | StringTokenizer tokenizer = new StringTokenizer(line, ":");
27 | String key = tokenizer.nextToken().strip();
28 | String value = tokenizer.nextToken();
29 | if (set.contains(key)) throw new VariableException(key + VariableMessage.sameVariable);
30 | HttpRepository.partMap.put(key, value);
31 | set.add(key);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/http/controller/db/controller/DatabaseCheck.java:
--------------------------------------------------------------------------------
1 | package http.controller.db.controller;
2 |
3 | import http.controller.db.define.SelectWork;
4 |
5 | import java.util.regex.Matcher;
6 | import java.util.regex.Pattern;
7 |
8 | public class DatabaseCheck implements SelectWork {
9 | //?ㄷㅇㄷ?[Driver]
10 | private final String patternText = ":\\?ㄷㅇㄷ\\?\\[[^\\[\\]]+][ _]";
11 | private final Pattern pattern = Pattern.compile(patternText);
12 |
13 | @Override
14 | public boolean check(String line) {
15 | return pattern.matcher(line).find();
16 | }
17 |
18 | @Override
19 | public String start(String line) {
20 | Matcher matcher = pattern.matcher(line);
21 | while (matcher.find()) {
22 | String group = matcher.group().trim();
23 | String value = group.substring(7, group.length() - 2);
24 | line = line.replaceFirst(patternText, checkDriver(value)?" ㅇㅇ ":" ㄴㄴ ");
25 | }
26 | return line;
27 | }
28 |
29 | private boolean checkDriver(String driver) {
30 | try {
31 | Class.forName (driver);
32 | return true;
33 | } catch (ClassNotFoundException e) {
34 | return false;
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/system/start/exception/TryCatch.java:
--------------------------------------------------------------------------------
1 | package system.start.exception;
2 |
3 | import event.Setting;
4 | import origin.variable.model.Repository;
5 | import system.work.ThreadWork;
6 |
7 | import java.util.regex.Pattern;
8 |
9 | public class TryCatch implements ThreadWork {
10 | private final String patternText;
11 | private final Pattern pattern;
12 |
13 | public TryCatch(String patternText) {
14 | this.patternText = "^\\s*" + patternText + "\\s*";
15 | this.pattern = Pattern.compile(this.patternText);
16 | }
17 |
18 | @Override
19 | public boolean check(String line) {
20 | return pattern.matcher(line).find();
21 | }
22 |
23 | @Override
24 | public void start(String line) {
25 | line = line.replaceFirst(patternText, "");
26 | if (line.isBlank()) return;
27 | if (Repository.uuidMap.containsKey(line.trim())) {
28 | String total = Repository.uuidMap.get(line.trim());
29 | try {
30 | for (String lines : total.split("\\n")) Setting.start(lines);
31 | } catch (Exception ignored) {}
32 | } else {
33 | try {
34 | Setting.start(line);
35 | } catch (Exception ignored) {}
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/input/conroller/mouse/controller/MousePositionX.java:
--------------------------------------------------------------------------------
1 | package input.conroller.mouse.controller;
2 |
3 | import input.conroller.mouse.define.MousePositionWork;
4 |
5 | import java.awt.*;
6 | import java.util.regex.Matcher;
7 | import java.util.regex.Pattern;
8 |
9 | public class MousePositionX implements MousePositionWork {
10 | private final String patternText; // :ㅁㅇㅁ~ㄱㄹㄱ(_ )
11 | private final Pattern pattern;
12 |
13 | public MousePositionX(String className, String patternText) {
14 | this.patternText = ":" + className + "~" + patternText + "[ _]";
15 | this.pattern = Pattern.compile(this.patternText);
16 | }
17 |
18 | @Override
19 | public boolean check(String line) {
20 | return pattern.matcher(line).find();
21 | }
22 |
23 | @Override
24 | public String start(String line) {
25 | Matcher matcher = pattern.matcher(line);
26 | while (matcher.find()) {
27 | var positionX = MouseInfo.getPointerInfo().getLocation().x;
28 | var positionY = MouseInfo.getPointerInfo().getLocation().y;
29 | String builder = "[" + positionX + ", " + positionY + "]";
30 | line = line.replaceFirst(this.patternText, builder);
31 | }
32 | return line;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/http/handler/HttpPostHandler.java:
--------------------------------------------------------------------------------
1 | package http.handler;
2 |
3 | import com.sun.net.httpserver.HttpExchange;
4 | import event.Setting;
5 | import http.items.HttpRepository;
6 |
7 | import java.io.BufferedReader;
8 | import java.io.IOException;
9 | import java.io.InputStreamReader;
10 | import java.nio.charset.StandardCharsets;
11 | import java.util.HashMap;
12 | import java.util.Map;
13 |
14 | public class HttpPostHandler extends Setting implements HttpRepository {
15 | public HandlerDao handle(HttpExchange exchange) throws IOException {
16 | Map parameters = new HashMap<>();
17 | var isr = new InputStreamReader(exchange.getRequestBody(), StandardCharsets.UTF_8);
18 | var br = new BufferedReader(isr);
19 | var query = br.readLine();
20 | var uriParse = new UriParser();
21 | uriParse.parsesQuery(query, parameters);
22 | //경로를 키 값으로 저장
23 | String path = exchange.getRequestURI().getPath();
24 | // HttpRepository.POST.get(path).putAll(parameters);
25 |
26 | var response = new StringBuilder();
27 | parameters.forEach((key, value) -> response.append(key).append("=").append(value).append(" "));
28 | return new HandlerDao(response.toString(), path, parameters);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/etc/reader/infor/otl/console.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "강제 출력",
4 | "rescue": "!ㅅㅁㅅ!",
5 | "grammar": "!ㅅㅁㅅ! <출력내용>",
6 | "version": "2.0.0",
7 | "explanation": "출력을 강제로 출력 합니다.",
8 | "example": "ㅇㅁㅇ 변수:안녕
!ㅅㅁㅅ! :변수 녕하세
!ㅅㅁㅅ! 요",
9 | "print": ":변수 녕하세요"
10 | },
11 | {
12 | "name": "강제 출력 줄바꿈",
13 | "rescue": "!ㅆㅁㅆ!",
14 | "grammar": "!ㅆㅁㅆ! <출력내용>",
15 | "version": "2.0.0",
16 | "explanation": "줄바꿈이 있는 출력을 강제로 합니다.",
17 | "example": "ㅇㅁㅇ 변수:안녕
!ㅆㅁㅆ! :변수 녕하세
!ㅆㅁㅆ! 요",
18 | "print": ":변수 녕하세
요"
19 | },
20 | {
21 | "name": "출력",
22 | "rescue": "ㅅㅁㅅ",
23 | "grammar": "ㅅㅁㅅ <출력내용>",
24 | "version": "1.0.0",
25 | "explanation": "출력내용을 출력합니다.",
26 | "example": "ㅇㅁㅇ 변수:안녕
ㅅㅁㅅ :변수 녕하세
ㅅㅁㅅ 요",
27 | "print": "안녕하세요"
28 | },
29 | {
30 | "name": "출력 줄바꿈",
31 | "rescue": "ㅆㅁㅆ",
32 | "grammar": "ㅆㅁㅆ <출력내용>",
33 | "version": "1.0.0",
34 | "explanation": "줄바꿈이 존재하는 출력을 합니다.",
35 | "example": "ㅆㅁㅆ 안녕
ㅆㅁㅆ 하세요.",
36 | "print": "안녕
하세요."
37 | },
38 | {
39 | "name": "입력",
40 | "rescue": "ㅅㅇㅅ",
41 | "grammar": "ㅅㅇㅅ",
42 | "version": "1.0.0",
43 | "explanation": "라인 1줄의 입력을 받습니다.",
44 | "example": "ㅅㅁㅅ ㅅㅇㅅ
입력 : 안녕",
45 | "print": "안녕"
46 | }
47 | ]
--------------------------------------------------------------------------------
/src/main/java/input/conroller/Mouse.java:
--------------------------------------------------------------------------------
1 | package input.conroller;
2 |
3 | import java.awt.*;
4 | import java.awt.event.KeyEvent;
5 | import java.util.regex.Pattern;
6 |
7 | public class Mouse {
8 |
9 | public static void main(String[] args) {
10 |
11 | KeyboardController controller = new KeyboardController();
12 | controller.checkButton("a", "ag", "ag");
13 |
14 | System.out.println(MouseInfo.getPointerInfo().getLocation());
15 | // while (true) {
16 | //
17 | // System.out.println(KeyEvent.getKeyText(KeyEvent.VK_A));
18 | // try {
19 | // Thread.sleep(1000);
20 | // } catch (Exception ignored) {}
21 | // }
22 |
23 | // PointerInfo info = MouseInfo.getPointerInfo();
24 | // try {
25 | // Robot robot = new Robot();
26 | //
27 | // } catch (AWTException e) {
28 | // e.printStackTrace();
29 | // }
30 | //
31 | // while (true) {
32 | // info = MouseInfo.getPointerInfo();
33 | // System.out.println(info.getLocation().getX());
34 | // System.out.println(info.getLocation().getY());
35 | //
36 | // try {
37 | // Thread.sleep(1000);
38 | // } catch (Exception ignored) {}
39 | // }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/http/server/HttpServerManager.java:
--------------------------------------------------------------------------------
1 | package http.server;
2 |
3 | import com.sun.net.httpserver.HttpServer;
4 | import http.items.Color;
5 | import http.items.HttpRepository;
6 |
7 | import java.io.IOException;
8 | import java.net.InetSocketAddress;
9 | import java.util.HashMap;
10 |
11 | public class HttpServerManager implements HttpRepository {
12 | private static String DEF_HOST = "localhost";
13 | private static final int DEF_PORT = 9090;
14 | private HttpServer server;
15 |
16 | public HttpServerManager() {createServer(DEF_HOST, DEF_PORT);}
17 | public HttpServerManager(int port) {createServer(DEF_HOST, port);}
18 |
19 | public void start() {
20 | server.start();
21 | }
22 |
23 | public void stop() {
24 | server.stop(0);
25 | }
26 |
27 | public void setHost(String host) {
28 | DEF_HOST = host;
29 | }
30 |
31 | //서버 생성
32 | private void createServer(String host, int port) {
33 | System.out.printf("URL http://%s:%d/%n", host, port);
34 | try {
35 | server = HttpServer.create(new InetSocketAddress(host, port), 0);
36 | HttpRepository.pathMap.forEach((k, v) -> server.createContext(k, new RootHandler()));
37 | } catch (IOException e) {
38 | System.out.printf("%s서버 생성에 실패하였습니다.%s\n", Color.RED, Color.RESET);
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/http/handler/UriParser.java:
--------------------------------------------------------------------------------
1 | package http.handler;
2 |
3 | import java.io.UnsupportedEncodingException;
4 | import java.net.URLDecoder;
5 | import java.util.ArrayList;
6 | import java.util.List;
7 | import java.util.Map;
8 |
9 | public class UriParser {
10 | public void parsesQuery(String query, Map parameter) throws UnsupportedEncodingException {
11 | if (query != null) {
12 | for (String pair : query.split("&")) {
13 | var params = pair.split("=");
14 | String key = null;
15 | String value = null;
16 | if (params.length > 0) key = URLDecoder.decode(params[0], System.getProperty("file.encoding"));
17 | if (params.length > 1) value = URLDecoder.decode(params[1], System.getProperty("file.encoding"));
18 |
19 | if (parameter.containsKey(key)) {
20 | Object obj = parameter.get(key);
21 | if(obj instanceof List>) return;
22 | else if (obj instanceof String) {
23 | List values = new ArrayList<>();
24 | values.add((String) obj);
25 | values.add(value);
26 | parameter.put(key, values);
27 | }
28 | } else parameter.put(key, value);
29 | }
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/event/Controller.java:
--------------------------------------------------------------------------------
1 | package event;
2 |
3 | import custom.registration.controller.DefineCustomClass;
4 | import custom.registration.controller.DefineMainMethod;
5 | import custom.tool.CustomGetVariable;
6 | import custom.tool.CustomSetVariable;
7 | import event.list.ListSetting;
8 | import http.controller.HttpGetPost;
9 | import http.controller.PortVariable;
10 | import origin.consol.controller.ConsoleScanner;
11 | import origin.loop.define.Bracket;
12 | import origin.variable.controller.GetVariable;
13 | import origin.variable.controller.SetVariable;
14 | import system.start.Finish;
15 | import system.work.FinishWork;
16 |
17 | public interface Controller extends ListSetting {
18 | //변수
19 | GetVariable getVariable = new GetVariable();
20 | SetVariable setVariable = new SetVariable();
21 | ConsoleScanner consoleScanner = new ConsoleScanner("ㅅㅇㅅ"); //출력, 입력
22 | Bracket bracket = new Bracket(); //괄호를 토큰으로 변환
23 | PortVariable portVariable = new PortVariable(); //html 전용 변수
24 | HttpGetPost httpGetPost = new HttpGetPost(); //post, get 값 가져오기
25 | //시스템
26 | FinishWork finishWork = new Finish("ㄲㅌㄲ"); //강제 종료
27 | // 커스텀 클래스
28 | DefineCustomClass defineCustomClass = new DefineCustomClass("ㅋㅅㅋ");
29 | DefineMainMethod defineMainMethod = new DefineMainMethod("ㅁㅅㅁ");
30 | CustomGetVariable customGetVariableWork = new CustomGetVariable();
31 | CustomSetVariable customSetVariableWork = new CustomSetVariable();
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/http/controller/HTMLVariable.java:
--------------------------------------------------------------------------------
1 | package http.controller;
2 |
3 | import event.Setting;
4 | import http.items.Color;
5 | import http.items.HttpRepository;
6 | import http.model.HttpWork;
7 | import origin.exception.FileFailException;
8 | import origin.exception.FileFailMessage;
9 |
10 | import java.io.File;
11 | import java.util.regex.Pattern;
12 |
13 | public class HTMLVariable implements HttpWork, HttpRepository {
14 | //[url 경로] <ㅇㅅㅇ< [페이지 경로]
15 | private final String patternText;
16 | private final String webPage;
17 | private final Pattern pattern;
18 |
19 | public HTMLVariable(String patternText) {
20 | this.patternText = patternText;
21 | this.webPage = "^\\s*\\S+\\s+"+patternText+"\\s+\\S+";
22 | this.pattern = Pattern.compile(webPage);
23 | }
24 |
25 | @Override
26 | public boolean check(String line) {
27 | return pattern.matcher(line).find();
28 | }
29 |
30 | //페이지와 값 세팅
31 | @Override
32 | public void start(String line) {
33 | String[] values = line.split(this.patternText);
34 | String url = values[0].strip();
35 | String page = values[1].strip();
36 | String pages = Setting.path.equals("") ? page : Setting.path + "/" + page;
37 | if (!new File(pages).exists()) {
38 | System.out.printf("%s%s%s\n", Color.RED, FileFailMessage.doNotFindFile, Color.RESET);
39 | throw new FileFailException(FileFailMessage.doNotFindFile);
40 | }
41 | pathMap.put(url, pages);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/main/java/http/server/CreateHTML.java:
--------------------------------------------------------------------------------
1 | package http.server;
2 |
3 | import http.items.HttpRepository;
4 | import origin.variable.model.Repository;
5 |
6 | import java.io.BufferedReader;
7 | import java.io.FileReader;
8 | import java.nio.charset.StandardCharsets;
9 | import java.util.regex.Matcher;
10 | import java.util.regex.Pattern;
11 |
12 | public class CreateHTML implements HttpRepository, Repository {
13 | //{{ :[변수이름] }}
14 | private final String patternText = "\\{\\{\\s*:\\S+\\s*}}";
15 | private final Pattern pattern = Pattern.compile(patternText);
16 |
17 | //경로에 있는 html 을 읽음
18 | public String changeVariable(String path) {
19 | StringBuilder builder = new StringBuilder();
20 | try (BufferedReader reader = new BufferedReader(new FileReader(path, StandardCharsets.UTF_8))) {
21 | String text;
22 | while ((text = reader.readLine()) != null) {
23 | text = replaceVariable(text);
24 | builder.append(text).append("\n");
25 | }
26 | } catch (Exception ignored) {}
27 | return builder.toString();
28 | }
29 |
30 | //변수를 넣는 작업
31 | private String replaceVariable(String line) {
32 | Matcher matcher = pattern.matcher(line);
33 | if (matcher.find()) {
34 | String variable = matcher.group();
35 | String var = variable.substring(2, variable.length()-2).strip().substring(1);
36 | if (partMap.containsKey(var))
37 | line = line.replaceAll(patternText, partMap.get(var));
38 | }
39 | return line;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/etc/OTLanguage.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.1.0",
3 | "founder": "PersesTitan",
4 | "github-link": "https://github.com/OTLanguage",
5 | "kind": "Programming Language",
6 | "help": [
7 | "!ㅅㅁㅅ! [내용] = 내용을 강제 출력",
8 | "!ㅆㅁㅆ! [내용] = 내용을 강제 출력(줄바꿈)",
9 | "ㅅㅁㅅ [내용] = 내용을 출력",
10 | "ㅆㅁㅆ [내용] = 내용을 출력(줄바꿈)",
11 | "ㅅㅇㅅ = 입력을 받음",
12 | "ㅇㅈㅇ [변수명]:[초기값] = 정수형 변수를 선언",
13 | "ㅇㅉㅇ [변수명]:[초기값] = 쩡수형 변수를 선언",
14 | "ㅇㅂㅇ [변수명]:[초기값] = 블린형 변수를 선언",
15 | "ㅇㅁㅇ [변수명]:[초기값] = 문자형 변수를 선언",
16 | "ㅇㄱㅇ [변수명]:[초기값] = 글자형 변수를 선언",
17 | "ㅇㅅㅇ [변수명]:[초기값] = 실수형 변수를 선언",
18 | "ㅇㅆㅇ [변수명]:[초기값] = 씰수형 변수를 선언",
19 | "ㅇㅇ = 참",
20 | "ㄴㄴ = 거짓",
21 | "ㅇㄴ = not",
22 | "ㄸ = 또는(or)",
23 | "ㄲ = 그리고(and)",
24 | "[숫자]^[숫자]^[숫자] = for 문",
25 | "?ㅅ? [블린] = if 문",
26 | "ㅇ+ㅇ = 더하기",
27 | "ㅇ-ㅇ = 빼기",
28 | "ㅇ/ㅇ = 나누기",
29 | "ㅇ*ㅇ = 곱하기",
30 | "ㅇ%ㅇ = 나머지"
31 | ],
32 | "history": [
33 | {
34 | "2.1.0": [
35 | {
36 | "date": "2022-07-18",
37 | "add": [
38 | "리스트 추가 됨",
39 | "리스트 추가 기능 추가됨",
40 | "리스트 삭제 기능 추가됨",
41 | "리스트 값 가져오기 추가됨",
42 | "변수 가져오기 공백, 언더바(_) 허용"
43 | ]
44 | }
45 | ],
46 | "2.1.1": [
47 | {
48 | "date": "2022-07-18",
49 | "add": "리스트 배열 값 에러 확인 추가"
50 | }
51 | ],
52 | "2.2.1": [
53 | {
54 | "date": "2022-07-19",
55 | "add": [
56 | "리스트 변수, 일반 변수 영어로 허용",
57 | "foreach 추가 ([변수]^^[변수])"
58 | ]
59 | }
60 | ]
61 | }
62 | ]
63 | }
--------------------------------------------------------------------------------
/src/main/java/origin/variable/controller/GetVariable.java:
--------------------------------------------------------------------------------
1 | package origin.variable.controller;
2 |
3 | import http.items.HttpRepository;
4 | import origin.exception.MatchException;
5 | import origin.exception.MatchMessage;
6 | import origin.exception.VariableException;
7 | import origin.exception.VariableMessage;
8 | import origin.variable.model.Repository;
9 |
10 | import java.util.Map;
11 | import java.util.regex.Matcher;
12 | import java.util.regex.Pattern;
13 |
14 | //변수를 불러와서 대치하는 작업
15 | public class GetVariable {
16 | public static final String patternText = ":[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9_-]+[ _]"; //:변수명( )
17 | private final Pattern pattern = Pattern.compile(patternText);
18 |
19 | public boolean check(String line) {
20 | Pattern pattern = Pattern.compile("[^:]?"+patternText);
21 | return pattern.matcher(line).find();
22 | }
23 |
24 | public String start(String line, Map> repository) {
25 | Matcher matcher = pattern.matcher(line);
26 | while (matcher.find()) {
27 | String group = matcher.group();
28 | int pos = group.length();
29 | String key = group.substring(1, pos-1); //:변수명 => 변수명
30 | for (String keys : repository.keySet()) {
31 | if (repository.get(keys).containsKey(key))
32 | line = line.replaceAll(patternText, repository.get(keys).get(key).toString());
33 | if (HttpRepository.partMap.containsKey(key))
34 | line = line.replaceAll(patternText, HttpRepository.partMap.get(key));
35 | }
36 | }
37 | return line;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/input/conroller/KeyboardController.java:
--------------------------------------------------------------------------------
1 | package input.conroller;
2 |
3 | import java.awt.*;
4 | import java.util.ArrayList;
5 | import java.util.Arrays;
6 | import java.util.List;
7 | import java.util.Locale;
8 | import java.util.function.Predicate;
9 | import java.util.stream.Collectors;
10 |
11 | public class KeyboardController {
12 | public static Robot robot;
13 |
14 | public KeyboardController() {
15 | try {
16 | robot = new Robot();
17 | } catch (AWTException e) {
18 | robot = null;
19 | }
20 | }
21 |
22 | public boolean check(String line) {
23 | if (robot == null) return false;
24 | return false;
25 | }
26 |
27 | public void start() {
28 |
29 | }
30 |
31 | // (ex) Shift A, Ctrl C
32 | protected void checkButton(String...keys) {
33 | if (robot == null) {
34 | System.out.println("No have Keys");
35 | }
36 | List list = new ArrayList<>();
37 | for (String key : keys) {
38 | key = key.trim().toUpperCase(Locale.ROOT);
39 | if (!KeyboardRepository.keys.containsKey(key)) continue;
40 | list.add(KeyboardRepository.keys.get(key));
41 | }
42 |
43 | Arrays.stream(keys)
44 | .map(String::trim)
45 | .map(String::toUpperCase)
46 | .filter(KeyboardRepository.keys::containsKey)
47 | .map(KeyboardRepository.keys::get)
48 | .forEach(robot::keyPress);
49 |
50 | list.forEach(System.out::println);
51 | // list.forEach(robot::keyPress);
52 | // list.forEach(robot::keyRelease);
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/src/main/java/math/controller/random/RandomLong.java:
--------------------------------------------------------------------------------
1 | package math.controller.random;
2 |
3 | import math.model.RandomWork;
4 | import origin.exception.RandomException;
5 | import origin.exception.RandomMessage;
6 |
7 | import java.util.Random;
8 | import java.util.regex.Matcher;
9 | import java.util.regex.Pattern;
10 |
11 | public class RandomLong implements RandomWork {
12 | private final Random random = new Random();
13 | private final String patternText;
14 | private final Pattern pattern;
15 |
16 | public RandomLong(String patternText) {
17 | this.patternText = ":(\\d+\\s*"+patternText+"\\s*\\d+|"+patternText+")[_ ]";
18 | this.pattern = Pattern.compile(this.patternText);
19 | }
20 |
21 | @Override
22 | public boolean check(String line) {
23 | return pattern.matcher(line).find();
24 | }
25 |
26 | @Override
27 | public String start(String line) {
28 | Matcher matcher = pattern.matcher(line);
29 | while (matcher.find()) {
30 | String text = matcher.group();
31 | text = text.substring(1, text.length()-1);
32 | if (Pattern.compile("\\d").matcher(text).find()) {
33 | String[] values = text.split("@ㅉ@");
34 | long num1 = Long.parseLong(values[0].strip());
35 | long num2 = Long.parseLong(values[1].strip());
36 | if (num1 == num2) throw new RandomException(RandomMessage.randomSame);
37 | line = line.replaceFirst(patternText, Long.toString(random.nextLong(num1, num2)));
38 | } else line = line.replaceFirst(patternText, Long.toString(random.nextLong()));
39 | }
40 | return line;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/math/controller/random/RandomFloat.java:
--------------------------------------------------------------------------------
1 | package math.controller.random;
2 |
3 | import math.model.RandomWork;
4 | import origin.exception.RandomException;
5 | import origin.exception.RandomMessage;
6 |
7 | import java.util.Random;
8 | import java.util.regex.Matcher;
9 | import java.util.regex.Pattern;
10 |
11 | public class RandomFloat implements RandomWork {
12 | private final Random random = new Random();
13 | private final String patternText;
14 | private final Pattern pattern;
15 |
16 | public RandomFloat(String patternText) {
17 | this.patternText = ":((\\d+\\.\\d+)\\s*"+patternText+"\\s*(\\d+\\.\\d+)|"+patternText+")[_ ]";
18 | this.pattern = Pattern.compile(this.patternText);
19 | }
20 |
21 | @Override
22 | public boolean check(String line) {
23 | return pattern.matcher(line).find();
24 | }
25 |
26 | @Override
27 | public String start(String line) {
28 | Matcher matcher = pattern.matcher(line);
29 | while (matcher.find()) {
30 | String gr = matcher.group();
31 | gr = gr.substring(1, gr.length()-1);
32 | if (Pattern.compile("\\d").matcher(gr).find()) {
33 | var value = gr.split("@ㅅ@");
34 | float num1 = Float.parseFloat(value[0].strip());
35 | float num2 = Float.parseFloat(value[1].strip());
36 | if (num1 == num2) throw new RandomException(RandomMessage.randomSame);
37 | line = line.replaceFirst(patternText, Float.toString(random.nextFloat(num1, num2)));
38 | } else line = line.replaceFirst(patternText, Float.toString(random.nextFloat()));
39 | }
40 | return line;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/math/controller/random/RandomDouble.java:
--------------------------------------------------------------------------------
1 | package math.controller.random;
2 |
3 | import math.model.RandomWork;
4 | import origin.exception.RandomException;
5 | import origin.exception.RandomMessage;
6 |
7 | import java.util.Random;
8 | import java.util.regex.Matcher;
9 | import java.util.regex.Pattern;
10 |
11 | public class RandomDouble implements RandomWork {
12 | private final Random random = new Random();
13 | private final String patternText;
14 | private final Pattern pattern;
15 |
16 | public RandomDouble(String patternText) {
17 | this.patternText = ":((\\d+\\.\\d+)\\s*"+patternText+"\\s*(\\d+\\.\\d+)|"+patternText+")[_ ]";
18 | this.pattern = Pattern.compile(this.patternText);
19 | }
20 |
21 | @Override
22 | public boolean check(String line) {
23 | return pattern.matcher(line).find();
24 | }
25 |
26 | @Override
27 | public String start(String line) {
28 | Matcher matcher = pattern.matcher(line);
29 | while (matcher.find()) {
30 | String gr = matcher.group();
31 | gr = gr.substring(1, gr.length()-1);
32 | if (Pattern.compile("\\d").matcher(gr).find()) {
33 | var value = gr.split("@ㅆ@");
34 | double num1 = Double.parseDouble(value[0].strip());
35 | double num2 = Double.parseDouble(value[1].strip());
36 | if (num1 == num2) throw new RandomException(RandomMessage.randomSame);
37 | line = line.replaceFirst(patternText, Double.toString(random.nextDouble(num1, num2)));
38 | } else line = line.replaceFirst(patternText, Double.toString(random.nextDouble()));
39 | }
40 | return line;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/math/controller/random/RandomInteger.java:
--------------------------------------------------------------------------------
1 | package math.controller.random;
2 |
3 | import math.model.RandomWork;
4 | import origin.exception.RandomException;
5 | import origin.exception.RandomMessage;
6 |
7 | import java.util.Random;
8 | import java.util.regex.Matcher;
9 | import java.util.regex.Pattern;
10 |
11 | //정수 램던 생성
12 | public class RandomInteger implements RandomWork {
13 | private final Random random = new Random();
14 | private final String patternText;
15 | private final Pattern pattern;
16 |
17 | public RandomInteger(String patternText) {
18 | this.patternText = ":(\\d+\\s*"+patternText+"\\s*\\d+|"+patternText+")[ _]";
19 | this.pattern = Pattern.compile(this.patternText);
20 | }
21 |
22 | @Override
23 | public boolean check(String line) {
24 | return pattern.matcher(line).find();
25 | }
26 |
27 | @Override
28 | public String start(String line) {
29 | Matcher matcher = pattern.matcher(line);
30 | while (matcher.find()) {
31 | String text = matcher.group();
32 | text = text.substring(1, text.length()-1);
33 | if (Pattern.compile("\\d").matcher(text).find()) {
34 | String[] values = text.split("@ㅈ@");
35 | int num1 = Integer.parseInt(values[0].strip());
36 | int num2 = Integer.parseInt(values[1].strip());
37 | if (num1 == num2) throw new RandomException(RandomMessage.randomSame);
38 | line = line.replaceFirst(patternText, Integer.toString(random.nextInt(num1, num2)));
39 | } else line = line.replaceFirst(patternText, Integer.toString(random.nextInt()));
40 | }
41 | return line;
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/main/java/http/controller/db/controller/pattern/DataBaseShell.java:
--------------------------------------------------------------------------------
1 | package http.controller.db.controller.pattern;
2 |
3 | import event.db.DBSetting;
4 | import origin.exception.MatchException;
5 | import origin.exception.MatchMessage;
6 | import origin.loop.model.LoopWork;
7 |
8 | import java.sql.SQLException;
9 | import java.util.regex.Matcher;
10 | import java.util.regex.Pattern;
11 |
12 | //클래스 정의
13 | public abstract class DataBaseShell implements LoopWork {
14 | private final int count;
15 | private final String className;
16 | private final String patternText;
17 | private final Pattern pattern;
18 |
19 | public DataBaseShell(String className, int count) {
20 | this.count = count;
21 | this.className = className;
22 | patternText = "^\\s*" + className + "\\[[^\\[\\]]+]".repeat(Math.max(0, count));
23 | pattern = Pattern.compile(patternText);
24 | }
25 |
26 | @Override
27 | public boolean check(String line) {
28 | if (DBSetting.databaseSetting != null) return false;
29 | return pattern.matcher(line).find();
30 | }
31 |
32 | public String[] getValues(Matcher matcher) {
33 | if (matcher.find()) {
34 | String group = matcher.group().trim();
35 | String[] values = group
36 | .substring(className.length()+1, group.length()-1)
37 | .split("]\\[");
38 | if (values.length != count) throw new MatchException(MatchMessage.grammarError);
39 | else return values;
40 | }
41 | throw new MatchException(MatchMessage.grammarError);
42 | }
43 |
44 | @Override
45 | public abstract void start(String line);
46 |
47 | @Override
48 | public String getPattern() {
49 | return patternText;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/main/java/http/controller/HttpGetPost.java:
--------------------------------------------------------------------------------
1 | package http.controller;
2 |
3 | import http.items.HttpRepository;
4 | import origin.exception.MatchException;
5 | import origin.exception.MatchMessage;
6 | import origin.loop.model.LoopWork;
7 |
8 | import java.util.regex.Matcher;
9 | import java.util.regex.Pattern;
10 |
11 | //GET 과 POST 값 가져오는 작업
12 | public class HttpGetPost implements HttpRepository, LoopWork {
13 | //[경로] [POST,GET]>ㅇㅅㅇ>[name]
14 | //[POST,GET][경로]>ㅇㅅㅇ>[변수1:query1, 변수2:query2]
15 |
16 | // private final String patternText = "\\S+\\s+(POST|GET)\\s*>ㅇㅅㅇ>\\s*\\S+";
17 | private final String patternText = "^\\s*(POST|GET)\\s*\\S+\\s*>ㅇㅅㅇ>\\s*\\[([^\\[\\]:,]+:[^\\[\\]:,]+)+]";
18 | private final Pattern pattern = Pattern.compile(patternText);
19 |
20 | @Override
21 | public boolean check(String line) {
22 | return pattern.matcher(line).find();
23 | }
24 |
25 | @Override
26 | public void start(String line) {
27 | Matcher matcher = pattern.matcher(line);
28 | if (matcher.find()) {
29 | String[] group = matcher.group().strip().split(">ㅇㅅㅇ>");
30 | if (group.length != 2) throw new MatchException(MatchMessage.grammarError);
31 | String path = group[0].trim(); // POST/sub
32 | String variable = group[1].trim() + line.replaceFirst(patternText, ""); //[변수1:query1, 변수2:query2] id
33 | if (path.startsWith("POST")) {
34 | path = path.replaceFirst("^POST", "").trim();
35 | POST.put(path, variable);
36 | } else if (path.startsWith("GET")) {
37 | path = path.replaceFirst("^GET", "").trim();
38 | GET.put(path, variable);
39 | }
40 | }
41 | }
42 |
43 | @Override
44 | public String getPattern() {
45 | return patternText;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/main/java/event/db/DBSetting.java:
--------------------------------------------------------------------------------
1 | package event.db;
2 |
3 | import event.Setting;
4 | import http.controller.db.DatabaseSetting;
5 | import http.controller.db.controller.DatabaseCheck;
6 | import http.controller.db.define.DataBaseWork;
7 | import http.controller.db.define.SelectWork;
8 | import http.controller.db.place.DataBasePlace;
9 | import origin.variable.model.Repository;
10 |
11 | import static event.Controller.getVariable;
12 |
13 | public class DBSetting implements DBRepository, Repository,
14 | DataBasePlace {
15 | public static DatabaseSetting databaseSetting = null;
16 |
17 | public static String start(String line) {
18 | if (line.isBlank()) return null;
19 | if (dataBaseClass.check(line)) {dataBaseClass.start(line); return null;}
20 | if (dataBaseClass1.check(line)) {dataBaseClass1.start(line); return null;}
21 |
22 | line = Setting.startString(line); //변수 불러오기
23 | // if (getVariable.check(line)) line = getVariable.start(line); //변수 불러오기
24 | for (SelectWork works : selectWorks) {if (works.check(line)) line = works.start(line);}
25 | for (DataBaseWork works : dbWorks) {if (works.check(line)) {works.start(line);return null;}}
26 |
27 | return line;
28 | }
29 |
30 | public void firstStart() {
31 | reset();
32 | //ㄷㅇㄷ[종류, ip, port, dbName, user, password]
33 | loopWorks.add(dataBaseClass); //루프
34 | loopWorks.add(dataBaseClass1);
35 |
36 | selectWorks.add(new DatabaseCheck()); //지원하는 디비인지 확인
37 | selectWorks.add(selectWork); //select
38 |
39 | dbWorks.add(sqlWork); //alter, commit, ...
40 | }
41 |
42 | public void reset() {
43 | dbWorks.clear();
44 | selectWorks.clear();
45 | }
46 |
47 | public boolean check(String line) {
48 | return line.contains(className);
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/main/java/origin/variable/model/Repository.java:
--------------------------------------------------------------------------------
1 | package origin.variable.model;
2 |
3 | import custom.use.controller.UseCustomClass;
4 | import custom.use.controller.UseCustomString;
5 | import custom.use.controller.UseCustomVoid;
6 | import etc.reader.define.FileWork;
7 | import http.model.HttpWork;
8 | import input.conroller.mouse.define.MousePositionWork;
9 | import math.model.CalculationWork;
10 | import math.model.RandomWork;
11 | import origin.consol.define.PrintWork;
12 | import origin.consol.define.PriorityPrintWork;
13 | import origin.loop.model.LoopWork;
14 | import system.work.SystemWork;
15 | import system.work.ThreadWork;
16 |
17 | import java.util.*;
18 |
19 | public interface Repository {
20 | List variableWorks = new ArrayList<>(); //실행할 메소드 저장
21 | List priorityPrintWorks = new ArrayList<>(); //강제 출력 메소드 저장
22 | List printWorks = new ArrayList<>(); //출력 메소드 저장
23 | List calculationWorks = new ArrayList<>(); //계산 메소드 저장
24 | List loopWorks = new ArrayList<>(); //루프 메소드 저장
25 | List httpWorks = new ArrayList<>(); //Http
26 | List randomWorks = new ArrayList<>(); //램던 메소드 저장
27 | List systemWorks = new ArrayList<>(); //시스템 메소드 저장
28 | List threadWorks = new ArrayList<>(); //쓰레드 관련 메소드 저장
29 | List mousePositionWorks = new ArrayList<>(); //마우스 위치 반환
30 | List fileWorks = new ArrayList<>(); //파일 관련 메소드 저장
31 |
32 | Map> repository = new HashMap<>(); //변수 저장
33 | Map uuidMap = new HashMap<>(); //괄호 값 저장하는 곳
34 | Set set = new HashSet<>(); //변수명 저장
35 | Set classList = new HashSet<>(); //클래스 저장하는 곳
36 |
37 | Set classNames = new HashSet<>(); //클래스 이름
38 | Set methods = new HashSet<>(); //메소드 이름
39 | Set customClass = new HashSet<>(); //클래스 메소드
40 | //메소드 저장소
41 | Set useCustomStrings = new HashSet<>();
42 | Set useCustomVoids = new HashSet<>();
43 | }
--------------------------------------------------------------------------------
/src/main/java/http/controller/db/controller/pattern/DataBaseShellPattern1.java:
--------------------------------------------------------------------------------
1 | package http.controller.db.controller.pattern;
2 |
3 | import http.controller.db.define.DataBaseWork;
4 | import http.controller.db.place.DataBasePlace;
5 | import origin.exception.MatchException;
6 | import origin.exception.MatchMessage;
7 |
8 | import java.util.regex.Matcher;
9 | import java.util.regex.Pattern;
10 |
11 | public abstract class DataBaseShellPattern1 implements DataBaseWork {
12 | private final String patternText;
13 | private final String className;
14 | private final String method;
15 | private final int count;
16 | private final Pattern pattern;
17 |
18 | //[클래스명][메소드명]인자갯수...
19 | public DataBaseShellPattern1(String className, String methodName, int count) {
20 | DataBasePlace.methodName.add(methodName);
21 | this.className = className;
22 | this.method = methodName;
23 | this.count = count;
24 | this.patternText = "^\\s*" + className + "~" + methodName + "\\[[^\\[\\]]+]".repeat(Math.max(0, count)) + "\\s*$";
25 | pattern = Pattern.compile(patternText);
26 | }
27 |
28 | public String[] getValues(String line) {
29 | Matcher matcher = this.pattern.matcher(line);
30 | if (matcher.find()) {
31 | String group = matcher.group().trim();
32 | String[] values = group
33 | .substring(className.length()+method.length()+2, group.length()-1)
34 | .split("]\\[");
35 | if (values.length != count) throw new MatchException(MatchMessage.grammarError);
36 | else return values;
37 | }
38 | throw new MatchException(MatchMessage.grammarError);
39 | }
40 |
41 | public Pattern getPattern() {
42 | return pattern;
43 | }
44 |
45 | public String getPatternText() {
46 | return patternText;
47 | }
48 |
49 | @Override
50 | public boolean check(String line) {
51 | return pattern.matcher(line).find();
52 | }
53 |
54 | @Override
55 | public abstract void start(String line);
56 | }
57 |
--------------------------------------------------------------------------------
/src/main/java/etc/reader/ReadJSON.java:
--------------------------------------------------------------------------------
1 | package etc.reader;
2 |
3 | import org.json.simple.JSONArray;
4 | import org.json.simple.JSONObject;
5 | import org.json.simple.parser.JSONParser;
6 |
7 | import java.io.FileReader;
8 | import java.io.Reader;
9 | import java.util.ArrayList;
10 | import java.util.List;
11 |
12 | public class ReadJSON {
13 | private final static JSONParser parser = new JSONParser();
14 |
15 | public static String version(String file) {
16 | try (Reader reader = new FileReader("./etc/" + file)) {
17 | JSONObject object = (JSONObject) parser.parse(reader);
18 | return object.get("version").toString();
19 | } catch (Exception ignored) {}
20 | return "";
21 | }
22 |
23 | public static String founder(String file) {
24 | try (Reader reader = new FileReader("./etc/" + file)) {
25 | JSONObject object = (JSONObject) parser.parse(reader);
26 | return object.get("founder").toString();
27 | } catch (Exception ignored) {}
28 | return "";
29 | }
30 |
31 | public static String github(String file) {
32 | try (Reader reader = new FileReader("./etc/" + file)) {
33 | JSONObject object = (JSONObject) parser.parse(reader);
34 | return object.get("github-link").toString();
35 | } catch (Exception ignored) {}
36 | return "";
37 | }
38 |
39 | public static String kind(String file) {
40 | try (Reader reader = new FileReader("./etc/" + file)) {
41 | JSONObject object = (JSONObject) parser.parse(reader);
42 | return object.get("kind").toString();
43 | } catch (Exception ignored) {}
44 | return "";
45 | }
46 |
47 | public static List help(String file) {
48 | List list = new ArrayList<>();
49 | try (Reader reader = new FileReader("./etc/" + file)) {
50 | JSONObject object = (JSONObject) parser.parse(reader);
51 | JSONArray array = (JSONArray) object.get("help");
52 | for (Object o : array) list.add(o.toString());
53 | } catch (Exception ignored) {}
54 | return list;
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/main/java/http/controller/db/controller/pattern/DataBaseShellPattern2.java:
--------------------------------------------------------------------------------
1 | package http.controller.db.controller.pattern;
2 |
3 | import http.controller.db.define.DataBaseWork;
4 | import http.controller.db.define.SelectWork;
5 | import http.controller.db.place.DataBasePlace;
6 | import origin.exception.MatchException;
7 | import origin.exception.MatchMessage;
8 |
9 | import java.util.regex.Matcher;
10 | import java.util.regex.Pattern;
11 |
12 | public abstract class DataBaseShellPattern2 implements SelectWork {
13 | private final int count;
14 | private final String patternText;
15 | private final String method;
16 | private final String className;
17 | private final Pattern pattern;
18 |
19 | //[클래스명][메소드명]인자갯수...
20 | public DataBaseShellPattern2(String className, String methodName, int count) {
21 | DataBasePlace.methodName.add(methodName);
22 | this.method = methodName;
23 | this.className = className;
24 | this.count = count;
25 | this.patternText = ":" + className + "~" + methodName + "\\[[^\\[\\]]+]".repeat(Math.max(0, count)) + "[_ ]";
26 | pattern = Pattern.compile(patternText);
27 | }
28 |
29 | public String[] getValues(String line) {
30 | Matcher matcher = this.pattern.matcher(line);
31 | if (matcher.find()) {
32 | String group = matcher.group();
33 | group = group.substring(1, group.length()-1);
34 | String[] values = group
35 | .substring(className.length()+method.length()+2, group.length()-1)
36 | .split("]\\[");
37 | if (values.length != count) throw new MatchException(MatchMessage.grammarError);
38 | else return values;
39 | }
40 | throw new MatchException(MatchMessage.grammarError);
41 | }
42 |
43 | @Override
44 | public boolean check(String line) {
45 | return pattern.matcher(line).find();
46 | }
47 |
48 | @Override
49 | public abstract String start(String line);
50 |
51 | public Pattern getPattern() {
52 | return pattern;
53 | }
54 |
55 | public String getPatternText() {
56 | return patternText;
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/src/main/java/input/conroller/KeyboardRepository.java:
--------------------------------------------------------------------------------
1 | package input.conroller;
2 |
3 | import java.awt.event.KeyEvent;
4 | import java.util.HashMap;
5 | import java.util.Map;
6 |
7 | public interface KeyboardRepository {
8 | Map keys = new HashMap<>() {{
9 | put("ENTER", KeyEvent.VK_ENTER);
10 | put("0", KeyEvent.VK_0);
11 | put("1", KeyEvent.VK_1);
12 | put("2", KeyEvent.VK_2);
13 | put("3", KeyEvent.VK_3);
14 | put("4", KeyEvent.VK_4);
15 | put("5", KeyEvent.VK_5);
16 | put("6", KeyEvent.VK_6);
17 | put("7", KeyEvent.VK_7);
18 | put("8", KeyEvent.VK_8);
19 | put("9", KeyEvent.VK_9);
20 | put("A", KeyEvent.VK_A);
21 | put("B", KeyEvent.VK_B);
22 | put("C", KeyEvent.VK_C);
23 | put("D", KeyEvent.VK_D);
24 | put("E", KeyEvent.VK_E);
25 | put("F", KeyEvent.VK_F);
26 | put("G", KeyEvent.VK_G);
27 | put("H", KeyEvent.VK_H);
28 | put("I", KeyEvent.VK_I);
29 | put("J", KeyEvent.VK_J);
30 | put("K", KeyEvent.VK_K);
31 | put("L", KeyEvent.VK_L);
32 | put("M", KeyEvent.VK_M);
33 | put("N", KeyEvent.VK_N);
34 |
35 | put("F1", KeyEvent.VK_F1);
36 | put("F2", KeyEvent.VK_F2);
37 | put("F3", KeyEvent.VK_F3);
38 | put("F4", KeyEvent.VK_F4);
39 | put("F5", KeyEvent.VK_F5);
40 | put("F6", KeyEvent.VK_F6);
41 | put("F7", KeyEvent.VK_F7);
42 | put("F8", KeyEvent.VK_F8);
43 | put("F9", KeyEvent.VK_F9);
44 | put("F10", KeyEvent.VK_F10);
45 | put("F11", KeyEvent.VK_F11);
46 | put("F12", KeyEvent.VK_F12);
47 | put("F13", KeyEvent.VK_F13);
48 | put("F14", KeyEvent.VK_F14);
49 | put("F15", KeyEvent.VK_F15);
50 | put("F16", KeyEvent.VK_F16);
51 | put("F17", KeyEvent.VK_F17);
52 | put("F18", KeyEvent.VK_F18);
53 | put("F19", KeyEvent.VK_F19);
54 | put("F20", KeyEvent.VK_F20);
55 | put("F21", KeyEvent.VK_F21);
56 | put("F22", KeyEvent.VK_F22);
57 | put("F23", KeyEvent.VK_F23);
58 | put("F24", KeyEvent.VK_F24);
59 |
60 |
61 | }};
62 | }
63 |
--------------------------------------------------------------------------------
/src/main/java/origin/variable/controller/MakeListVariable.java:
--------------------------------------------------------------------------------
1 | package origin.variable.controller;
2 |
3 | import origin.exception.VariableException;
4 | import origin.exception.VariableMessage;
5 | import origin.variable.define.VariableCheck;
6 | import origin.variable.define.VariableType;
7 | import origin.variable.model.Repository;
8 | import origin.variable.model.VariableWork;
9 |
10 | import java.util.ArrayList;
11 | import java.util.HashMap;
12 | import java.util.Map;
13 | import java.util.Set;
14 | import java.util.regex.Matcher;
15 | import java.util.regex.Pattern;
16 |
17 | public class MakeListVariable implements VariableWork, Repository {
18 | private final String variable; //ㅇㅅㅇ, ㅇㅁㅇ, ...
19 | private final Pattern pattern; //ㄹㅁㄹ, ㄹㅅㄹ
20 | private final VariableType varType; //Integer, Long, ...
21 |
22 | public MakeListVariable(String variable, VariableType varType) {
23 | this.variable = variable;
24 | this.varType = varType;
25 | String varPattern = "^\\s*" + variable + "\\s+[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9_-]+";
26 | this.pattern = Pattern.compile(varPattern);
27 | repository.put(variable, new HashMap<>());
28 | }
29 |
30 | @Override
31 | public boolean check(String line) {
32 | return pattern.matcher(line).find();
33 | }
34 |
35 | @Override
36 | public void start(String line, Map> repository, Set set) {
37 | String patternText = "^\\s*" + variable + "\\s+";
38 | Pattern pattern = Pattern.compile(patternText); // ㄹㅁㄹ, ㅇㅁㅇ, ...
39 | Matcher matcher = pattern.matcher(line);
40 | if (matcher.find()) {
41 | String type = matcher.group().strip(); //ㄹㅁㄹ, ㅇㅁㅇ, ...
42 | if (!repository.containsKey(type)) throw new VariableException(type + VariableMessage.doNotDefine);
43 | String value = line.replaceFirst(patternText, "").strip(); //변수명
44 |
45 | if (value.isBlank()) throw new VariableException(VariableMessage.noHaveVarName);
46 | if (set.contains(value)) throw new VariableException(type + VariableMessage.sameVariable);
47 | //저장소에 값 저장
48 | repository.get(type).put(value, new ArrayList<>());
49 | set.add(value);
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/main/java/origin/loop/controller/If.java:
--------------------------------------------------------------------------------
1 | package origin.loop.controller;
2 |
3 | import event.Setting;
4 | import origin.exception.MatchException;
5 | import origin.exception.MatchMessage;
6 | import origin.loop.model.LoopWork;
7 | import origin.variable.model.Repository;
8 |
9 | import java.util.ArrayList;
10 | import java.util.Arrays;
11 | import java.util.List;
12 | import java.util.StringTokenizer;
13 | import java.util.regex.Pattern;
14 |
15 | public class If implements LoopWork, Repository {
16 | //시작 또는 줄바꿈 [공백] ?ㅅ? [공백 1개 이상]
17 | private static final String uuidPattern = "[a-zA-Z0-9-]+";
18 | private static final String patternText =
19 | "(\\n|^)\\s*\\?ㅅ\\?\\s+(ㅇㅇ|ㄴㄴ)\\s+"+uuidPattern+ //if
20 | "(\\s+\\?ㅈ\\?\\s+(ㅇㅇ|ㄴㄴ)\\s+"+uuidPattern+")*"+ //else if
21 | "(\\?ㅉ\\?\\s+"+uuidPattern+")?"; //else
22 | private static final Pattern pattern = Pattern.compile(patternText);
23 |
24 | @Override
25 | public boolean check(String line) {
26 | return pattern.matcher(line).find();
27 | }
28 |
29 | @Override
30 | public void start(String line) {
31 | Arrays.stream(lineStart(line).split("\\n")).forEach(Setting::start);
32 | }
33 |
34 | //라인을 반환함
35 | public static String lineStart(String line) {
36 | if (pattern.matcher(line).find()) {
37 | StringTokenizer tokenizer = new StringTokenizer(line);
38 | while (tokenizer.hasMoreTokens()) {
39 | String sing = tokenizer.nextToken();
40 | switch (sing) {
41 | case "?ㅅ?":
42 | case "?ㅈ?":
43 | if (tokenizer.nextToken().equals("ㅇㅇ"))
44 | return checkUuid(tokenizer.nextToken());
45 | break;
46 | case "?ㅉ?":
47 | return checkUuid(tokenizer.nextToken());
48 | }
49 | }
50 | }
51 | return "";
52 | }
53 |
54 | private static String checkUuid(String key) {
55 | if (uuidMap.containsKey(key)) return uuidMap.get(key);
56 | else throw new MatchException(MatchMessage.grammarError);
57 | }
58 |
59 | @Override
60 | public String getPattern() {
61 | return patternText;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/src/main/java/origin/variable/controller/MakeVariable.java:
--------------------------------------------------------------------------------
1 | package origin.variable.controller;
2 |
3 | import origin.exception.VariableException;
4 | import origin.exception.VariableMessage;
5 | import origin.variable.define.VariableCheck;
6 | import origin.variable.define.VariableType;
7 | import origin.variable.model.Repository;
8 | import origin.variable.model.VariableWork;
9 |
10 | import java.util.HashMap;
11 | import java.util.Map;
12 | import java.util.Set;
13 | import java.util.StringTokenizer;
14 | import java.util.regex.Matcher;
15 | import java.util.regex.Pattern;
16 |
17 | public class MakeVariable implements VariableWork, Repository {
18 | private final String variable; //ㅇㅅㅇ, ㅇㅁㅇ, ...
19 | private final VariableType varType; //Integer, Long, ...
20 | private final Pattern pattern;
21 | private final String varPattern;
22 |
23 | public MakeVariable(String variable, VariableType varType) {
24 | this.variable = variable;
25 | this.varType = varType;
26 | this.varPattern = "^\\s*" + variable + "\\s+[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9_-]+:";
27 | this.pattern = Pattern.compile(varPattern);
28 | repository.put(variable, new HashMap<>());
29 | }
30 |
31 | @Override
32 | public boolean check(String line) {
33 | return pattern.matcher(line).find();
34 | }
35 |
36 | @Override
37 | public void start(String line,
38 | Map> repository,
39 | Set set) {
40 | String patternText = "^\\s*" + variable + "\\s+";
41 | Pattern pattern = Pattern.compile(patternText); // ㅇㅅㅇ, ㅇㅁㅇ, ...
42 | Matcher matcher = pattern.matcher(line);
43 | if (matcher.find()) {
44 | String type = matcher.group().strip(); //ㅇㅅㅇ, ㅇㅁㅇ, ...
45 | if (!repository.containsKey(type)) throw new VariableException(type + VariableMessage.doNotDefine);
46 | //변수:초기값 => 변수 초기값
47 | StringTokenizer tokenizer = new StringTokenizer(line.replaceAll(patternText, ""), ":");
48 | String key = tokenizer.nextToken(); //변수
49 | String value = line.replaceFirst(varPattern, ""); //초기값
50 | if (set.contains(key)) throw new VariableException(key + VariableMessage.sameVariable);
51 | if (!VariableCheck.check(value, varType)) throw new VariableException(VariableMessage.typeMatchError);
52 | //저장소에 값 저장
53 | repository.get(type).put(key, value);
54 | set.add(key);
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/src/main/java/etc/reader/controller/FileRead.java:
--------------------------------------------------------------------------------
1 | package etc.reader.controller;
2 |
3 | import etc.reader.define.FileWork;
4 | import event.Setting;
5 | import origin.exception.FileFailException;
6 | import origin.exception.FileFailMessage;
7 | import system.start.OSSetting;
8 |
9 | import java.io.BufferedReader;
10 | import java.io.File;
11 | import java.io.FileReader;
12 | import java.io.IOException;
13 | import java.nio.charset.StandardCharsets;
14 | import java.util.Arrays;
15 | import java.util.Locale;
16 | import java.util.regex.Matcher;
17 | import java.util.regex.Pattern;
18 |
19 | public class FileRead implements FileWork {
20 | private final String text; // ㅍㅅㅍ
21 | private final String patternText; // ㅍㅅㅍ 디렉토리명/파일명.otl
22 | private final Pattern pattern;
23 |
24 | public FileRead(String patternText) {
25 | this.text = patternText;
26 | // ㅍㅅㅍ 디렉토리명/파일명.otl
27 | this.patternText = "^\\s*" + patternText + "\\s+[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9/\\\\_.-]+";
28 | this.pattern = Pattern.compile(this.patternText);
29 | }
30 |
31 | @Override
32 | public boolean check(String line) {
33 | return pattern.matcher(line).find();
34 | }
35 |
36 | @Override
37 | public void start(String line) {
38 | String slash = OSSetting.sep(); // 슬래쉬 반환
39 | Matcher matcher = pattern.matcher(line);
40 | if (matcher.find()) {
41 | String group = matcher.group();
42 | group = group.replaceFirst("^\\s*" + text, "").strip(); // 디렉토리명/파일명.otl
43 | String path = new File(Setting.path).getParent() + slash + group;
44 | File file = new File(path);
45 |
46 | String text;
47 | StringBuilder total = new StringBuilder();
48 | if (!file.canRead()) throw new FileFailException(FileFailMessage.doNotReadFile);
49 | if (!path.toLowerCase(Locale.ROOT).endsWith(".otl")) throw new FileFailException(FileFailMessage.notMatchExtension);
50 | try (BufferedReader reader = new BufferedReader(new FileReader(path, StandardCharsets.UTF_8))) {
51 | while ((text = reader.readLine()) != null) total.append(text).append("\n");
52 | String t = Setting.bracket.bracket(total.toString());
53 | Arrays.stream(t.split("\\n")).forEach(Setting::start);
54 | } catch (IOException ignored) {}
55 | }
56 | // path../test/hi.otl
57 | // File file = new File(Setting.path + ".." + slash + "test" + slash + "hi.otl");
58 |
59 |
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/src/main/java/origin/loop/controller/NewForEach.java:
--------------------------------------------------------------------------------
1 | package origin.loop.controller;
2 |
3 | import etc.reader.ReadJSON;
4 | import event.Setting;
5 | import origin.exception.MatchException;
6 | import origin.exception.MatchMessage;
7 | import origin.exception.VariableException;
8 | import origin.exception.VariableMessage;
9 | import origin.loop.model.LoopWork;
10 | import origin.variable.define.VariableCheck;
11 | import origin.variable.define.VariableType;
12 | import origin.variable.model.Repository;
13 |
14 | import java.util.Arrays;
15 | import java.util.regex.Matcher;
16 | import java.util.regex.Pattern;
17 |
18 | public class NewForEach implements LoopWork {
19 | private final String patternText = "^\\s*[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9_-]+\\^\\^\\[[^\\[\\]]+]";
20 | private final Pattern pattern = Pattern.compile(patternText);
21 |
22 | @Override
23 | public boolean check(String line) {
24 | return pattern.matcher(line).find();
25 | }
26 |
27 | @Override
28 | public void start(String line) {
29 | Matcher matcher = pattern.matcher(line);
30 | if (matcher.find()) {
31 | // 변수명^^[1, 2]
32 | String[] groups = matcher.group().strip().split("\\^\\^"); //변수명, [1, 2]
33 | String variableName = groups[0].trim(); //변수명
34 | String list = groups[1].trim(); //리스트
35 | String uuid = line.replaceFirst(patternText, "").strip();
36 | VariableType variableType = VariableCheck.checkVariableType(variableName);
37 | if (!VariableCheck.checkList(variableType, list))
38 | throw new VariableException(VariableMessage.typeMatchError);
39 | cut(list, variableName, uuid);
40 | }
41 | }
42 |
43 | //value : [1, 2]
44 | private void cut(String value, String var, String uuid) {
45 | if (!Repository.uuidMap.containsKey(uuid)) throw new MatchException(MatchMessage.grammarError);
46 | String total = Repository.uuidMap.get(uuid);
47 | //1, 2, 3, ...
48 | String[] values = value.trim().substring(1, value.length()-1).split(",");
49 | for (String vs : values) {
50 | VariableCheck.setValue(var, vs.trim());
51 | for (String l : total.split("\\n")) {
52 | BreakContinue breakContinue = settingStart(l);
53 | if (breakContinue.equals(BreakContinue.Break)) return;
54 | if (breakContinue.equals(BreakContinue.Continue)) break;
55 | }
56 | }
57 | }
58 |
59 | @Override
60 | public String getPattern() {
61 | return patternText;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/src/main/java/origin/loop/controller/For.java:
--------------------------------------------------------------------------------
1 | package origin.loop.controller;
2 |
3 | import event.Setting;
4 | import origin.exception.MatchException;
5 | import origin.exception.MatchMessage;
6 | import origin.loop.model.LoopWork;
7 | import origin.variable.model.Repository;
8 |
9 | import java.util.Arrays;
10 | import java.util.List;
11 | import java.util.Objects;
12 | import java.util.regex.Pattern;
13 |
14 | public class For implements LoopWork, Repository {
15 | //[숫자]^[숫자]^[숫자]
16 | private static final String patternText = "(\\n|^\\s*)[\\d\\-.]+\\^[\\d\\-.]+\\^[\\d\\-.]+(\\s*|$)";
17 | private static final Pattern pattern = Pattern.compile(patternText);
18 |
19 | @Override
20 | public boolean check(String line) {
21 | return pattern.matcher(line).find();
22 | }
23 |
24 | @Override
25 | public void start(String line) {
26 | List list = Arrays.stream(line.strip().split(" "))
27 | .filter(Objects::nonNull)
28 | .filter(v -> !v.isEmpty())
29 | .toList();
30 |
31 | String key = list.get(1);
32 | if (!uuidMap.containsKey(key) || list.size() != 2) throw new MatchException(MatchMessage.grammarError);
33 | //괄호 제거 작업
34 | String value = uuidMap.get(key).substring(1, uuidMap.get(key).length()-1).strip();
35 |
36 | List numbers = Arrays.stream(list.get(0).split("\\^"))
37 | .mapToDouble(Double::parseDouble)
38 | .boxed()
39 | .toList();
40 |
41 | double first = numbers.get(0);
42 | double second = numbers.get(1);
43 | double third = numbers.get(2);
44 |
45 | if (third < 0) {
46 | for (double d = first; d > second; d += third) {
47 | for (String l : value.split("\\n")) {
48 | BreakContinue breakContinue = settingStart(l);
49 | if (breakContinue.equals(BreakContinue.Break)) return;
50 | if (breakContinue.equals(BreakContinue.Continue)) break;
51 | }
52 | }
53 | } else if (third > 0){
54 | for (double d = first; d < second; d += third) {
55 | for (String l : value.split("\\n")) {
56 | BreakContinue breakContinue = settingStart(l);
57 | if (breakContinue.equals(BreakContinue.Break)) return;
58 | if (breakContinue.equals(BreakContinue.Continue)) break;
59 | }
60 | }
61 | }
62 | }
63 |
64 | @Override
65 | public String getPattern() {
66 | return patternText;
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/src/main/java/custom/registration/controller/DefineCustomClass.java:
--------------------------------------------------------------------------------
1 | package custom.registration.controller;
2 |
3 | import custom.registration.define.RepositoryValue;
4 | import custom.use.controller.UseCustomClass;
5 | import custom.use.define.BracketSplit;
6 | import origin.exception.VariableException;
7 | import origin.exception.VariableMessage;
8 | import origin.variable.model.Repository;
9 |
10 | import java.util.regex.Matcher;
11 | import java.util.regex.Pattern;
12 |
13 | //커스텀 클래스 등록
14 | public class DefineCustomClass implements BracketSplit {
15 | //ㅋㅅㅋ 클래스명[ㅇㅁㅇ 변수명] uuid
16 | private final String text; //ㅋㅅㅋ
17 | private final String patternText;
18 | private final String uuidText; //ㅋㅅㅋ 클래스명[ㅇㅁㅇ 변수명]
19 | private final Pattern pattern;
20 |
21 | public DefineCustomClass(String patternText) {
22 | //builder : [ㅇㅁㅇ 변수명]
23 | StringBuilder builder = new StringBuilder("(\\[\\s*(");
24 | Repository.repository.keySet().forEach(key -> builder.append(key).append("|"));
25 | builder.deleteCharAt(builder.length()-1);
26 | builder.append(")\\s+[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9_-]+\\s*])+");
27 | //[ㅇㅁㅇ 변수명]
28 | this.patternText = builder.toString();
29 | // ㅋㅅㅋ 클래스명[ㅇㅁㅇ 변수명]
30 | this.uuidText = "^\\s*" + patternText + "\\s+[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9_-]+" + this.patternText;
31 | this.pattern = Pattern.compile(this.uuidText);
32 | this.text = patternText;
33 | }
34 |
35 | public boolean check(String line) {
36 | return pattern.matcher(line).find();
37 | }
38 |
39 | public void start(String line) {
40 | Matcher matcher = pattern.matcher(line);
41 | if (matcher.find()) {
42 | String group = matcher.group().strip(); //ㅋㅅㅋ 클래스명[ㅇㅁㅇ 변수명]
43 | RepositoryValue variables = getRepositoryValue(group, patternText); //변수타입, 변수명
44 | String className = group //클래스명 추출
45 | .replaceFirst(patternText, "")
46 | .replaceFirst("^\\s*"+this.text+"\\s*", "")
47 | .strip();
48 |
49 | if (Repository.classNames.contains(className)) //중복 검사
50 | throw new VariableException(className + VariableMessage.sameMethod);
51 | Repository.classNames.add(className);
52 | // uuid 추출하기
53 | String uuid = line.replaceFirst(uuidText, "").strip();
54 | if (Repository.uuidMap.containsKey(uuid)) {
55 | String total = Repository.uuidMap.get(uuid);
56 | Repository.customClass.add(new UseCustomClass(className, variables, total));
57 | }
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/src/main/java/origin/variable/controller/SetVariable.java:
--------------------------------------------------------------------------------
1 | package origin.variable.controller;
2 |
3 | import event.list.ListSetting;
4 | import http.items.HttpRepository;
5 | import origin.exception.MatchException;
6 | import origin.exception.MatchMessage;
7 | import origin.exception.VariableException;
8 | import origin.exception.VariableMessage;
9 | import origin.variable.define.VariableCheck;
10 | import origin.variable.define.VariableKind;
11 |
12 | import java.util.List;
13 | import java.util.Map;
14 | import java.util.Set;
15 | import java.util.regex.Matcher;
16 | import java.util.regex.Pattern;
17 |
18 | //변수에 값을 넣는 작업
19 | public class SetVariable {
20 | private final String patternText = "^\\s*[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9_-]+:";
21 | private final Pattern pattern = Pattern.compile(patternText);
22 |
23 | public boolean check(String line) {
24 | Pattern pattern = Pattern.compile(patternText + "[^:]+");
25 | return pattern.matcher(line).find();
26 | }
27 |
28 | public void start(String line,
29 | Map> repository,
30 | Set set) {
31 | Matcher matcher = pattern.matcher(line);
32 | if (matcher.find()) {
33 | String originValue = matcher.group().strip(); //변수명:
34 | String key = originValue.substring(0, originValue.length()-1); //변수명: => 변수명
35 | String value = line.replaceFirst(patternText, ""); //변수에 들어갈 값
36 | //리스트인지 변수인지 확인하는 로직
37 | VariableKind variableKind = VariableCheck.checkVariableKind(VariableCheck.getCheck(key));
38 | if (!set.contains(key)) throw new VariableException(key + VariableMessage.doNotFind);
39 | if (variableKind.equals(VariableKind.LIST)) {
40 | // <<변수에 들어갈 값
41 | if (!value.startsWith("<<")) throw new MatchException(MatchMessage.grammarError);
42 | value = value.replaceFirst("^<<", ""); //변수에 들어갈 값
43 | for (String keys : repository.keySet()) {
44 | if (repository.get(keys).containsKey(key)) {
45 | List