Re: [cedet-semantic] Constructing the semantic parse tree
Brought to you by:
zappo
From: Eric M. L. <er...@si...> - 2013-06-22 12:43:43
|
Hi Thomas, So you know, there is an erlang parser already in the semantic/bovine/erlang.by parser. As far as I know, it parses, but we don't have much in the way of tests, etc. To do what you are looking to work on, check: http://cedet.sourceforge.net/addlang.shtml and I think you would need Step 2, 4, and perhaps 5. Step 5 helps get the context analyzer up which is useful for refactoring. Since there are pretty good defaults already for 2,4, and 5, the work there might be easy. (ie - a small # of things to overload.) After then, look at semantic/symref.el and semantic/symref/* which is a simple framework from which some kinds of refactoring can take place. At the moment, just renames is done. If you make some big changes and would like to contribute to CEDET, you will need to sign papers with the FSF for contributions to Emacs and CEDET. If you are interested, I can send you the form. Good Luck Eric On 06/22/2013 07:23 AM, Thomas Järvstrand wrote: > Thank you, that explains a lot, I will have to think on this for a bit > then. The idea was to use semantic to provide refactoring features and > context-sensitive auto-completion for an Erlang dev environment package > that I'm working on. > > T > > On 21 Jun 2013 21:46, "Stephen Leake" <ste...@st... > <mailto:ste...@st...>> wrote: > > Thomas Järvstrand <tja...@gm... > <mailto:tja...@gm...>> writes: > > > What I don't understand is how I would go about constructing tags > that have > > children. For example, I'm working with the Erlang language right > now. I > > have bovine grammar with the rule (I'm aware the rule is in no > way complete > > or probably even correct, I'm still just trying to understand how > things > > work): > > > > function-clause > > : function-name LPAREN arguments RPAREN ARROW body PERIOD > > (FUNCTION-TAG $1 'function $3) > > > > What do I do with the body ($6)? How do I get it parsed and > included in the > > parse tree? > > What do you plan to do with the parse tree? > > That strongly influences how you build it. > -- > -- Stephe > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > > > > _______________________________________________ > cedet-semantic mailing list > ced...@li... > https://lists.sourceforge.net/lists/listinfo/cedet-semantic |