FLP-GSP

Crates.io Crates.io Crates.io

General Search Parser

General Search String (GSS) Builder

Goto the page.

General Search String (GSS) LALR(1) Grammar

``` Search -> Statements

Statements -> -> Statements Relation

Relation -> GroupStart Comparison GroupEnd -> GroupStart Relation And Relation GroupEnd -> GroupStart Relation And Comparison GroupEnd -> GroupStart Comparison And Relation GroupEnd -> GroupStart Comparison And Comparison GroupEnd -> GroupStart Relation Or Relation GroupEnd -> GroupStart Relation Or Comparison GroupEnd -> GroupStart Comparison Or Relation GroupEnd -> GroupStart Comparison Or Comparison GroupEnd -> GroupStart Not Relation GroupEnd -> GroupStart Not Comparison GroupEnd

Comparison -> Str Equal Str -> Str EqualCI Str -> Str Greater Str -> Str Less Str -> Str Wildcard Str -> Str Regex Str -> Str In Array -> Str IsNone

   Str -> `[^`]*`

 Array -> \[[^\[,]*\w*(,[^\[,]*)*\]

GroupStart -> (

GroupEnd -> )

   And -> &

    Or -> |

   Not -> !

 Equal -> =

EqualCI -> ~

Greater -> >

  Less -> <

Wildcard -> *

 Regex -> $

    In -> ?

IsNone -> -

```

Interpreter

Some example interpreters that maybe useful, need to be enabled by feature

Evaluate ["evaluate"]

Customizable in-code evaluating interpreter. Goto the file.

An example could be found here.

Concept

To evaluate a Search, you will need EvaluateRules and EvaluatePairs.

Mysql ["mysql"]

Generating Mysql condition clause. Goto the file.

An example could be found here.

Concept

To generate Mysql condition clause from a Search, you will need MysqlRenames and MysqlTypes.

Postgres ["postgres"]

Very similar to Mysql except for some types.