This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | LALR parser for easy Erlang support | ||
---|---|---|---|
Product: | obsolete | Reporter: | _ dcaoyuan <dcaoyuan> |
Component: | languages | Assignee: | issues@obsolete <issues> |
Status: | NEW --- | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 5.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Attachments: | Erlang nbs file |
Description
_ dcaoyuan
2007-03-17 20:06:46 UTC
Created attachment 39611 [details]
Erlang nbs file
It seems the parser does not support left-recursion. Ok, I got that the "Grammar have to fulfill some rules LL(k)." from: http://wiki.netbeans.org/wiki/view/SchliemannPlannedFeatures So, I'll fix the Erlang.nbs, currently I've got 80% definitions correctly parsed. I changed this issue as feature request. To support Erlang and may other languages easily, please add also a LALR parser for language module. I've got 90% Erlang grammar definition passed now. But as current version of GLF contains simple LL syntax analyzer, it seems no possible to parse something like function declaration and function call in Erlang, here is an example: function declare: testfunc(A,B) -> A + B. function call: callfunc(A,B) -> testfunc(A,B). I define them as: function_declaration = declaration "->" exprs "."; declaration = declaration_head [clause_guard]; declaration_head = declaration_name "(" [argument_list] ")"; declaration_name = <atom>; function_call_expr = declaration_name "(" [argument_list] ")"; # which is exactly declaration_head here. Can this be parsed under current version of GLF? Ok, I've got a LL(k) definition of Erlang grammar, which is just slightly looser than the original yacc definition. Here's a snapshot of it: http://blogtrader.net/page/dcaoyuan?entry=erlang_editor_support_based_on I'd like to contribute it to NetBeans Community. Obsolete milestone, please reevaluate We do not have time to implement it to nb6.0. |