Class: Lrama::Warnings
- Inherits:
-
Object
- Object
- Lrama::Warnings
- Defined in:
- lib/lrama/warnings.rb,
lib/lrama/warnings/required.rb,
lib/lrama/warnings/conflicts.rb,
lib/lrama/warnings/implicit_empty.rb,
lib/lrama/warnings/name_conflicts.rb,
lib/lrama/warnings/redefined_rules.rb,
lib/lrama/warnings/useless_precedence.rb
Defined Under Namespace
Classes: Conflicts, ImplicitEmpty, NameConflicts, RedefinedRules, Required, UselessPrecedence
Instance Method Summary collapse
-
#initialize(logger, warnings) ⇒ Warnings
constructor
A new instance of Warnings.
- #warn(grammar, states) ⇒ Object
Constructor Details
#initialize(logger, warnings) ⇒ Warnings
Returns a new instance of Warnings.
14 15 16 17 18 19 20 21 |
# File 'lib/lrama/warnings.rb', line 14 def initialize(logger, warnings) @conflicts = Conflicts.new(logger, warnings) @implicit_empty = ImplicitEmpty.new(logger, warnings) @name_conflicts = NameConflicts.new(logger, warnings) @redefined_rules = RedefinedRules.new(logger, warnings) @required = Required.new(logger, warnings) @useless_precedence = UselessPrecedence.new(logger, warnings) end |
Instance Method Details
#warn(grammar, states) ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/lrama/warnings.rb', line 24 def warn(grammar, states) @conflicts.warn(states) @implicit_empty.warn(grammar) @name_conflicts.warn(grammar) @redefined_rules.warn(grammar) @required.warn(grammar) @useless_precedence.warn(grammar, states) end |