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 -> `[^`]*`

GroupStart -> (

GroupEnd -> )

   And -> &

    Or -> |

   Not -> !

 Equal -> =

EqualCI -> ~

Greater -> >

  Less -> <

Wildcard -> *

 Regex -> $

```

Interpreter

Some example interpreters that maybe useful

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

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.