Jul 30, 2015 at 3:27 PM
Edited Jul 30, 2015 at 4:51 PM
Typename doesn't seem to have any unusual rules, I think you can use IdentifierTerminal as long as you mark } as punctuaction.
Membername/string is indeed unusual.
The comment was more because you explicitly mention having trouble with tokens, thus I recommend first trying with standard tokens and only implementing the custom tokens once the production rules are correct.
In your parse tree you get things like "Unnamed0" if you use "hidden rules". Basically if your rules contain brackets it could probably be done better. Also see 3.
Empty is the direct translation of Q() and is more or less what Irony does internally, but you could also rewrite them slightly:
arguments.Rule = (namedArgs | (positionalArgs + ("," + namedArgs).Q())).Q();
arguments.Rule = namedArgs
| namedArgs + positionalArgs
| namedArgs + positionalArgs + "," + namedArgs
positionalArgs.Rule = namedArg | (@string + ("," + positionalArgs).Q()).Q();
positionalArgs.Rule = namedArg
| @string + "," + positionalArgs;
I find the second easier to read and debug, but this might just be a personal preference though.