// NewParser initializes the resources for a parser.
//
// Make sure to Close the parser when you're done with it.
7544
func NewParser(m *Mrb) *Parser {
	p := C.mrb_parser_new(m.state)

	// Set capture_errors to true so we don't go just printing things
	// out to stdout.
	C._go_mrb_parser_set_capture_errors(p, 1)

	return &Parser{
		mrb:    m,
		parser: p,
	}
}
494552
func BuildParser(w io.Writer, g *ast.Grammar, opts ...Option) error {
	b := &builder{w: w, recvName: "c"}
	b.setOptions(opts)
	return b.buildParser(g)
}
450706
func New(r io.Reader) *Parser {
	return &Parser{r: r, Wg: &sync.WaitGroup{}}
}
1101264
func newBytesBinParser(b []byte) *binParser {
	p := &binParser{bufio.NewReader(bytes.NewReader(b)), 0, 0}
	if p.r == nil {
		return nil
	}
	return p
}
412770
func NewReader(r io.Reader, limiter Limiter) io.Reader {
	return &reader{r, limiter}
}
673099
func NewParser(builder builder.TestSuitesBuilder, stream bool) parser.TestOutputParser {
	return stack.NewParser(builder, newTestDataParser(), newTestSuiteDataParser(), stream)
}
619970
func (s *Stdin) NewReader(id string) (io.ReadCloser, error) {
	return os.Stdin, nil
}
36648
func NewConfigurationParser(installationFilePath string) *ConfigurationParser {
	is := InstallationSettings{}
	b, _ := ioutil.ReadFile(installationFilePath)
	if err := json.Unmarshal(b, &is); err != nil {
		lo.G.Error("Unmarshal installation settings error", err)
	}
    is.SetPGDumpUtilVersions()
	return &ConfigurationParser{
		InstallationSettings: is,
	}
}
1211759
func NewParser(options ...func(*Parser)) *Parser {
	p := &Parser{helperBuf: new(bytes.Buffer)}
	for _, opt := range options {
		opt(p)
	}
	return p
}
1155805
func newParser(r io.Reader, contentType string, baseURL *url.URL) (*parser, error) {
	r, err := charset.NewReader(r, contentType)
	if err != nil {
		return nil, err
	}

	tree, err := html.Parse(r)
	if err != nil {
		return nil, err
	}

	return &parser{
		tree:            tree,
		data:            &Microdata{},
		baseURL:         baseURL,
		identifiedNodes: make(map[string]*html.Node),
	}, nil
}
699784
func GetParser(buf []byte) Parser {
	for _, p := range parsers() {
		b := bytes.NewBuffer(buf)
		if p.Init(b) {
			return p
		}
	}

	return nil
}
630071
func (c *Context) JSONParser() (*simplejson.Json, error) {
	res := c.Response()
	defer res.Body.Close()
	return simplejson.NewFromReader(res.Body)
}
1350130
func NewCronParser() *CronParser {
	return &CronParser{
		Environment: make(map[string]string),
		CronTab:     make([]*CronEntry, 0),
	}
}
1241205
func NewReader(r io.Reader) *Reader {
	return &Reader{
		br: bufio.NewReader(r),
	}
}
834542
func NewFloatTypeParser(setter SetFloatFunc) *FloatTypeParser {
	parser := new(FloatTypeParser)
	parser.setter = setter
	return parser
}
415646
func (p *ParserFactory) Create(connection *proxylib.Connection) proxylib.Parser {
	log.Debugf("ParserFactory: Create: %v", connection)
	return &Parser{
		connection: connection,
	}
}
1219668
func NewParser(r io.Reader) *Parser {
	return &Parser{
		r:     buffer.NewLexer(r),
		state: []State{ValueState},
	}
}