Description
Inspect a supplied YAML tag handle and suffix without resolving tag directives.
YAML uses context-sensitive indicators for scalar styles, indentation, tags, anchors, and document boundaries. A token may be meaningful only within the surrounding stream and indentation structure. Recognizing one header or marker is distinct from parsing a document or resolving its values.
Inspect a supplied YAML tag handle and suffix without resolving tag directives.
When to use this tool
Use Yaml Tag Handle Empty Suffix when you need to recognize the supported YAML marker or header token before a broader parsing step.
How to use the tool and how it works
- Enter handle, suffix. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read validHandle, emptySuffix, formsNonSpecificTag. Inspect validHandle, emptySuffix, formsNonSpecificTag before interpreting the associated values.
Return validHandle when handle is !, !!, or a named form !name! using ASCII letters, digits, and hyphens. Return emptySuffix=(suffix.length===0) and formsNonSpecificTag only for handle=! with an empty suffix.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| handle | Handle | Required. Text; maximum UTF-16 length 8192. |
| suffix | Suffix | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| validHandle | Whether the restricted ASCII handle grammar matches; invalid is a successful false. | Required. Boolean. |
| emptySuffix | Empty Suffix | Required. Boolean. |
| formsNonSpecificTag | Forms Non Specific Tag | Required. Boolean. |
{
"input": {
"handle": "!",
"suffix": ""
},
"output": {
"validHandle": true,
"emptySuffix": true,
"formsNonSpecificTag": true
}
} Limitations and assumptions
- Invalid handles return a false flag rather than an input error. Suffix syntax, directives, tag resolution, and a complete YAML document are not validated; the named-handle grammar is deliberately limited.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Use a full YAML parser for stream context, indentation, aliases, tags, scalar content, and document validity. Treat the output as the stated local recognition result.
References
Similar or alternative tools
- Yaml Block Scalar Chomping Token
Return style=literal or folded and chomping=keep for +, strip for -, or clip when absent.
- Parsing: Yaml Block Chomp Indicator
Parse a restricted YAML block-scalar style/indent/chomping indicator token in either allowed modifier order; does not parse indentation, content or a YAML document.