Class BricsAmbiguity


  • public class BricsAmbiguity
    extends java.lang.Object
    Use the Brics ambiguity analyzer.
    • Constructor Summary

      Constructors 
      Constructor Description
      BricsAmbiguity()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void checkGrammar​(Grammar grammar, NonterminalSymbol seed, java.io.PrintWriter report)
      Check the grammar for ambiguity.
      dk.brics.automaton.Automaton getAutomaton​(java.lang.String charClass)
      Get the automaton for checkig a character class.
      boolean getCheckSucceeded()
      Did the attempt to analyze ambiguity succeed?
      boolean getReliable()
      Is the report reliable?
      boolean getUnambiguous()
      Is the grammar unambiguous?
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BricsAmbiguity

        public BricsAmbiguity()
    • Method Detail

      • getReliable

        public boolean getReliable()
        Is the report reliable?
        Returns:
        true if it is.
      • getUnambiguous

        public boolean getUnambiguous()
        Is the grammar unambiguous?
        Returns:
        true if it is.
      • getCheckSucceeded

        public boolean getCheckSucceeded()
        Did the attempt to analyze ambiguity succeed?
        Returns:
        true if it did.
      • checkGrammar

        public void checkGrammar​(Grammar grammar,
                                 NonterminalSymbol seed,
                                 java.io.PrintWriter report)
        Check the grammar for ambiguity.
        Parameters:
        grammar - the grammar.
        seed - the seed.
        report - Where to write the ambiguity report.
      • getAutomaton

        public dk.brics.automaton.Automaton getAutomaton​(java.lang.String charClass)
        Get the automaton for checkig a character class.
        Parameters:
        charClass - the class.
        Returns:
        the automaton.