No description, website, or topics provided.
Latest commit d3889c4 Sep 23, 2013 @ingydotnet Merge pull request #2 from aocole/patch-1
lex() should not destroy argument
Failed to load latest commit information.
lib/scim/query/filter lex() should not destroy argument Sep 20, 2013
test Some reafactoring and better doc. Sep 18, 2013
.gemspec v0.0.2 Sep 18, 2013
.travis.yml one mo time Sep 18, 2013
CHANGELOG.yaml first commit. lexer passing all tests. Sep 17, 2013
Gemfile first commit. lexer passing all tests. Sep 17, 2013
LICENSE first commit. lexer passing all tests. Sep 17, 2013
README.rdoc ... Sep 18, 2013




scim-query-filter-parser - Parser for SCIM Filter Query Strings


require 'scim/query/filter/parser'

parser =
rpn_array = parser.parse(filter_query_string)
rpn_stack = parser.rpn
rpn_tree = parser.tree

# or (in a single statement):
rpn_array =


The SCIM spec describes a simple filter query language here:

This gem can parse one of these filter queries and produce a Reverse Polish Notation (RPN) stack representation.

For example, parse this filter query string:

userType eq "Employee" and (emails co "" or emails co "")

Into this RPN stack (array):

[userType, "Employee", eq, emails, "", co, emails, "", co, or ,and]

Or, optionally into this expression tree:

[and, [eq, userType, "Employee"], [or, [co, emails, ""], [co, emails, ""]]]


`parser =`

Creae a new parser object.


Parse a SCIM filter query. Return the parser object (self) if successful.

`array = parser.rpn`

Get the RPN array created by the most recent parse.

`tree = parser.tree`

Get the parse result converted to a tree form.


Copyright © 2013 Ingy döt Net. See LICENSE for further details.