Thursday, 15 September 2011

regex - Automatic Documentation - Best method for creating a quick parser -


So I need to edit that end users a great script that requires redundant comment somewhat. I own this

  // ******************** // // // similar files the file name for a includes using script layout: // - function X - is a // - function Y - is something else // // ****************** ** // **** does **************** // function x // (& lt; & lt; I only want one entry in this part Are) // ******** ******************* Code here ... // **************************************** *** // function y // else does // ******************** // code here ...  

I make a simple parser that makes Examination want header copy / paste the file list function. I am locating several devices that can help in completing it, like ANTLR and even RegEx, but what would be the best way?

In view of the two options you have given, looking at the ANLR and reggae, I will suggest the ANLR. Aantielar longer will be more flexible, and I believe you should be able to use it effectively (it is based in grammar). Regex approach will be limited to regular languages, as long as you add to some custom logic and whatnot

As an example, I suspect that you can block the block out of the block with regular expressions Recognize the comments with difficulty. Cfg should be able to fix such distinction. Again, if you have control over the source, then what kind of comments can you draft some characteristics ... ...


No comments:

Post a Comment