/SimpleQueryParser

A simple C query parser using flex and bison

Primary LanguageC

SimpleQueryParser

A simple query parser generated by flex and bison

Introduction

This is a simple query parser that recognizes logic queries like:

  • this that // Parsed as "this AND that"
  • this AND that
  • this AND NOT that
  • this AND NOT (he AND her)

Compile

  • $ mkdir build
  • $ cd build
  • $ cmake ..
  • $ make

Usage

./parser "this AND that"

Warning

This parser is not thread-safe since it uses global variables while parsing.

For those who may want to embed a thread-safe parser into their own application, please see SimpleQueryParser++

P.S.

This is a toy project. I tried three methods to build a query parser. You can find the other two: