Sha256: 5401a3705f2952b7b6cd9ff1e94bd6888db05850879175396495818f55f6ebd5

Contents?: true

Size: 511 Bytes

Versions: 9

Compression:

Stored size: 511 Bytes

Contents

# frozen_string_literal: true

require_relative 'terminal' # Load superclass

module Rley # This module is used as a namespace
  module Syntax # This module is used as a namespace
    # A literal is terminal symbol that matches a lexical pattern
    class Literal < Terminal
      # The exact text representation of the word.
      attr_reader(:pattern)

      def initialize(aName, aPattern)
        super(aName)
        @pattern = aPattern
      end
    end # class
  end # module
end # module

# End of file

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rley-0.8.03 lib/rley/syntax/literal.rb
rley-0.8.02 lib/rley/syntax/literal.rb
rley-0.8.01 lib/rley/syntax/literal.rb
rley-0.8.00 lib/rley/syntax/literal.rb
rley-0.7.08 lib/rley/syntax/literal.rb
rley-0.7.07 lib/rley/syntax/literal.rb
rley-0.7.06 lib/rley/syntax/literal.rb
rley-0.7.05 lib/rley/syntax/literal.rb
rley-0.7.04 lib/rley/syntax/literal.rb