Skip to content

Commit ef1a13c

Browse files
committed
Przygotowanie do wydania wersji 1.0.0
Create LICENSE Create package-info.java Create module-info.java Update pom.xml Create README.md
1 parent e56aae1 commit ef1a13c

File tree

5 files changed

+176
-0
lines changed

5 files changed

+176
-0
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Kamil Jan Mularski
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Wzorzec projektowy Interpreter
2+
Projekt jest implementacją wzorca projektowego *Interpreter* w wersji uniwersalnej.
3+
4+
Interfejs [klienta](https://github.com/koder95/Interpreter/blob/master/src/main/java/pl/koder95/interpreter/Client.java) pozwala na stworzenie nowej instancji
5+
[interpretera](https://github.com/koder95/Interpreter/blob/master/src/main/java/pl/koder95/interpreter/Interpreter.java), który będzie działał w podanym
6+
[kontekście](https://github.com/koder95/Interpreter/blob/master/src/main/java/pl/koder95/interpreter/Context.java).
7+
8+
Języki formalne można podzielić na dwie grupy ze względu na kontekst: języki formalne bezkontekstowe
9+
i języki formalne kontekstowe. Kontekst określa ostateczne znaczenie
10+
[wyrażeń](https://github.com/koder95/Interpreter/blob/master/src/main/java/pl/koder95/interpreter/Expression.java)
11+
wieloznacznych w perspektywie tylko jednego wyrażenia. Jeśli każde z wyrażeń jest jednoznaczne i nie potrzebuje
12+
uściśleń przez kontekst, wówczas należy używać instancji utworzonej przez
13+
`new pl.koder95.interpreter.Context(){}`, co oznacza gramatykę bezkontekstową.
14+
15+
Interfejs [Interpreter](https://github.com/koder95/Interpreter/blob/master/src/main/java/pl/koder95/interpreter/Interpreter.java) dostarcza nie tylko
16+
[metodę interpretującą odczytywane wartości](https://github.com/koder95/Interpreter/blob/b3f9b37f580d7580785ac4515601e07ce9b38d85/src/main/java/pl/koder95/interpreter/Interpreter.java#L38),
17+
ale również implementacje interfejsów [parsera](https://github.com/koder95/Interpreter/blob/master/src/main/java/pl/koder95/interpreter/Parser.java),
18+
[tokenizera](https://github.com/koder95/Interpreter/blob/master/src/main/java/pl/koder95/interpreter/Tokenizer.java)
19+
oraz [fabryki skanerów](https://github.com/koder95/Interpreter/blob/master/src/main/java/pl/koder95/interpreter/ScannerFactory.java),
20+
które wykorzystywane są podczas budowania drzewa abstrakcyjnej syntaktyki za pomocą metod
21+
[create(java.lang.Readable)](https://github.com/koder95/Interpreter/blob/b3f9b37f580d7580785ac4515601e07ce9b38d85/src/main/java/pl/koder95/interpreter/ScannerFactory.java#L19),
22+
[buildAbstractSyntaxTree(java.util.Queue)](https://github.com/koder95/Interpreter/blob/b3f9b37f580d7580785ac4515601e07ce9b38d85/src/main/java/pl/koder95/interpreter/Parser.java#L17)
23+
oraz [enqueue()](https://github.com/koder95/Interpreter/blob/b3f9b37f580d7580785ac4515601e07ce9b38d85/src/main/java/pl/koder95/interpreter/Tokenizer.java#L54).
24+
25+
## Zależność Maven
26+
```xml
27+
<dependency>
28+
<groupId>pl.koder95</groupId>
29+
<artifactId>Interpreter</artifactId>
30+
<version>1.0-SNAPSHOT</version>
31+
</dependency>
32+
```

pom.xml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,95 @@
77
<groupId>pl.koder95</groupId>
88
<artifactId>Interpreter</artifactId>
99
<version>1.0-SNAPSHOT</version>
10+
<description>Universal implementation of the Interpreter Design Pattern.</description>
11+
<url>https://github.com/koder95/Interpreter</url>
12+
<scm>
13+
<url>https://github.com/koder95/Interpreter</url>
14+
<tag>interpreter</tag>
15+
</scm>
16+
<developers>
17+
<developer>
18+
<id>Koder95</id>
19+
<name>Kamil Mularski</name>
20+
<email>[email protected]</email>
21+
</developer>
22+
</developers>
23+
<licenses>
24+
<license>
25+
<name>MIT Licence</name>
26+
<url>https://github.com/koder95/Interpreter/blob/master/LICENSE</url>
27+
</license>
28+
</licenses>
1029

1130
<properties>
1231
<maven.compiler.source>17</maven.compiler.source>
1332
<maven.compiler.target>17</maven.compiler.target>
1433
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1534
</properties>
1635

36+
<distributionManagement>
37+
<snapshotRepository>
38+
<id>ossrh</id>
39+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
40+
</snapshotRepository>
41+
<repository>
42+
<id>ossrh</id>
43+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
44+
</repository>
45+
</distributionManagement>
46+
<build>
47+
<plugins>
48+
<plugin>
49+
<groupId>org.sonatype.plugins</groupId>
50+
<artifactId>nexus-staging-maven-plugin</artifactId>
51+
<version>1.6.7</version>
52+
<extensions>true</extensions>
53+
<configuration>
54+
<serverId>ossrh</serverId>
55+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
56+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
57+
</configuration>
58+
</plugin>
59+
<plugin>
60+
<groupId>org.apache.maven.plugins</groupId>
61+
<artifactId>maven-javadoc-plugin</artifactId>
62+
<version>3.2.0</version>
63+
<executions>
64+
<execution>
65+
<id>attach-javadocs</id>
66+
<goals>
67+
<goal>jar</goal>
68+
</goals>
69+
</execution>
70+
</executions>
71+
</plugin>
72+
<plugin>
73+
<groupId>org.apache.maven.plugins</groupId>
74+
<artifactId>maven-source-plugin</artifactId>
75+
<version>3.2.1</version>
76+
<executions>
77+
<execution>
78+
<id>attach-sources</id>
79+
<goals>
80+
<goal>jar-no-fork</goal>
81+
</goals>
82+
</execution>
83+
</executions>
84+
</plugin>
85+
<plugin>
86+
<groupId>org.apache.maven.plugins</groupId>
87+
<artifactId>maven-gpg-plugin</artifactId>
88+
<version>1.5</version>
89+
<executions>
90+
<execution>
91+
<id>sign-artifacts</id>
92+
<phase>verify</phase>
93+
<goals>
94+
<goal>sign</goal>
95+
</goals>
96+
</execution>
97+
</executions>
98+
</plugin>
99+
</plugins>
100+
</build>
17101
</project>

src/main/java/module-info.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/**
2+
* Moduł interpretera.
3+
* @see pl.koder95.interpreter
4+
*/
5+
module pl.koder95.interpreter {
6+
requires java.base;
7+
exports pl.koder95.interpreter;
8+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/**
2+
* Paczka dostarcza implementację wzorca projektowego <i>Interpreter</i> w wersji uniwersalnej.
3+
* <p>
4+
* Interfejs {@link pl.koder95.interpreter.Client klienta} pozwala na stworzenie nowej instancji
5+
* {@link pl.koder95.interpreter.Interpreter interpretera}, który będzie działał w podanym
6+
* {@link pl.koder95.interpreter.Context kontekście}.
7+
* </p><p>
8+
* Języki formalne można podzielić na dwie grupy ze względu na kontekst: języki formalne bezkontekstowe
9+
* i języki formalne kontekstowe. Kontekst określa ostateczne znaczenie {@link pl.koder95.interpreter.Expression wyrażeń}
10+
* wieloznacznych w perspektywie tylko jednego wyrażenia. Jeśli każde z wyrażeń jest jednoznaczne i nie potrzebuje
11+
* uściśleń przez kontekst, wówczas należy używać instancji utworzonej przez
12+
* {@code new pl.koder95.interpreter.Context(){}}, co oznacza gramatykę bezkontekstową.
13+
* </p><p>
14+
* Interfejs {@link pl.koder95.interpreter.Interpreter} dostarcza nie tylko
15+
* {@link pl.koder95.interpreter.Interpreter#interpret(java.lang.Readable) metodę interpretującą odczytywane wartości},
16+
* ale również implementacje interfejsów {@link pl.koder95.interpreter.Parser parsera},
17+
* {@link pl.koder95.interpreter.Tokenizer tokenizera} oraz {@link pl.koder95.interpreter.ScannerFactory fabryki skanerów},
18+
* które wykorzystywane są podczas budowania drzewa abstrakcyjnej syntaktyki za pomocą metod
19+
* {@link pl.koder95.interpreter.ScannerFactory#create(java.lang.Readable) create(java.lang.Readable)},
20+
* {@link pl.koder95.interpreter.Parser#buildAbstractSyntaxTree(java.util.Queue) buildAbstractSyntaxTree(java.util.Queue)}
21+
* oraz {@link pl.koder95.interpreter.Tokenizer#enqueue() enqueue()}.
22+
* </p>
23+
* @see pl.koder95.interpreter.Client
24+
* @see pl.koder95.interpreter.Context
25+
* @see pl.koder95.interpreter.Expression
26+
* @see pl.koder95.interpreter.Interpreter
27+
* @see pl.koder95.interpreter.Parser
28+
* @see pl.koder95.interpreter.ScannerFactory
29+
* @see pl.koder95.interpreter.Tokenizer
30+
*/
31+
package pl.koder95.interpreter;

0 commit comments

Comments
 (0)