Package net.sf.okapi.filters.yaml.parser
Class YamlParser
- java.lang.Object
-
- net.sf.okapi.filters.yaml.parser.YamlParser
-
- All Implemented Interfaces:
YamlParserConstants
public class YamlParser extends Object implements YamlParserConstants
//* Basic YAML parser.
-
-
Field Summary
Fields Modifier and Type Field Description Tokenjj_ntNext token.TokentokenCurrent token.YamlParserTokenManagertoken_sourceGenerated Token Manager.-
Fields inherited from interface net.sf.okapi.filters.yaml.parser.YamlParserConstants
ALIAS, ANCHOR, BLOCK_END, BLOCK_INDENTED, BLOCK_MAPPING_START, BLOCK_SEQUENCE_START, COMMENT_TEXT, CONTINUATION_END, CONTINUATION_START, DASH, DEFAULT, DOCUMENT_END, DOCUMENT_START, DOCUMENT_START_END, DOUBLE_QUOTED_EMPTY, DOUBLE_QUOTED_FIRST, DOUBLE_QUOTED_KEY, DOUBLEQUOTE, EOF, EOL, ESCAPES, EXCLUDED_SUBSTRINGS, FALSE_START, FIRST_CHARS, FLOW, FLOW_MAPPING_END, FLOW_MAPPING_START, FLOW_SEQUENCE_END, FLOW_SEQUENCE_START, FOLDED_SCALAR_START, HEXNUMBER, INDENTED, LIST_SEPERATOR, LITERAL_FOLDED_INDENTED, LITERAL_SCALAR_START, NULL_SCALAR, PAIR_SEPERATOR, PLAIN_FLOW_KEY, PLAIN_FLOW_SCALAR, PLAIN_KEY, PLAIN_SCALAR, PLAIN_SCALAR_INDENTED, QUOTE_DOUBLE, QUOTE_DOUBLE_END, QUOTE_SINGLE, QUOTE_SINGLE_END, SINGLE_QUOTED_EMPTY, SINGLE_QUOTED_FIRST, SINGLE_QUOTED_KEY, SINGLEQUOTE, SPACE, STRING_DOUBLE_BODY_FIRST, STRING_DOUBLE_BODY_SECOND, STRING_SINGLE_BODY_FIRST, STRING_SINGLE_BODY_SECOND, TAG, TAG_DIRECTIVE, tokenImage, UNREACHABLE, URI_CHAR, VERSION_TAG, WORD_CHAR
-
-
Constructor Summary
Constructors Constructor Description YamlParser(String dsl)Constructor.YamlParser(Provider stream)Constructor.YamlParser(YamlParserTokenManager tm)Constructor with generated Token Manager.
-
Method Summary
-
-
-
Field Detail
-
token_source
public YamlParserTokenManager token_source
Generated Token Manager.
-
token
public Token token
Current token.
-
jj_nt
public Token jj_nt
Next token.
-
-
Constructor Detail
-
YamlParser
public YamlParser(Provider stream)
Constructor.
-
YamlParser
public YamlParser(String dsl) throws ParseException, TokenMgrException
Constructor.- Throws:
ParseExceptionTokenMgrException
-
YamlParser
public YamlParser(YamlParserTokenManager tm)
Constructor with generated Token Manager.
-
-
Method Detail
-
setHandler
public void setHandler(IYamlHandler handler)
-
reset
public void reset()
-
parse
public void parse() throws ParseException- Throws:
ParseException
-
yaml_stream
public final void yaml_stream() throws ParseException- Throws:
ParseException
-
yaml_document
public final void yaml_document() throws ParseException- Throws:
ParseException
-
document_start
public final void document_start() throws ParseException- Throws:
ParseException
-
document_end
public final void document_end() throws ParseException- Throws:
ParseException
-
node
public final void node() throws ParseException- Throws:
ParseException
-
anchor_or_tag
public final void anchor_or_tag() throws ParseException- Throws:
ParseException
-
scalar
public final void scalar() throws ParseException- Throws:
ParseException
-
flow_scalar
public final void flow_scalar() throws ParseException- Throws:
ParseException
-
quoted_string
public final Scalar quoted_string() throws ParseException
- Throws:
ParseException
-
double_quoted_string
public final QuotedScalar double_quoted_string() throws ParseException
- Throws:
ParseException
-
single_quoted_string
public final QuotedScalar single_quoted_string() throws ParseException
- Throws:
ParseException
-
plain_scalar
public final Scalar plain_scalar() throws ParseException
- Throws:
ParseException
-
literal_style
public final Scalar literal_style() throws ParseException
- Throws:
ParseException
-
folded_style
public final Scalar folded_style() throws ParseException
- Throws:
ParseException
-
indented_plain_scalar
public final IndentedBlock indented_plain_scalar() throws ParseException
- Throws:
ParseException
-
indented_block_scalar
public final IndentedBlock indented_block_scalar(YamlScalarTypes type) throws ParseException
- Throws:
ParseException
-
flow_node
public final void flow_node() throws ParseException- Throws:
ParseException
-
sequence
public final void sequence() throws ParseException- Throws:
ParseException
-
flow_sequence
public final void flow_sequence() throws ParseException- Throws:
ParseException
-
flow_sequence_entry
public final void flow_sequence_entry() throws ParseException- Throws:
ParseException
-
indentless_block_sequence
public final void indentless_block_sequence() throws ParseException- Throws:
ParseException
-
block_sequence
public final void block_sequence() throws ParseException- Throws:
ParseException
-
block_sequence_element
public final void block_sequence_element() throws ParseException- Throws:
ParseException
-
key
public final Key key() throws ParseException
- Throws:
ParseException
-
flow_key
public final Key flow_key() throws ParseException
- Throws:
ParseException
-
mapping
public final void mapping() throws ParseException- Throws:
ParseException
-
flow_mapping
public final void flow_mapping() throws ParseException- Throws:
ParseException
-
flow_mapping_element
public final void flow_mapping_element() throws ParseException- Throws:
ParseException
-
block_mapping
public final void block_mapping() throws ParseException- Throws:
ParseException
-
block_mapping_element
public final void block_mapping_element() throws ParseException- Throws:
ParseException
-
ReInit
public void ReInit(String s)
-
ReInit
public void ReInit(Provider stream)
Reinitialise.
-
ReInit
public void ReInit(YamlParserTokenManager tm)
Reinitialise.
-
getNextToken
public final Token getNextToken()
Get the next Token.
-
getToken
public final Token getToken(int index)
Get the specific Token.
-
generateParseException
public ParseException generateParseException()
Generate ParseException.
-
trace_enabled
public final boolean trace_enabled()
Trace enabled.
-
enable_tracing
public final void enable_tracing()
Enable tracing.
-
disable_tracing
public final void disable_tracing()
Disable tracing.
-
-