You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During my development of Java prolog engine (JProl) I had developed parser to parse sources written in Edinburgh style, I decided to extract the module into separated project and 1.0.0 version was published. In 2018 I had decided to make deep refactoring and 2.0.0 version was published. The Parser allows build custom prolog parsers with support of operators and some modern prolog features.
10
+
During [my experiments in Prolog with Java](https://github.com/raydac/jprol), I developed some parser to process Prolog sources written in Edinburgh style. I decided that it is useful stuff, and it would be good to be prepared as separated independent module published in Maven central. In 2018 deep refactoring made the parser better and stronger.
11
11
12
12
# Features
13
13
@@ -19,7 +19,7 @@ It supports
19
19
20
20
# Maven dependency
21
21
22
-
It is a library without 3th side dependencies, it is published im the Maven central and can be added into project just with:
22
+
The parser is a pure Java library without any 3-th side dependency, it is published im the Maven central and can be injected into project just by adding:
23
23
```
24
24
<dependency>
25
25
<groupId>com.igormaznitsa</groupId>
@@ -29,17 +29,18 @@ It is a library without 3th side dependencies, it is published im the Maven cent
29
29
```
30
30
31
31
# How to use?
32
-
Parser implements stream which sequentially reads prolog terms from reader. By default PrologParser is abstract class but there is GenericPrologParser class provides minimalistic implementation.
32
+
Parser implements stream which sequentially reads prolog terms provided by reader. By default, PrologParser is abstract class but there is pre-defined implementation GenericPrologParser for common cases.
33
33
```
34
-
Reader reader = new StringReader("hello(world). some({1,2,3}). power(X,Y,Z) :- Z is X ** Y.");
35
-
PrologParser parser = new GenericPrologParser(reader, new DefaultParserContext(ParserContext.FLAG_CURLY_BRACKETS, Op.SWI));
36
-
parser.forEach(System.out::println);
34
+
Reader reader = new StringReader("hello(world). some({1,2,3}). power(X,Y,Z) :- Z is X ** Y.");
0 commit comments