Class: EofToken
Instance Attribute Summary
Attributes inherited from Token
Attributes included from Indexable
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(*args) ⇒ EofToken
constructor
A new instance of EofToken.
Methods inherited from Token
#create_tree, #derives_epsilon?, #hash, #inspect, #match, #nonkernel_items, #nonterminal?, #parse_options, #terminal?, #to_src, #value
Methods included from SourceCodeDumpable
as_code, as_method_named, as_module_method_named, #create_new, indent_lines, name_hash, #new_of_my_type, #parameter_named, #to_compact_src, #to_src_in_module, #type_to_src
Constructor Details
#initialize(*args) ⇒ EofToken
Returns a new instance of EofToken.
135 136 137 138 139 140 |
# File 'lib/rpdf2txt-rockit/token.rb', line 135 def initialize(*args) # Shouldn't match anything but since I'm not sure how to do a regexp # with that chareacteristic we use a highly unlikely string in the mean # time. super("EOF", "�~~��~^^~" + rand(1e10).inspect) end |
Instance Method Details
#==(other) ⇒ Object
142 143 144 |
# File 'lib/rpdf2txt-rockit/token.rb', line 142 def ==(other) other.class == self.class end |