Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register
Show
Ignore:
Timestamp:
08/18/08 18:27:47 (5 months ago)
Author:
vanand
Message:

openmrs-logic-api-refactoring: removed call to setRightOperand of LogicCriteria and the code for LogicQueryParser lives in logic folder

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs/branches/logic-api-refactoring/src/api/org/openmrs/arden/impl/ArdenServiceImpl.java

    r5268 r5309  
    502502                    return retVal; 
    503503        } 
    504         public void parseString(String inStr) { 
    505                  
    506                  try { 
    507                          byte currentBytes[] = inStr.getBytes(); 
    508                  
    509                 ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(currentBytes);  
    510                  
    511                  
    512                 AdministrationService adminService = Context.getAdministrationService(); 
    513                    
    514               // Create a scanner that reads from the input stream passed to us 
    515               ArdenBaseLexer lexer = new ArdenBaseLexer(byteArrayInputStream); 
    516  
    517               // Create a parser that reads from the scanner 
    518               ArdenBaseParser parser = new ArdenBaseParser(lexer); 
    519                
    520               // start parsing at the compilationUnit rule 
    521               parser.start_test(); 
    522                
    523               BaseAST t = (BaseAST) parser.getAST(); 
    524                
    525               //System.out.println(t.toStringTree());     // prints Abstract Syntax Tree 
    526               
    527               ArdenBaseTreeParser treeParser = new ArdenBaseTreeParser(); 
    528               
    529               LogicCriteria lc = new LogicCriteria(null); 
    530               lc = treeParser.start_test(t, lc); 
    531               System.out.println(lc.toString()); 
    532  
    533                  } 
    534                  catch(Exception e) { 
    535                         log.error(e.getStackTrace()); 
    536                     }    
    537         } 
     504         
    538505         
    539506}