File: blast-parser-driver.cpp

package info (click to toggle)
librostlab-blast 1.0.1-14
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,876 kB
  • sloc: sh: 11,103; cpp: 258; makefile: 139
file content (37 lines) | stat: -rw-r--r-- 1,343 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
    Copyright (C) 2011 Laszlo Kajan, Technical University of Munich, Germany

    This file is part of librostlab.

    librostlab is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
#include "rostlab/blast-parser-driver.h"

const rostlab::blast::parser_driver::result_type&
                  rostlab::blast::parser_driver::parse( bool __trace_parsing, bool __trace_scanning )
{
  rostlab::blast::parser parser(*this, _scanner);
  parser.set_debug_level( __trace_parsing );
  trace_scanning( __trace_scanning );

  // make sure we parse into a fresh result structure
  _result = result_type();

  int res = parser.parse();
  if( res != 0 ) throw rostlab::blast::parser_error("parser error");

  return _result;
}

// vim:et:ts=4:ai: