Type:
Class
Constants:
LIST_TOKENS : [ :BULLET, :LABEL, :LALPHA, :NOTE, :NUMBER, :UALPHA, ]

List token types

A recursive-descent parser for RDoc markup.

The parser tokenizes an input string then parses the tokens into a Document. Documents can be converted into output formats by writing a visitor like RDoc::Markup::ToHTML.

The parser only handles the block-level constructs Paragraph, List, ListItem, Heading, Verbatim, BlankLine and Rule. Inline markup such as +blah+ is handled separately by RDoc::Markup::AttributeManager.

To see what markup the Parser implements read RDoc. To see how to use RDoc markup to format text in your program read RDoc::Markup.

skip
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Markup/RDoc::Markup::Parser

skip(token_type, error = true) Instance Public methods Skips the next token

2025-01-10 15:47:30
tokenize
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Markup/RDoc::Markup::Parser

tokenize(str) Class Public methods Returns a token stream for str

2025-01-10 15:47:30
parse
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Markup/RDoc::Markup::Parser

parse(str) Class Public methods Parses str into a Document.

2025-01-10 15:47:30
build_verbatim
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Markup/RDoc::Markup::Parser

build_verbatim(margin) Instance Public methods Builds a Verbatim that is indented

2025-01-10 15:47:30
token_pos
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Markup/RDoc::Markup::Parser

token_pos(byte_offset) Instance Public methods Calculates the column (by character)

2025-01-10 15:47:30
parse 2
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Markup/RDoc::Markup::Parser

parse(parent, indent = 0) Instance Public methods Parses the tokens into an

2025-01-10 15:47:30
build_heading
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Markup/RDoc::Markup::Parser

build_heading(level) Instance Public methods Builds a Heading of level

2025-01-10 15:47:30
peek_token
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Markup/RDoc::Markup::Parser

peek_token() Instance Public methods Returns the next token on the stream without

2025-01-10 15:47:30
unget
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Markup/RDoc::Markup::Parser

unget() Instance Public methods Returns the current token to the token stream

2025-01-10 15:47:30
build_paragraph
  • References/Ruby on Rails/Ruby/Classes/RDoc/RDoc::Markup/RDoc::Markup::Parser

build_paragraph(margin) Instance Public methods Builds a Paragraph that is flush

2025-01-10 15:47:30