Parsing SQL like syntax, design pattern
I am trying mock sql syntax to build a simple sql like interface to a key-value storage. The values are essentially POJOs An example would be select A.B.C from OBJ_POOL where A.B.X = 45 AND A.B.Y > '88' AND A.B.Z != 'abc'; OBJ_POOL is just a list of POJOs of the same class. In this example A would be the base class. Class A Class B String C Integer X String Y String Z Now A.B.C is equivalent A.getB().getC() I am using Antlr to parse the above statement to get an AST, and then hoping to use Apache BeanUtils to reflectively get/set the field names. I wrote the grammar thats builds an AST Now I