class ANTLR3::AST::Wizard::Pattern
A simple tree class that represents the skeletal structure of tree. It is used to validate tree structures as well as to extract nodes that match the pattern.
Attributes
has_text_arg[RW]
has_text_arg?[RW]
label[RW]
Public Class Methods
new( payload )
click to toggle source
Calls superclass method
ANTLR3::AST::CommonTree::new
# File lib/antlr3/tree/wizard.rb, line 292 def initialize( payload ) super( payload ) @label = nil @has_text_arg = nil end
parse( pattern_str, scheme )
click to toggle source
# File lib/antlr3/tree/wizard.rb, line 283 def self.parse( pattern_str, scheme ) PatternParser.parse( pattern_str, scheme, PatternAdaptor.new( scheme.token_class ) ) end
Public Instance Methods
to_s()
click to toggle source
Calls superclass method
ANTLR3::AST::CommonTree#to_s
# File lib/antlr3/tree/wizard.rb, line 298 def to_s prefix = @label ? '%' << @label << ':' : '' return( prefix << super ) end