|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.parancoe.yaml.parser.YamlParser
public final class YamlParser
An experimental Yaml org.parancoe.yaml.parser.
| Field Summary | |
|---|---|
static int |
DOCUMENT_HEADER
|
protected int |
line
|
static int |
LIST_CLOSE
|
static int |
LIST_ENTRY
|
static int |
LIST_NO_OPEN
|
static int |
LIST_OPEN
|
static int |
MAP_CLOSE
|
static int |
MAP_NO_OPEN
|
static int |
MAP_OPEN
|
static int |
MAP_SEPARATOR
|
protected ParserReader |
r
|
| Constructor Summary | |
|---|---|
YamlParser(java.io.Reader r,
ParserEvent event)
|
|
| Method Summary | |
|---|---|
boolean |
alias()
alias ::= '*' word |
boolean |
anchor()
anchor ::= '&' word |
boolean |
array(int type)
string of characters of type 'type' |
boolean |
block_line(int n,
java.lang.StringBuffer sb,
char ch)
|
boolean |
block(int n)
block(n) ::= '|' space? |
boolean |
comment(int n,
boolean explicit)
throwable comment productions. |
boolean |
directive()
directive ::= '#' word ':' line |
boolean |
document_first()
document_first ::= nlist(-1) | nmap(-1) |
boolean |
document_next()
document_next ::= header node_non_alias(-1) |
boolean |
end()
|
ParserEvent |
getEvent()
|
boolean |
header()
header ::= '---' (space directive)* |
int |
indent()
how many spaces from index till first non space |
boolean |
indent(int n)
indent(n) ::= n*SP |
boolean |
key(int n)
key ::= ( '?' |
boolean |
line()
line = char_line+ Spaces not included ! |
boolean |
linesp()
linesp = char_linesp+ Spaces included ! |
boolean |
list_entry()
list_entry ::= space? |
boolean |
list()
list ::= '[' (list_entry ',')* list_entry? |
boolean |
loose_string_simple()
|
boolean |
loose_string()
string ::= single_quoted | double_quoted | simple All strings are trimmed |
boolean |
loose_value_inline()
|
boolean |
loose_value(int n)
|
boolean |
map_entry()
map_entry ::= space? |
boolean |
map()
map ::= '{' (map_entry ',')* map_entry? |
boolean |
newline()
newline ::= ( CR LF) | CR | LF / NEL / PS / LS (| EOF) |
boolean |
nlist_entry(int n)
nlist_entry(n) ::= '-' ( value(>n) | nmap_inlist(>n) ) |
boolean |
nlist(int n)
nlist(n) ::= ( indent(n) nlist_entry(n) )+ |
boolean |
nmap_entry(int n)
nmap_entry(n) ::= key(n) ':' value(>n) |
boolean |
nmap_inlist(int n)
nmap_inlist(n) ::= space string space? |
boolean |
nmap(int n)
nmap(n) ::= (indent(n) nmap_entry(n))+ |
boolean |
number()
number = char_digit+ |
void |
parse()
parse ::= icomment(-1)* document_first? |
boolean |
properties()
properties ::= ( transfer ( space anchor )? |
protected java.lang.String |
readerString()
|
void |
setEvent(ParserEvent event)
|
boolean |
space()
space = char_space+ |
boolean |
string_simple()
simple string This function reads also trailing spaces. |
boolean |
string()
|
boolean |
transfer()
transfer ::= '!' |
boolean |
value_block(int n)
|
boolean |
value_inline_na()
|
boolean |
value_inline()
|
boolean |
value_na(int n)
|
boolean |
value_nested(int n)
|
boolean |
value(int n)
|
boolean |
word()
word = char_word+ |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LIST_OPEN
public static final int LIST_CLOSE
public static final int MAP_OPEN
public static final int MAP_CLOSE
public static final int LIST_NO_OPEN
public static final int MAP_NO_OPEN
public static final int DOCUMENT_HEADER
public static final int MAP_SEPARATOR
public static final int LIST_ENTRY
protected ParserReader r
protected int line
| Constructor Detail |
|---|
public YamlParser(java.io.Reader r,
ParserEvent event)
throws java.lang.Exception
java.lang.Exception| Method Detail |
|---|
protected java.lang.String readerString()
public int indent()
throws java.io.IOException
java.io.IOException
public boolean array(int type)
throws java.io.IOException
java.io.IOException
public boolean space()
throws java.io.IOException
java.io.IOException
public boolean line()
throws java.io.IOException
Spaces not included !
java.io.IOException
public boolean linesp()
throws java.io.IOException
Spaces included !
java.io.IOException
public boolean word()
throws java.io.IOException
java.io.IOException
public boolean number()
throws java.io.IOException
java.io.IOException
public boolean indent(int n)
throws java.io.IOException
java.io.IOException
public boolean newline()
throws java.io.IOException
java.io.IOException
public boolean end()
throws java.io.IOException
java.io.IOException
public boolean string_simple()
throws java.lang.Exception
This function reads also trailing spaces. Trim later
java.lang.Exception
public boolean loose_string_simple()
throws java.lang.Exception
java.lang.Exception
public boolean loose_string()
throws java.lang.Exception
All strings are trimmed
java.lang.Exception
public boolean string()
throws java.lang.Exception
java.lang.Exception
public boolean alias()
throws java.io.IOException
java.io.IOException
public boolean anchor()
throws java.io.IOException
java.io.IOException
public boolean comment(int n,
boolean explicit)
throws java.io.IOException
java.io.IOException
public boolean header()
throws java.lang.Exception
java.lang.Exception
public boolean directive()
throws java.io.IOException
java.io.IOException
public boolean transfer()
throws java.io.IOException
java.io.IOException
public boolean properties()
throws java.lang.Exception
java.lang.Exception
public boolean key(int n)
throws java.lang.Exception
java.lang.Exception
public boolean value(int n)
throws java.lang.Exception
java.lang.Exception
public boolean loose_value(int n)
throws java.lang.Exception
java.lang.Exception
public boolean value_na(int n)
throws java.lang.Exception
java.lang.Exception
public boolean value_inline()
throws java.lang.Exception
java.lang.Exception
public boolean loose_value_inline()
throws java.lang.Exception
java.lang.Exception
public boolean value_inline_na()
throws java.lang.Exception
java.lang.Exception
public boolean value_nested(int n)
throws java.lang.Exception
java.lang.Exception
public boolean value_block(int n)
throws java.lang.Exception
java.lang.Exception
public boolean nmap(int n)
throws java.lang.Exception
java.lang.Exception
public boolean nmap_entry(int n)
throws java.lang.Exception
java.lang.Exception
public boolean nlist(int n)
throws java.lang.Exception
java.lang.Exception
public boolean nlist_entry(int n)
throws java.lang.Exception
java.lang.Exception
public boolean nmap_inlist(int n)
throws java.lang.Exception
java.lang.Exception
public boolean block(int n)
throws java.lang.Exception
java.lang.Exception
public boolean block_line(int n,
java.lang.StringBuffer sb,
char ch)
throws java.lang.Exception
java.lang.Exception
public boolean list()
throws java.lang.Exception
java.lang.Exception
public boolean list_entry()
throws java.lang.Exception
java.lang.Exception
public boolean map()
throws java.lang.Exception
java.lang.Exception
public boolean map_entry()
throws java.lang.Exception
java.lang.Exception
public boolean document_first()
throws java.lang.Exception
java.lang.Exception
public boolean document_next()
throws java.lang.Exception
java.lang.Exception
public void parse()
throws java.lang.Exception
java.lang.Exceptionpublic ParserEvent getEvent()
public void setEvent(ParserEvent event)
event - The event to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||