I am trying to use the CmisSimpleWalker in Chemistry to parse my SQL. It works until I pass 2 conditions within the where clause.
Here is my code http://pastebin.com/f6ea1b90e It fails in the generated CmisSimpleWalker here on line 1596. for (boolean_factor_return t : (List<boolean_factor_return>) list_list) { The reason it is faling is list_list is a CommonTree. This makes no sense to me as the only things that get added to the list are from public static class boolean_factor_return extends TreeRuleReturnScope { public boolean matches; CommonTree tree; public Object getTree() { return tree; } }; And here you can see where the generated code fills the list. Notice that getTree will always be a CommonTree. list=boolean_factor(); state._fsp--; adaptor.addChild(root_1, list.getTree()); if (list_list==null) list_list=new ArrayList(); list_list.add(list.getTree()); My question is is the grammer file in Chemistry wrong that generates this? I wouldn't think this is a bug with ANTLR. I was looking here at the grammer http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/antlr3/org/apache/chemistry/impl/simple/CmisSqlSimpleWalker.g?revision=825570&view=markup Thanks, Jason Tesser dotCMS Lead Development Manager 1-305-858-1422
