Class SerializedGrammar


  • public class SerializedGrammar
    extends java.lang.Object
    • Field Detail

      • name

        public java.lang.String name
      • type

        public char type
      • rules

        public java.util.List rules
    • Constructor Detail

      • SerializedGrammar

        public SerializedGrammar​(java.lang.String filename)
                          throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • readFile

        protected void readFile​(java.io.DataInputStream in)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • readRules

        protected java.util.List readRules​(java.io.DataInputStream in,
                                           int numRules)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • readRule

        protected SerializedGrammar.Rule readRule​(java.io.DataInputStream in)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • readBlock

        protected SerializedGrammar.Block readBlock​(java.io.DataInputStream in)
                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • readAlt

        protected java.util.List readAlt​(java.io.DataInputStream in)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • readString

        protected java.lang.String readString​(java.io.DataInputStream in)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object