class Antlr4::Runtime::SemanticContext
Constants
- NONE
Public Class Methods
and(a, b)
click to toggle source
# File lib/antlr4/runtime/semantic_context.rb, line 283 def self.and(a, b) return b if a.nil? || a == NONE return a if b.nil? || b == NONE result = AND.new(a, b) return result.opnds[0] if result.opnds.length == 1 result end
filter_precedence_predicates(collection)
click to toggle source
# File lib/antlr4/runtime/semantic_context.rb, line 304 def self.filter_precedence_predicates(collection) result = collection.select {|item| item.is_a? PrecedencePredicate} collection.reject! {|item| (item.is_a? PrecedencePredicate)} result end
or(a, b)
click to toggle source
# File lib/antlr4/runtime/semantic_context.rb, line 293 def self.or(a, b) return b if a.nil? return a if b.nil? return NONE if a == NONE || b == NONE OR result = OR.new(a, b) return result.opnds[0] if result.opnds.length == 1 result end
Public Instance Methods
eval(parser, parser_call_stack)
click to toggle source
# File lib/antlr4/runtime/semantic_context.rb, line 3 def eval(parser, parser_call_stack) end
eval_precedence(_parser, _parser_call_stack)
click to toggle source
# File lib/antlr4/runtime/semantic_context.rb, line 6 def eval_precedence(_parser, _parser_call_stack) self end