Mark Drew (Redux)- cf_etc...

a compendium of railo, cfml, cfeclipse and technology topics

Mark Drew (Redux)- cf_etc...

Re-Visiting the Parser in CFEclipse

July 21, 2008 ·

As some people that have been using CFEclipse for a while might have realised, there is a parser that figures out the content in a CFML file. So far, this parser has been embedded with Eclipse specific code, so I have started re-factoring this into its own project so we can test various files and use it as a project by itself. The idea is that I can scan whole folders for files and parse them and keep track of the errors and things that we would expect to find. Also, this re-factoring means that other developers and help me figure out speed improvements and bug fixes without getting caught up in Eclipse code. I haven't finished porting it (but its nearly there) and you can check out the code from: http://svn.cfeclipse.org/org.cfeclipse.cfml.parser/. You should be able to check it out into Eclipse and run the org.cfeclipse.cfml.parser.tests.ParserTest.java class passing in an argument for the location of the files you want to parse. There are still compilation errors with it, so if you want to have a go, you can get the code and get fiddling. One thing to note, is that you need to use your http://trac.cfeclipse.org username and password to get the code.

Tags: cfeclipse

3 responses

  • 1 Pat Santora // Sep 22, 2008 at 4:14 PM

    Mark,

    Great idea. I was thinking about building something like this myself but in CF itself to help with the varScoper project I am working on with Mike Schierberl. I would be more than happy to help you test this out whenever I have time available.

    I look forward to a finished product!
  • 2 Jake Munson // Sep 22, 2008 at 4:14 PM

    Great idea! I am glad you're working on this, as my only real complaints with CFE these days are with the parser. I just wish I knew Java, so I could pitch in.
  • 3 bill // Sep 22, 2008 at 4:14 PM

    Good stuff, Marc. I've been looking at parsing cfml a lot lately and am now using javacc for some instrumentation. I also had some nice success using TagSoup - just throw a cfc or cfm and it creates a DOM for you. One issue, is that it will "clean up" tags that are not closed, like cfset, which can be a problem. A first pass to find and close these out might work ...

    best,
    bill