Sha256: 486a430b1635ef79b7ee73ad403234dc8ba7d22009f14a4a3d1ef590b628607c

Contents?: true

Size: 715 Bytes

Versions: 26

Compression:

Stored size: 715 Bytes

Contents

require_relative 'terminal' # Load superclass

module Rley # This module is used as a namespace
  module Syntax # This module is used as a namespace
    # A verbatim word is terminal symbol that represents one unique word
    # in the language defined the grammar.
    class VerbatimSymbol < Terminal
      # The exact text representation of the word.
      attr_reader(:text)

      def initialize(aText)
        super(aText)  # Do we need to separate the text from the name?
        @text = aText.dup
      end
      
      # The String representation of the verbatim symbol
      # @return [String]
      def to_s()
        return "'#{text}'"
      end
    end # class
  end # module
end # module

# End of file

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
rley-0.2.10 lib/rley/syntax/verbatim_symbol.rb
rley-0.2.09 lib/rley/syntax/verbatim_symbol.rb
rley-0.2.08 lib/rley/syntax/verbatim_symbol.rb
rley-0.2.06 lib/rley/syntax/verbatim_symbol.rb
rley-0.2.05 lib/rley/syntax/verbatim_symbol.rb
rley-0.2.04 lib/rley/syntax/verbatim_symbol.rb
rley-0.2.03 lib/rley/syntax/verbatim_symbol.rb
rley-0.2.02 lib/rley/syntax/verbatim_symbol.rb
rley-0.2.01 lib/rley/syntax/verbatim_symbol.rb
rley-0.2.00 lib/rley/syntax/verbatim_symbol.rb
rley-0.1.12 lib/rley/syntax/verbatim_symbol.rb
rley-0.1.11 lib/rley/syntax/verbatim_symbol.rb
rley-0.1.10 lib/rley/syntax/verbatim_symbol.rb
rley-0.1.09 lib/rley/syntax/verbatim_symbol.rb
rley-0.1.08 lib/rley/syntax/verbatim_symbol.rb
rley-0.1.07 lib/rley/syntax/verbatim_symbol.rb
rley-0.1.06 lib/rley/syntax/verbatim_symbol.rb
rley-0.1.05 lib/rley/syntax/verbatim_symbol.rb
rley-0.1.04 lib/rley/syntax/verbatim_symbol.rb
rley-0.1.03 lib/rley/syntax/verbatim_symbol.rb