final class YamlLexer extends BaseLexer[YamlToken]
Yaml Lexer for 1.2 Specification
- Alphabetic
- By Inheritance
- YamlLexer
- BaseLexer
- Lexer
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
advance(): Unit
Advance the lexer to the next token.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
final
def
beginOfLine: Boolean
- Definition Classes
- BaseLexer
- Annotations
- @inline()
-
def
blockCollection(n: Int, ctx: YamlContext): Boolean
A nested Block Collection
A nested Block Collection
[200] s-l+block-collection(n,c) ::= ( [[separate s-separate(n+1,c)]] c-ns-properties(n+1,c) )? [[multilineComment s-l-comments]] ( [[blockSequence l+block-sequence(seq-spaces(n,c))]] | [[blockMapping]] l+block-mapping(n) ) [201] seq-spaces(n,c) ::= c = block-out ⇒ n-1 c = block-in ⇒ n
-
def
blockHeader(n: Int): (Int, Char)
Returns the new defined indentation or MAX_VALUE if autodetect
[162] c-b-block-header(m,t) ::= ( ( c-indentation-indicator(m) c-chomping-indicator(t) ) | ( c-chomping-indicator(t) c-indentation-indicator(m) ) ) s-b-comment [163] c-indentation-indicator(m) ::= ns-dec-digit ⇒ m = ns-dec-digit - #x30 | Empty [164] c-chomping-indicator(t) ::= “-” ⇒ t = strip | “+” ⇒ t = keep | “ ” ⇒ t = clip
Returns the new defined indentation or MAX_VALUE if autodetect
[162] c-b-block-header(m,t) ::= ( ( c-indentation-indicator(m) c-chomping-indicator(t) ) | ( c-chomping-indicator(t) c-indentation-indicator(m) ) ) s-b-comment [163] c-indentation-indicator(m) ::= ns-dec-digit ⇒ m = ns-dec-digit - #x30 | Empty [164] c-chomping-indicator(t) ::= “-” ⇒ t = strip | “+” ⇒ t = keep | “ ” ⇒ t = clip
- def blockInBlock(n: Int, ctx: YamlContext): Boolean
-
def
blockMapEntry(n: Int): Boolean
[188] ns-l-block-map-entry(n) ::= c-l-block-map-explicit-entry(n)
[188] ns-l-block-map-entry(n) ::= c-l-block-map-explicit-entry(n)
- Annotations
- @failfast()
-
def
blockMapping(n: Int): Boolean
A Block mapping is a series of entries, each presenting a key: value pair.
A Block mapping is a series of entries, each presenting a key: value pair.
[187] l+block-mapping(n) ::= ( s-indent(n+m) ns-l-block-map-entry(n+m) )+
For some fixed auto-detected m greater than 0
-
def
blockNode(n: Int, ctx: YamlContext): Boolean
[196] s-l+block-node(n,c) ::= s-l+block-in-block(n,c) | s-l+flow-in-block(n) [197] s-l+flow-in-block(n) ::= s-separate(n+1,flow-out) ns-flow-node(n+1,flow-out) s-l-comments
-
def
blockSequence(n: Int): Boolean
A block sequence is simply a series of nodes, each denoted by a leading “-” indicator.
A block sequence is simply a series of nodes, each denoted by a leading “-” indicator. The “-” indicator must be separated from the node by white space. This allows “-” to be used as the first character in a plain scalar if followed by a non-space character (e.g. “-1”).
[183] l+block-sequence(n) ::= ( [[indent s-indent(n+m)]] [[blockSeqEntry c-l-block-seq-entry(n+m)]] )+ (For some fixed auto-detected m > 0)
-
def
breakAsLineFeed(): Boolean
Line Break normalized to lineFeed
Line Break normalized to lineFeed
[29] b-as-line-feed ::= b-break
-
def
breakAsSpace(): Boolean
Convert a lineBreak to an space (fold it)
Convert a lineBreak to an space (fold it)
[72] b-as-space ::= b-break
-
def
breakComment(): Boolean
[76] b-comment ::= b-non-content | EofChar
[76] b-comment ::= b-non-content | EofChar
- Annotations
- @failfast()
-
def
breakNonContent(): Boolean
Outside scalar content, YAML allows any line break to be used to terminate lines.
Outside scalar content, YAML allows any line break to be used to terminate lines.
[30] b-non-content ::= b-break
- Annotations
- @failfast()
-
final
def
check(str: String): Int
Compare with the specified String and return 0 or the length of the string if all characters are equal
Compare with the specified String and return 0 or the length of the string if all characters are equal
- Definition Classes
- BaseLexer
-
def
chompedEmpty(n: Int, t: Char): Boolean
[166] l-chomped-empty(n,t) ::= t = strip(-) ⇒ l-strip-empty(n) t = clip ⇒ l-strip-empty(n) t = keep (+) ⇒ l-keep-empty(n) [167] l-strip-empty(n) ::= ([[indentLessOrEqual s-indent(≤n)]] [[breakNonContent b-non-content]])* [[trailComments l-trail-comments(n)]]? [168] l-keep-empty(n) ::= [[emptyLine l-empty(n,block-in)]]* [[trailComments l-trail-comments(n)]]?
[166] l-chomped-empty(n,t) ::= t = strip(-) ⇒ l-strip-empty(n) t = clip ⇒ l-strip-empty(n) t = keep (+) ⇒ l-keep-empty(n) [167] l-strip-empty(n) ::= ([[indentLessOrEqual s-indent(≤n)]] [[breakNonContent b-non-content]])* [[trailComments l-trail-comments(n)]]? [168] l-keep-empty(n) ::= [[emptyLine l-empty(n,block-in)]]* [[trailComments l-trail-comments(n)]]?
-
def
chompedLast(t: Char): Boolean
Process the last block of an Scalar based on the chomp indicator
Process the last block of an Scalar based on the chomp indicator
[165] b-chomped-last(t) ::= t = strip(-) ⇒ b-non-content | EOF t = clip ⇒ b-as-line-feed | EOF t = keep (+) ⇒ b-as-line-feed | EOF
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
commentText(): Boolean
[75] c-nb-comment-text ::= “#” nb-char*
[75] c-nb-comment-text ::= “#” nb-char*
Actually it is doing: commentText ::= '#' nb-char* b-comment
- Annotations
- @failfast()
-
def
compactMapping(n: Int): Boolean
[195] ns-l-compact-mapping(n) ::= ns-l-block-map-entry(n) ( s-indent(n) ns-l-block-map-entry(n) )*
-
final
def
consume(str: String): Boolean
Compare with the specified String and consume if all characters are equal
Compare with the specified String and consume if all characters are equal
- Definition Classes
- BaseLexer
-
def
consume(c: Char): Boolean
Compare with the specified char and consume if they are equal
Compare with the specified char and consume if they are equal
- Attributes
- protected
- Definition Classes
- BaseLexer
-
final
def
consume(n: Int): Unit
- Attributes
- protected
- Definition Classes
- BaseLexer
-
final
def
consume(): Unit
- Definition Classes
- BaseLexer
-
final
def
consumeAndEmit(n: Int, token: YamlToken): Boolean
- Definition Classes
- BaseLexer
-
final
def
consumeAndEmit(t1: YamlToken, t2: YamlToken): Boolean
- Definition Classes
- BaseLexer
-
final
def
consumeAndEmit(token: YamlToken): Boolean
- Definition Classes
- BaseLexer
-
def
consumeWhile(p: (Int) ⇒ Boolean): Unit
- Attributes
- protected
- Definition Classes
- BaseLexer
-
def
countSpaces(offset: Int = 0, max: Int = MAX_VALUE): Int
- Attributes
- protected
-
def
countWhiteSpaces(offset: Int = 0): Int
Count the number of whiteSpaces from the specified offset
Count the number of whiteSpaces from the specified offset
- Attributes
- protected
-
final
def
currentChar: Int
- Attributes
- protected
- Definition Classes
- BaseLexer
-
def
emit(t1: YamlToken, t2: YamlToken): Boolean
Emit 2 Tokens
-
def
emit(token: YamlToken): Boolean
Emit a Token
-
def
emitForMark(t1: YamlToken, t2: YamlToken): Boolean
Emit 2 Tokens with same mark
- def emitIndicator(): Boolean
-
def
emptyLine(n: Int, ctx: YamlContext): Boolean
[67] s-line-prefix(n,c) ::= c = block-out ⇒ s-block-line-prefix(n) c = block-in ⇒ s-block-line-prefix(n) c = flow-out ⇒ s-flow-line-prefix(n) c = flow-in ⇒ s-flow-line-prefix(n) [68] s-block-line-prefix(n) ::= s-indent(n) [69] s-flow-line-prefix(n) ::= s-indent(n) s-separate-in-line? [70] l-empty(n,c) ::= ( s-line-prefix(n,c) | s-indent(<n) ) b-as-line-feed
[67] s-line-prefix(n,c) ::= c = block-out ⇒ s-block-line-prefix(n) c = block-in ⇒ s-block-line-prefix(n) c = flow-out ⇒ s-flow-line-prefix(n) c = flow-in ⇒ s-flow-line-prefix(n) [68] s-block-line-prefix(n) ::= s-indent(n) [69] s-flow-line-prefix(n) ::= s-indent(n) s-separate-in-line? [70] l-empty(n,c) ::= ( s-line-prefix(n,c) | s-indent(<n) ) b-as-line-feed
-
def
emptyScalar(): Boolean
[105] e-scalar ::= /* Empty */
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
error(): Boolean
Emit an error and Consume until end of line or file
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
findToken(chr: Int): Unit
- Attributes
- protected
- Definition Classes
- BaseLexer
-
def
flowContent(n: Int, ctx: YamlContext): Boolean
[158] ns-flow-content(n,c) ::= ns-flow-yaml-content(n,c) | c-flow-json-content(n,c)
-
def
flowJsonContent(n: Int, ctx: YamlContext): Boolean
JSON-like flow styles all have explicit start and end indicators.
JSON-like flow styles all have explicit start and end indicators.
[157] c-flow-json-content(n,c) ::= [[flowSequence c-flow-sequence(n,c)]] | [[flowMapping c-flow-mapping(n,c)]] | [[quotedScalar c-single-quoted(n,c)]] | [[quotedScalar c-double-quoted(n,c)]]
- Annotations
- @failfast()
-
def
flowJsonNode(n: Int, ctx: YamlContext): Boolean
[160] c-flow-json-node(n,c) ::= ( c-ns-properties(n,c) s-separate(n,c) )? c-flow-json-content(n,c)
-
def
flowSequence(n: Int, ctx: YamlContext): Boolean
Flow sequence content is denoted by surrounding “[” and “]” characters.
Flow sequence content is denoted by surrounding “[” and “]” characters.
[137] c-flow-sequence(n,c) ::= “[” s-separate(n,c)? [\[flowSequenceEntries ns-s-flow-seq-entries(n,in-flow(c))]\]? “]”
-
def
flowSequenceEntry(n: Int, ctx: YamlContext): Boolean
Any flow node may be used as a flow sequence entry.
Any flow node may be used as a flow sequence entry. In addition, YAML provides a compact notation for the case where a flow sequence entry is a mapping with a single key: value pair.
[139] ns-flow-seq-entry(n,c) ::= [\[flowPair ns-flow-pair(n,c)]\]
| [\[flowNode ns-flow-node(n,c)]\]
-
def
flowYamlNode(n: Int, c: YamlContext): Boolean
[159] ns-flow-yaml-node(n,c) ::= [\[aliasNode c-ns-alias-node]\]
[159] ns-flow-yaml-node(n,c) ::= [\[aliasNode c-ns-alias-node]\]
| [\[flowYamlContent ns-flow-yaml-content(n,c)]\]
| ( [\[nodeProperties c-ns-properties(n,c)]\] ( ( s-separate(n,c) [\[flowYamlContent ns-flow-yaml-cont(n,c)]\] )
| e-scalar ) )
-
def
foldedScalar(n: Int): Boolean
The folded style is denoted by the “>” indicator.
The folded style is denoted by the “>” indicator. It is similar to the literal style; however, folded scalars are subject to line folding.
[174] c-l+folded(n) ::= “>” c-b-block-header(m,t) [\[foldedContent l-folded-content(n+m,t)]\]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
implicitJsonKey(ctx: YamlContext): Boolean
[155] c-s-implicit-json-key(c) ::= c-flow-json-node(n/a,c) s-separate-in-line?
-
def
implicitYamlKey(ctx: YamlContext): Boolean
[154] implicit-yaml-key(c) ::= ns-flow-yaml-node(n/a,c) s-separate-in-line?
-
def
indent(n: Int): Boolean
Process an indentation exactly as the current one
Process an indentation exactly as the current one
[63] s-indent(n) ::= s-space × n
-
def
indentLess(n: Int): Boolean
Detect an indentation lower than the current one
Detect an indentation lower than the current one
[64] s-indent(<n) ::= s-space × m (Where m < n)
-
def
indentLessOrEqual(n: Int): Boolean
Detect an indentation lower or equal to the current one
Detect an indentation lower or equal to the current one
[64] s-indent(≤n) ::= s-space × m (Where m ≤ n)
-
def
indicator(chr: Int): Boolean
Check that the current char is the specified one and if so emit it as an Indicator
Check that the current char is the specified one and if so emit it as an Indicator
- Annotations
- @failfast()
-
def
initialize(): Unit
Init must initialize the current _tokenData (may be invoking advance)
-
var
input: LexerInput
- Definition Classes
- BaseLexer
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isPlainChar(offset: Int, ctx: YamlContext): Boolean
[130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” )
[130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” )
| ( /* An ns-char preceding */ “#” )
| ( “:” /* Followed by an ns-plain-safe(c) */ )
-
def
isPlainFirst(chr: Int, nextChar: Int, ctx: YamlContext): Boolean
todo deprecate
-
def
lineBreakSequence(offset: Int = 0): Int
Recognition of lineBreak Sequence
Recognition of lineBreak Sequence
[28] b-break ::= ( b-carriage-return b-line-feed ) | b-line-feed
-
def
lineComment(): Boolean
[78] l-comment ::= s-separate-in-line c-nb-comment-text? b-comment Actually refactored to: [[separateInLine s-separate-in-line]] ([[breakComment b-non-content]] | [[commentText]])
[78] l-comment ::= s-separate-in-line c-nb-comment-text? b-comment Actually refactored to: [[separateInLine s-separate-in-line]] ([[breakComment b-non-content]] | [[commentText]])
- Annotations
- @failfast()
-
def
lineContainsMapIndicator(): Boolean
Check if the line contains a map Indicator (":" plus space or end of text)
-
def
literalContent(n: Int, t: Char): Boolean
[173] l-literal-content(n,t) ::= ( [[literalContentLine l-nb-literal-text(n)]] b-nb-literal-next(n) * [[chompedLast b-chomped-last(t)]] )? [[chompedEmpty l-chomped-empty(n,t)]] [172] b-nb-literal-next(n) ::= [[breakAsLineFeed b-as-line-feed]] [[literalContentLine l-nb-literal-text(n)]]
[173] l-literal-content(n,t) ::= ( [[literalContentLine l-nb-literal-text(n)]] b-nb-literal-next(n) * [[chompedLast b-chomped-last(t)]] )? [[chompedEmpty l-chomped-empty(n,t)]] [172] b-nb-literal-next(n) ::= [[breakAsLineFeed b-as-line-feed]] [[literalContentLine l-nb-literal-text(n)]]
-
def
literalScalar(n: Int): Boolean
[170] c-l+literal(n) ::= “|” c-b-block-header(m,t) l-literal-content(n+m,t)
-
final
def
lookAhead(n: Int): Int
- Definition Classes
- BaseLexer
-
def
mapExplicitEntry(n: Int): Boolean
Explicit map entries are denoted by the “?” mapping key indicator
Explicit map entries are denoted by the “?” mapping key indicator
[189] c-l-block-map-explicit-entry(n) ::= c-l-block-map-explicit-key(n) ( l-block-map-explicit-value(n) | [[emptyNode e-node]] ) [190] c-l-block-map-explicit-key(n) ::= “?” [[blockIndented s-l+block-indented(n,block-out)]]
- Annotations
- @failfast()
-
def
mapExplicitValue(n: Int): Boolean
[191] l-block-map-explicit-value(n) ::= s-indent(n) “:” [\[blockIndented s-l+block-indented(n,block-out)]\]
-
def
mapImplicitEntry(n: Int): Boolean
Detect a Map implicit Entry
Detect a Map implicit Entry
[192] ns-l-block-map-implicit-entry(n) ::= ( ns-s-block-map-implicit-key | [[emptyNode e-node]] ) [[mapImplicitValue c-l-block-map-implicit-value(n)]] [193] ns-s-block-map-implicit-key ::= [[implicitJsonKey c-s-implicit-json-key(block-key)]] | [[implicitYamlKey ns-s-implicit-yaml-key(block-key)]]
-
def
mapImplicitValue(n: Int): Boolean
[194] c-l-block-map-implicit-value(n) ::= “:” ( s-l+block-node(n,block-out)
[194] c-l-block-map-implicit-value(n) ::= “:” ( s-l+block-node(n,block-out)
| ( [\[emptyNode e-node]\] s-l-comments ) )
-
var
mark: Position
- Attributes
- protected
- Definition Classes
- BaseLexer
-
def
multilineComment(): Boolean
[79] s-l-comments ::= ( s-b-comment | /* Start of line */ ) l-comment*
[79] s-l-comments ::= ( s-b-comment | /* Start of line */ ) l-comment*
- Annotations
- @failfast()
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
nonEof: Boolean
We're not at the Eof
We're not at the Eof
- Definition Classes
- BaseLexer
-
def
nonTokenEmitted: Boolean
Check if there are emitted tokens
Check if there are emitted tokens
- Definition Classes
- BaseLexer
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def obtainClosingChar(first: Int): Option[Int]
-
final
def
optional(p: Boolean): Boolean
- Definition Classes
- BaseLexer
-
def
plainScalar(n: Int, ctx: YamlContext): Boolean
[131] ns-plain(n,c) ::= c = flow-out ⇒ ns-plain-multi-line(n,c) c = flow-in ⇒ ns-plain-multi-line(n,c) c = block-key ⇒ ns-plain-one-line(c) c = flow-key ⇒ ns-plain-one-line(c)
-
val
positionOffset: Position
- Definition Classes
- BaseLexer
-
def
processPending(): Unit
Process all pending tokens.
-
def
reset(): Unit
- Attributes
- protected
- Definition Classes
- BaseLexer
-
def
separate(n: Int, ctx: YamlContext): Boolean
[80] s-separate(n,c) ::= c = block-out ⇒ s-separate-lines(n) c = block-in ⇒ s-separate-lines(n) c = flow-out ⇒ s-separate-lines(n) c = flow-in ⇒ s-separate-lines(n) c = block-key ⇒ s-separate-in-line c = flow-key ⇒ s-separate-in-line [81] s-separate-lines(n) ::= ( s-l-comments s-flow-line-prefix(n) ) | s-separate-in-line
- def separateFlow(n: Int, ctx: YamlContext): Boolean
-
val
sourceName: String
- Definition Classes
- BaseLexer
-
def
spaceBreakComment(): Boolean
[77] s-b-comment ::= ( s-separate-in-line c-nb-comment-text? )? b-comment* Actually refactored to: b-comment | l-comment
[77] s-b-comment ::= ( s-separate-in-line c-nb-comment-text? )? b-comment* Actually refactored to: b-comment | l-comment
- Annotations
- @failfast()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
token: YamlToken
get the current token in the input stream.
-
def
tokenData: TD
All the token data.
-
val
tokenQueue: Queue[TD]
- Attributes
- protected
- Definition Classes
- BaseLexer
-
def
tokenString: String
Get the current Token String.
Get the current Token String.
- Definition Classes
- Lexer
-
def
tokenText: CharSequence
Get the current Token Char Sequence.
-
def
tokenText(td: TD): CharSequence
Get the specified Token Char Sequence.
Get the specified Token Char Sequence.
- Definition Classes
- BaseLexer
-
def
trailComments(n: Int): Boolean
Explicit comment lines may follow the trailing empty lines.
Explicit comment lines may follow the trailing empty lines. To prevent ambiguity, the first such comment line must be less indented than the block scalar content. Additional comment lines, if any, are not so restricted. This is the only case where the indentation of comment lines is constrained.
[169] l-trail-comments(n) ::= s-indent(<n) c-nb-comment-text b-comment l-comment*
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
yamlStream(): Unit
A YAML stream consists of zero or more documents.
A YAML stream consists of zero or more documents. Subsequent documents require some sort of separation marker line. If a document is not terminated by a document end marker line, then the following document must begin with a directives end marker line. The stream format is intentionally “sloppy” to better support common use cases, such as stream concatenation.
[211] l-yaml-stream ::= [[documentPrefix l-document-prefix]]* [[anyDocument l-any-document]]? ( l-document-suffix+ l-document-prefix* l-any-document? | l-document-prefix* l-explicit-document? )*