Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with Interface #5

Open
kaby76 opened this issue Jan 11, 2016 · 2 comments
Open

Problems with Interface #5

kaby76 opened this issue Jan 11, 2016 · 2 comments

Comments

@kaby76
Copy link
Collaborator

kaby76 commented Jan 11, 2016

Hi Folks, There are problems reverse engineering interfaces--I get methods with no names. I debugged the code and found out that the code for reverse engineering is expecting a certain data structure created via the parser, but it's not created correctly. So, I've modified the code, and it now "works"--or at least somewhat better. (1) IDENTIFIER_WITH_TEMPLATE is used in many places but the synthesized attribute is not handled consistently throughout the grammar, a good programming practice. The code has been changed to reflect this. (2) In CsharpCodeAnalyzer.prototype.translateMethod = function(...) { ... if (!isConstructor) { _operation.name = methodNode.name[0].name; }, that code expects for non-constructor methods the synthesized attribute to be of a particular form. In classes, this record is constructured through production variable-declarator (why variable-declarator?). I changed the code to create the expected synthesized attribute, and all works well now. (3) There's quite a bit of shift/reduce and reduce/reduce errors in the grammar, and I don't know how this Jison parser generator works in resolving the issues, nor how to add disambiguating information to correct these problems. I would highly recommend moving to a better parser generator, line Antlr, which has been under active development for decades, includes up-to-date grammars for Java, C#, etc., and generates a JavaScript target. (4) There really should be some unit tests. The complete code is attached, and based off of v0.9.1. (5) This is a great project, but it needs work. Keep it up, please!
staruml.csharp.zip

@staruml
Copy link
Collaborator

staruml commented Jan 13, 2016

Hello @kaby76. Thank you for your nice contribution and feedback! You looks very professional in compiler construction (parsing) and C# language. So, how about to be an one of the official committers of this C# extension project? If you permit, we will give you appropriate permissions. Hope to hear positive answer from you. Thank you.

@kaby76
Copy link
Collaborator Author

kaby76 commented Jan 13, 2016

Hi StarUML,

Yes, please keep me informed. When I get some time, I'll try to set up
some unit tests, and add some code to the C# extension. Again, this
project is wonderful, and it should be supported. By the way, my name is
Ken Domino. You can reach me at [email protected], or
[email protected].

Thanks,
Ken

On 1/12/2016 9:24 PM, StarUML wrote:

Hello @kaby76 https://github.com/kaby76. Thank you for your nice
contribution and feedback! You looks very professional in compiler
construction (parsing) and C# language. So, how about to be an one of
the official committers of this C# extension project? If you permit,
we will give you appropriate permissions. Hope to hear positive answer
from you. Thank you.


Reply to this email directly or view it on GitHub
#5 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant