-
Notifications
You must be signed in to change notification settings - Fork 1
task1 #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
cripson1994
wants to merge
8
commits into
master
Choose a base branch
from
ha1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
task1 #3
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
91d25b7
home assigment
cripson1994 679f911
fix main
cripson1994 9a0be0b
refresh repo
cripson1994 3f649ca
add grep
cripson1994 a7b35d3
drop garbage
cripson1994 9901922
fix package name
cripson1994 faf609c
fix bugs and add description
cripson1994 f476a48
add why I choose Apach Cli
cripson1994 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
|
|
||
| # Created by https://www.gitignore.io/api/macos,gradle,intellij+all | ||
|
|
||
| ### Intellij+all ### | ||
| # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm | ||
| # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 | ||
|
|
||
| # User-specific stuff: | ||
| .idea/**/workspace.xml | ||
| .idea/**/tasks.xml | ||
| .idea/dictionaries | ||
|
|
||
| # Sensitive or high-churn files: | ||
| .idea/**/dataSources/ | ||
| .idea/**/dataSources.ids | ||
| .idea/**/dataSources.xml | ||
| .idea/**/dataSources.local.xml | ||
| .idea/**/sqlDataSources.xml | ||
| .idea/**/dynamic.xml | ||
| .idea/**/uiDesigner.xml | ||
|
|
||
| # Gradle: | ||
| .idea/**/gradle.xml | ||
| .idea/**/libraries | ||
|
|
||
| # CMake | ||
| cmake-build-debug/ | ||
|
|
||
| # Mongo Explorer plugin: | ||
| .idea/**/mongoSettings.xml | ||
|
|
||
| ## File-based project format: | ||
| *.iws | ||
|
|
||
| ## Plugin-specific files: | ||
|
|
||
| # IntelliJ | ||
| /out/ | ||
|
|
||
| # mpeltonen/sbt-idea plugin | ||
| .idea_modules/ | ||
|
|
||
| # JIRA plugin | ||
| atlassian-ide-plugin.xml | ||
|
|
||
| # Cursive Clojure plugin | ||
| .idea/replstate.xml | ||
|
|
||
| # Ruby plugin and RubyMine | ||
| /.rakeTasks | ||
|
|
||
| # Crashlytics plugin (for Android Studio and IntelliJ) | ||
| com_crashlytics_export_strings.xml | ||
| crashlytics.properties | ||
| crashlytics-build.properties | ||
| fabric.properties | ||
|
|
||
| ### Intellij+all Patch ### | ||
| # Ignores the whole idea folder | ||
| # See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360 | ||
|
|
||
| .idea/ | ||
|
|
||
| ### macOS ### | ||
| *.DS_Store | ||
| .AppleDouble | ||
| .LSOverride | ||
|
|
||
| # Icon must end with two \r | ||
| Icon | ||
|
|
||
| # Thumbnails | ||
| ._* | ||
|
|
||
| # Files that might appear in the root of a volume | ||
| .DocumentRevisions-V100 | ||
| .fseventsd | ||
| .Spotlight-V100 | ||
| .TemporaryItems | ||
| .Trashes | ||
| .VolumeIcon.icns | ||
| .com.apple.timemachine.donotpresent | ||
|
|
||
| # Directories potentially created on remote AFP share | ||
| .AppleDB | ||
| .AppleDesktop | ||
| Network Trash Folder | ||
| Temporary Items | ||
| .apdisk | ||
|
|
||
| ### Gradle ### | ||
| .gradle | ||
| **/build/ | ||
|
|
||
| # Ignore Gradle GUI config | ||
| gradle-app.setting | ||
|
|
||
| # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) | ||
| !gradle-wrapper.jar | ||
|
|
||
| # Cache of project | ||
| .gradletasknamecache | ||
|
|
||
| # # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 | ||
| # gradle/wrapper/gradle-wrapper.properties | ||
|
|
||
|
|
||
| # End of https://www.gitignore.io/api/macos,gradle,intellij+all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| group 'spbau' | ||
| version '1.0-SNAPSHOT' | ||
|
|
||
| apply plugin: 'java' | ||
|
|
||
| sourceCompatibility = 1.8 | ||
|
|
||
| buildscript { | ||
| repositories { | ||
| mavenCentral() | ||
| } | ||
| dependencies { | ||
| classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0' | ||
| } | ||
| } | ||
|
|
||
|
|
||
| repositories { | ||
| mavenCentral() | ||
| } | ||
|
|
||
| ext.junit4Version = '4.12' | ||
| ext.junitVintageVersion = '4.12.0' | ||
| ext.junitPlatformVersion = '1.0.0' | ||
| ext.junitJupiterVersion = '5.0.0' | ||
| ext.log4jVersion = '2.6.2' | ||
|
|
||
| apply plugin: 'java' | ||
| apply plugin: 'org.junit.platform.gradle.plugin' | ||
| apply plugin: 'idea' | ||
|
|
||
| compileTestJava { | ||
| sourceCompatibility = 1.8 | ||
| targetCompatibility = 1.8 | ||
| options.compilerArgs += '-parameters' | ||
| } | ||
|
|
||
| junitPlatform { | ||
| filters { | ||
| engines { | ||
| } | ||
| tags { | ||
| exclude 'slow' | ||
| } | ||
| } | ||
| logManager 'org.apache.logging.log4j.jul.LogManager' | ||
|
|
||
|
|
||
| } | ||
|
|
||
| jar { | ||
| manifest { | ||
| attributes "Main-Class": "start.MainClass" | ||
| } | ||
|
|
||
| from { | ||
| configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } | ||
| } | ||
| } | ||
|
|
||
| sourceCompatibility = 1.8 | ||
|
|
||
| dependencies { | ||
| testCompile group: 'junit', name: 'junit', version: '4.12' | ||
|
|
||
| testCompile("org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}") | ||
| testRuntime("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}") | ||
| compile group: 'commons-cli', name: 'commons-cli', version: '1.2' | ||
| compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.5' | ||
| } | ||
|
|
||
| build.mustRunAfter(clean) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| ##Описание | ||
|
|
||
| Архитектура проекта выглядит следующий образом: | ||
| - Класс Лексер (Lexer) осуществляет разбиение входной строки на набор лексем. Делает это он последовательным двойным парсингом: | ||
| - Изначально строка разбивается на набор токенов вида: пайп "|", слово, содержащее присваивание и просто обычное слово | ||
| - Далее токены слов (с присваиванием и без) парсятся на более конкретные токены, такие как слово в двойной или одинарной кавычке, команда, операция присваивания и аргумент. | ||
| - В итоге внутри лексера содержится массив с готовым набором токенов, который Лексер может отдать с помощью соответствующего метода. | ||
| - Класс Interpolation осущетсвляет интерполирование, переданной ему строки значениями из доступного ему окружения переменных. | ||
| - Класс Preparater обьединяет токены, относящие к одной команде воедино, перед этим предварительно проинтерполировав токены с помощ класса Interpolation. В итоге он отдаёт цельные команды с выделенным методом и аргументами. | ||
| - Класс CommandManager последовательно выполняет полученный набор комманд. Проверяет какая команда и вызывает соответсвующую. Если ему комманда не извествна, то вызывает комманду из системы. В итоге выполнения всех комманд этот класс выводит результат в консоль. | ||
| - Класс Environment является таблицей используемых имён переменных | ||
| - Класс AbstractCommand является абстрактным классом для доступных комманд cli, от которого наследуются конкретные комманды. | ||
|
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Ответ очень прост: когда-то давно я уже пользовался этой библиотекой и поэтому знаю что к чему в ней. А новую изучать не вижу смысла, если и эта хорошо себя показывает. | ||
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| #Fri Feb 23 15:25:15 MSK 2018 | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Золотой Молоток". Примерно как "почему я программирую на Java? Потому что я всю жизнь программировал на Java, и отец мой программировал на Java, и дед мой программировал на Java, и никогда с ней проблем не было" :)