class Rley::Syntax::Terminal
A terminal symbol represents a class of words in the language defined the grammar.
Public Instance Methods
Source
# File lib/rley/syntax/terminal.rb, line 13 def generative? true end
An indicator that tells whether the grammar symbol can generate a non-empty string of terminals. @return [TrueClass]
Source
# File lib/rley/syntax/terminal.rb, line 27 def nullable? false end
@return [false] Return true if the symbol derives the empty string. As terminal symbol corresponds to a input token it is by definition non-nullable. @return [FalseClass]
Source
# File lib/rley/syntax/terminal.rb, line 19 def terminal? true end
Return true iff the symbol is a terminal @return [TrueClass]
Source
# File lib/rley/syntax/terminal.rb, line 33 def to_s name end
Return a readable text representation of the instance @return [String] The symbol name