code: def grammar():
      parenthesis = Forward()
      parenthesis <<= (
          "(" + ZeroOrMore(CharsNotIn("()") | parenthesis) + ")"
      )
  
      field_def = OneOrMore(Word(alphanums + "_\"'`:-") | parenthesis)
      field_def.setParseAction(field_act)
  
      tablename_def = Word(alphas + "`_") | QuotedString('"')
  
      field_list_def = field_def + ZeroOrMore(Suppress(",") + field_def)
      field_list_def.setParseAction(field_list_act)
  
      create_table_def = (
          Literal("CREATE")
          + "TABLE"
          + tablename_def.setResultsName("tableName")
          + "("
          + field_list_def.setResultsName("fields")
          + ")"
          + ";"
      )
      create_table_def.setParseAction(create_table_act)
  
      add_fkey_def = (
          Literal("FOREIGN")
          + "KEY"
          + "("
          + Word(alphanums).setResultsName("keyName")
          + ")"
          + "REFERENCES"
          + Word(alphanums).setResultsName("fkTable")
          + "("
          + Word(alphanums + "_").setResultsName("fkCol")
          + ")"
          + Optional(Literal("DEFERRABLE"))
          + ";"
      )
      add_fkey_def.setParseAction(add_fkey_act)
  
      other_statement_def = OneOrMore(CharsNotIn(";")) + ";"
      other_statement_def.setParseAction(other_statement_act)
  
      comment_def = "--" + ZeroOrMore(CharsNotIn("\n"))
      comment_def.setParseAction(other_statement_act)
  
      return OneOrMore(
          comment_def
          | create_table_def
          | add_fkey_def
          | other_statement_def
      )
  
file_path: auptimizer/docs/Database/sql_graphviz.py
imports: import sys
  from datetime import datetime
  from pyparsing import alphas, alphanums, Literal, Word, Forward, OneOrMore, ZeroOrMore, CharsNotIn, Suppress, QuotedString, Optional
label_desc: Use image node_id 6 for calling a global function with example usage: grammar() and returns: OneOrMore