External/Tools/AS2API/parse/lexer.rb
# This is a naive lexer implementation that considers input line-by-line,
# with special cases to handle multiline tokens (strings, comments).
# spacial care must be taken to declaire tokens in the 'correct' order (as
# the fist match wins), and to cope with keyword/identifier ambiguity
# (keywords have '\b' regexp-lookahead appended)
This is a naive lexer implementation that considers input line-by-line,
with special cases to handle multiline tokens (strings, comments).
spacial care must be taken to declaire tokens in the 'correct' order (as
the fist match wins), and to cope with keyword/identifier ambiguity
(keywords have '\b' regexp-lookahead appended)
This is a naive lexer implementation that considers input line - by - line with special cases to handle multiline tokens ( strings comments ) . spacial care must be taken to declaire tokens in the ' correct ' order ( as the fist match wins ) and to cope with keyword / identifier ambiguity ( keywords have ' \ b ' regexp - lookahead appended )
def create_keytoken_class(name)
    the_class = Class.new(ASToken)
    the_class.class_eval <<-EOE
    def initialize(lineno)
      super("#{name}", lineno)
    end
    EOE
    @token_module.const_set("#{name.capitalize}Token".to_sym, the_class)
  end
def create_keytoken_class ( name ) the_class = Class . new ( ASToken ) the_class . class_eval <<-EOE 
    def initialize(lineno)
      super(" #{ name } ", lineno)
    end
     EOE @token_module . const_set ( "#{name.capitalize}Token" . to_sym , the_class ) end
This is a naive lexer implementation that considers input line-by-line,
with special cases to handle multiline tokens (strings, comments).
This is a naive lexer implementation that considers input line - by - line with special cases to handle multiline tokens ( strings comments ) .
name
<not_specific>