class_docstr: Initializes a NETReader object.
  
  Parameters
  ----------
  path : file or str
      File of net data
  
  string : str
      String of net data
  
  include_properties: boolean
      If True, gets the properties tag from the file and stores in graph properties.
  
  defaultname: int (default: "bn_model")
      Default name for the network if a network name is not available in the net file.
  
  Examples
  --------
  # asia.net file is present at
  # https://www.bnlearn.com/bnrepository/discrete-small.html#asia
  >>> from pgmpy.readwrite import NETReader
  >>> reader = NETReader("asia.net")
  >>> reader
  <pgmpy.readwrite.NET.NETReader at 0x7feac645c640>
  >>> model = reader.get_model()
docstr: A method that returns variable grammar
docstr_tok: ["A","method","that","returns","variable","grammar"]
code: def get_variable_grammar(self):
      """
      A method that returns variable grammar
      """
      # Defining an expression for valid word
      word_expr = Word(alphanums + "_" + "-")("nodename")
      name_expr = (
          Suppress("node ") + word_expr + Optional(Suppress("{"))
      )
  
      word_expr2 = Word(
          initChars=printables, excludeChars=["(", ")", ",", " "]
      )
      state_expr = ZeroOrMore(word_expr2 + Optional(Suppress(",")))
      # Defining a variable state expression
      variable_state_expr = (
          Suppress("states")
          + Suppress("=")
          + Suppress("(")
          + Group(state_expr)("statenames")
          + Suppress(")")
          + Suppress(";")
      )
      # variable states is of the form type description [args] { val1, val2 }; (comma may or may not be present)
      pexpr = (
          Word(alphas.lower())
          + Suppress("=")
          + CharsNotIn(";")
          + Suppress(";")
      )
      property_expr = ZeroOrMore(
          pexpr
      )  # Creating an expr to find property
  
      variable_property_expr = (
          Suppress("node ")
          + Word(alphanums + "_" + "-")("varname")
          + Suppress("{")
          + Group(property_expr)("properties")
          + Suppress("}")
      )
  
      return name_expr, variable_state_expr, variable_property_expr
  
imports: import collections
  from math import prod
  from string import Template
  import numpy
  from pyparsing import CharsNotIn, Group, OneOrMore, Optional, Suppress, Word, ZeroOrMore, alphanums, alphas, cppStyleComment, nums, printables
  from pgmpy.factors.discrete.CPD import TabularCPD
  from pgmpy.models import BayesianNetwork
  from pgmpy.utils import compat_fns
label_desc: Use image node_id 2 for calling the NETReader obj's underlying member method code with example usage: obj.get_variable_grammar() and returns: name_expr,  variable_state_expr,  variable_property_expr