Class Dhaka::Lexer
In: ../trunk/lib/dhaka/lexer/lexer.rb
Parent: LexerSupport::StateMachine

The lexer generator. To generate a lexer from a lexer specification MyLexerSpecification:

  lexer = Dhaka::Lexer.new(MyLexerSpecification)

To compile this lexer as MyLexer to a string of Ruby source:

  lexer.compile_to_ruby_source_as(:MyLexer)

Methods

Attributes

specification  [R] 

Public Class methods

Creates a new lexer from a given specification.

Public Instance methods

Compiles the lexer to Ruby code that when executed, reloads all the states and actions of the lexer into a class named lexer_class_name.

Returns a LexerRun that tokenizes input.

[Validate]