Module text

Source
Expand description

Text parsing for the AIM expression grammar.

This module provides parsers for text literals and tagged content in the AIM expression language. It handles both quoted strings (single and double) and tagged content with escape sequence processing.

§Supported Text Formats

  • Quoted strings: "hello" or 'world'
  • Tagged content: <tag>
  • Escape sequences: \n, \t, \", \', etc.

§Examples

"Hello, world!"           // double-quoted string
'Hello, world!'           // single-quoted string
<tag>                     // tagged content
"Line 1\nLine 2"          // string with escape sequences

Functions§

convert_escaped_text
Convert text content containing escape sequences to literal text.
parse_block
Parse a block from a string.
parse_tag
Parse a tag from a string.
parse_text
Parse a text literal from a string.