Home | History | Annotate | Download | only in antlr3

Lines Matching refs:token_names

422 2. add a new constant, TOKEN_NAMES, which is a hash that maps types to names
436 inverse type-to-name map to its own <tt>TOKEN_NAMES</tt> table.
487 the token types as named constants, a type-to-name map constant +TOKEN_NAMES+,
507 const_set( :TOKEN_NAMES, ::ANTLR3::Constants::BUILT_IN_TOKEN_NAMES.clone )
514 define_method( :token_names ) { scheme::TOKEN_NAMES }
517 token_names[ type ] or super
522 module_function :token_name, :token_names
530 def self.build( *token_names )
531 token_names = [ token_names ].flatten!
532 token_names.compact!
533 token_names.uniq!
534 tk_class = Class === token_names.first ? token_names.shift : nil
535 value_maps, names = token_names.partition { |i| Hash === i }
607 if token_names.has_key?( type_value )
608 current_name = token_names[ type_value ]
613 token_names[ type_value ] = name
625 token_names[ type_value ] = name.to_s.freeze
635 when Integer then token_names.has_key?( name_or_value )
642 when Integer then token_names.fetch( name_or_value, nil )
643 else const_get( name_or_value.to_s ) rescue token_names.index( name_or_value )