ridencww / goldengine

Java implementation of Devin Cook's GOLD Parser engine
Other
35 stars 14 forks source link

What is wrong with ParserTest? #11

Closed anidotnet closed 10 years ago

anidotnet commented 10 years ago

First of all thanks a lot for your work. This is a wonderful library. I am actually creating a GOLD parser engine for golang using your codebase as a standard as it has an extensive set of test cases. So while porting the codebase, I found out that one of the assert statements in ParserTest.java is commented out at Line 293. Further there was a comment saying

 will be null for 1.0 and 0 for 5.0 

but actually when I un-commented it, I can see that value of groups.size() is 2 instead of 0 or null. So I was just wondering, is there any issue or bug behind it?

Moreover, I am just curious to know, if the fixes for the issues (reported by @nimatrueway) are in the master or not?

Thanks again for your work.

ridencww commented 10 years ago

Thank you and kudos to you for porting to Go. The commented out line should have been addressed as a TO-DO, but it slipped my attention. The parser should return 2 groups as the result of a refactor of the GOLD Builder for comments. The two groups are COMMENTs (one a Comment Line and the other a Comment Block). I have updated the test to properly assert this. No changes were made in the engine itself.

All defects reported to me, including the ones by @nimatrueway are incorporated in the current engine (5.0.3-SNAPSHOT and the newly minted release 5.0.3). There have been a couple of suggestions for restructuring (variables and rule lookup) that have not moved forward.

This engine is intended to be a close port of Devin's original GOLD Engine for VB/NET and some of the structures Devin used work well in VB, but aren't optimal for Java. However, I have found the performance of the Java engine to be quite acceptable.

anidotnet commented 10 years ago

Thanks @ridencww for the reply. Closing the entry.