Hi. Is anybody experienced with the grammar in formatparse.mly used by the Formatcil, specifying the constructors and deconstructors? I've made some changes to the grammar in order to support function names in deconstructors and some other small features (see email below), but it turns out that one small change upsets the entire grammar: I create 6 reduce/reduce conflicts, which upset the constructors at least (also reduce/reduce conflicts are not desirable in parsers). I can provide details on what changes I've done to the grammar.
Also, I have some questions: how does the Some(TPtr()) gets generated in the decl nonterminal, since it is used in the rule: decl: | STAR attributes decl Best regards, Alex On 2/28/2013 8:55 PM, Gabriel Kerneis wrote: > Hi Alex, > > On Thu, Feb 28, 2013 at 12:44:13AM +0200, Alex Susu wrote: >> More exactly I used to search in the C code the following deconstructors: > > Just to make sure I understand you correctly: you are happy with the current > behaviour, except for the lack of function name support? > >> Given the above examples, I would like to have a few extensions to the CIL >> deconstructors: >> - specify names of functions - currently adding real function names to >> deconstructors gives parse error > > Agreed, it would be sensible and consistent with matching parameter names. > >> - maybe specify partial names of formal arguments for functions, or maybe >> even >> use some reg-expressions. > > Unless you have a compelling use case, I'd be much more reluctant to integrate > this (my gut feeling is: very high complexity/benefit ratio). > >> As mentioned in cil.pdf, Section 6.2, the one responsible for >> (de)constructors is >> formatcil.ml (method doParse, etc). I did a strange hack in this direction, >> but I'm >> thinking to add these extensions within the formatcil.ml. > > I don't use deconstructors in my own code, but I'd be happy to integrate a > patch > adding support for names of functions. Do not hesitate if you stumble on some > difficulty while you work on it. > > Best regards, ------------------------------------------------------------------------------ Get your SQL database under version control now! Version control is standard for application code, but databases havent caught up. So what steps can you take to put your SQL databases under version control? Why should you start doing it? Read more to find out. http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk _______________________________________________ CIL-users mailing list CIL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cil-users