Complete the README with explainations on the Java library.
This commit is contained in:
parent
c0e4af560a
commit
c20806b0c5
17
README.md
17
README.md
|
@ -20,3 +20,20 @@ It's up to the application using the format to define them, their meaning and th
|
|||
The commands and parameter names are limited to the latin lowercase alphabetic characters.
|
||||
The characters `@`, `[`, `]`, `{` and `}` must be escaped with a prefixing `@` if they are not part of a command.
|
||||
|
||||
# Compiling the Java library
|
||||
The Java library for manipulating Scribbly text can be compiled using maven.
|
||||
It uses the standard commands (clean, package, install).
|
||||
|
||||
```
|
||||
mvn clean package
|
||||
mvn install
|
||||
```
|
||||
|
||||
# The Java API
|
||||
The classes are in the `fr.feufochmar.scribbly` namespace.
|
||||
A Scribbly document is represented by the `ScribblyDocument` class, which contain a list of `ScribblyElement`.
|
||||
A `Scribbly` element is either a `ScribblyCommand` (representing a command, its parameters, and the list of ScribblyElements on which it apply) or a `ScribblyText` (representing text outside commands).
|
||||
A Scribbly document is processed using the visitor patter, using an instance of the `ScribblyVisitor` interface.
|
||||
The `ScribblyDocumentParser` class can be used to build a `ScribblyDocument` from a file, input stream or reader.
|
||||
The `ScribblyDocumentWriter` is an example of `ScribblyVisitor` implementation allowing to write a `ScribblyDocument` into an output stream or writer.
|
||||
|
||||
|
|
Loading…
Reference in New Issue