Skip to content

vosen/UAM.TextProcessing

Repository files navigation

Filter editor

This application is a graphical editor for SQLesque data filtering language. Since last sentence doesn't really tell much much here's a picture that should explain it much better:

Application window

Changes to filter string (top textbox) are propagated to filter tree (right pane) and vice versa. Transformation from filter tree works by parsing the expression using ANTLR, compiling using Expression Trees and binding resulted delegate to ListView's filter, AST generated by ANTLR is bound to right pane.

Notes

  • Filtering is strongly-typed (represented by type Filter<T> where T is type of filtered object) and can filter only on properties marked with [Filterable] attribute.
  • Keywords are upper-case, strings are delimited with single quotations, object properties can be delimited with double quotations or left as is.
  • Filter tree (right pane) to filter string transformation does not preserve keywords, brackets, nor double quotations.
  • WPF part of the project was written with flagrant disregard of MVVM and is quite crappy. I've learned better since then.

About

An experiment in data filtering with C# and ANTLR

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages