class CLTK::Lexers::EBNF
- CLTK::Lexers::EBNF
- CLTK::Lexer
- Reference
- Object
Overview
The EBNF lexer is used by the CLTK::CFG class.
Defined in:
cltk/lexers/ebnf.crConstructors
-
.new
The EBNF lexer is used by the CLTK::CFG class.
Instance Method Summary
-
#lex(string, file_name = nil)
Lexes a string using the encapsulated environment.
-
#lex_file(file_name)
Lexes a file using the encapsulated environment.
Instance methods inherited from class CLTK::Lexer
env
env,
start_state
start_state
Class methods inherited from class CLTK::Lexer
lex(string, file_name = nil, env = @@env.new(@@start_state))
lex,
lex_file(file_name, env = @@env.new(@start_state))
lex_file,
match_first
match_first,
rule(pattern, state = :default, flags = [] of String)
rule,
start(state)
start,
start_state
start_state
Instance methods inherited from class Object
in?(collection : Array | Set)
in?
Constructor Detail
Instance Method Detail
def lex(string, file_name = nil)
#
Lexes a string using the encapsulated environment.
@param [String] string String to be lexed. @param [String] file_name File name used for Token positions.
@return [Array
def lex_file(file_name)
#
Lexes a file using the encapsulated environment.
@param [String] file_name File to be lexed.
@return [Array