class_docstr: A hand-written query parser built on modular plug-ins. The default
  configuration implements a powerful fielded query language similar to
  Lucene's.
  
  You can use the ``plugins`` argument when creating the object to override
  the default list of plug-ins, and/or use ``add_plugin()`` and/or
  ``remove_plugin_class()`` to change the plug-ins included in the parser.
  
  >>> from whoosh import qparser
  >>> parser = qparser.QueryParser("content", schema)
  >>> parser.remove_plugin_class(qparser.WildcardPlugin)
  >>> parser.add_plugin(qparser.PrefixPlugin())
  >>> parser.parse(u"hello there")
  And([Term("content", u"hello"), Term("content", u"there")])
class_docstr_tok: ["A","hand-written","query","parser","built","on","modular","plug-ins",".","The","default","configuration","implements","a","powerful","fielded","query","language","similar","to","Lucene","'s",".","You","can","use","the","``","plugins","``","argument","when","creating","the","object","to","override","the","default","list","of","plug-ins",",","and\/or","use","``","add_plugin","(",")","``","and\/or","``","remove_plugin_class","(",")","``","to","change","the","plug-ins","included","in","the","parser",".",">",">",">","from","whoosh","import","qparser",">",">",">","parser","=","qparser.QueryParser","(","``","content","''",",","schema",")",">",">",">","parser.remove_plugin_class","(","qparser.WildcardPlugin",")",">",">",">","parser.add_plugin","(","qparser.PrefixPlugin","(",")",")",">",">",">","parser.parse","(","u","''","hello","there","''",")","And","(","[","Term","(","``","content","''",",","u","''","hello","''",")",",","Term","(","``","content","''",",","u","''","there","''",")","]",")"]
docstr: Returns a group of syntax nodes corresponding to the given text,
  created by matching the Taggers provided by the parser's plugins.
  
  :param text: the text to tag.
  :param pos: the position in the text to start tagging at.
docstr_tok: ["Returns","a","group","of","syntax","nodes","corresponding","to","the","given","text",",","created","by","matching","the","Taggers","provided","by","the","parser","'s","plugins",".",":","param","text",":","the","text","to","tag",".",":","param","pos",":","the","position","in","the","text","to","start","tagging","at","."]
code: def tag(self, text, pos=0, debug=False):
      """Returns a group of syntax nodes corresponding to the given text,
      created by matching the Taggers provided by the parser's plugins.
  
      :param text: the text to tag.
      :param pos: the position in the text to start tagging at.
      """
  
      # The list out output tags
      stack = []
      # End position of the previous match
      prev = pos
      # Priorized list of taggers provided by the parser's plugins
      taggers = self.taggers()
      if debug:
          print_debug(debug, "Taggers: %r" % taggers)
  
      # Define a function that will make a WordNode from the "interstitial"
      # text between matches
      def inter(startchar, endchar):
          n = syntax.WordNode(text[startchar:endchar])
          n.startchar = startchar
          n.endchar = endchar
          return n
  
      while pos < len(text):
          node = None
          # Try each tagger to see if it matches at the current position
          for tagger in taggers:
              node = tagger.match(self, text, pos)
              if node is not None:
                  if node.endchar <= pos:
                      raise Exception(
                          "Token %r did not move cursor forward."
                          " (%r, %s)" % (tagger, text, pos)
                      )
                  if prev < pos:
                      tween = inter(prev, pos)
                      if debug:
                          print_debug(debug, "Tween: %r" % tween)
                      stack.append(tween)
  
                  if debug:
                      print_debug(
                          debug,
                          "Tagger: %r at %s: %r" % (tagger, pos, node),
                      )
                  stack.append(node)
                  prev = pos = node.endchar
                  break
  
          if not node:
              # No taggers matched, move forward
              pos += 1
  
      # If there's unmatched text left over on the end, put it in a WordNode
      if prev < len(text):
          stack.append(inter(prev, len(text)))
  
      # Wrap the list of nodes in a group node
      group = self.group(stack)
      if debug:
          print_debug(debug, "Tagged group: %r" % group)
      return group
  
imports: import sys
  from whoosh import query
  from whoosh.compat import text_type
  from whoosh.qparser import syntax
  from whoosh.qparser.common import print_debug, QueryParserError
label_desc: Use image node_id 14 for calling the QueryParser obj's underlying member method code with example usage: obj.tag(text, pos, debug) and returns: group, n