I'm basically ready. I'm getting an error in the Grammar ctor - when called from Tool.getRootGrammar the target language is always Java. Is this intentional? (The bootstrap binaries for building the C# port are stripped to only include the CSharp3 target used to build Antlr3.exe).
Sam -----Original Message----- From: Terence Parr [mailto:[email protected]] Sent: Monday, November 29, 2010 11:42 AM To: Sam Harwell Cc: 'Johannes Luber'; [email protected] Subject: Re: please remove hasDelegates Hi. well, let's ignore cosmetic changes for now just to get this out. Can I have a green signal from you guys today? Ter On Nov 28, 2010, at 6:43 PM, Sam Harwell wrote: > (Note that the first paragraph here suggests a change for 3.3, but the > second talks about something later like 3.4) > > With this change (to TreeMap) in, the tokens in a grammar are emitted > in alphabetical, numerically ascending order, which allow you to > quickly find a token in the generated code by either name or number. I > only had to change the 3 fields of AssignTokenTypesBehavior, and code > generated by the C# and Java versions of the tool are now very close. > > I've attached ActionTranslatorJava.cs and ActionTranslatorCSharp.cs, > which is the output from each tool from my ActionTranslator.g3 > grammar. If you compare them, you'll see a number of places where the > Java version emits a good bit of redundant code. For carefully written > lexers, the redundancy was causing a ~2:1 decrease in performance. > > Sam > > -----Original Message----- > From: Terence Parr [mailto:[email protected]] > Sent: Monday, November 22, 2010 1:15 PM > To: Sam Harwell > Cc: 'Johannes Luber'; [email protected] > Subject: Re: please remove hasDelegates > > >> >> ==== On a side note, the token constants can be stabilized by (it >> really cleans up the output): >> >> 1. Use TreeMap for AssignTokenTypesBehavior.stringLiterals, tokens, >> and aliases > > doesn't LinkedHashMap keep the order? > > Thanks! > Ter > > <ActionTranslator.zip> _______________________________________________ antlr-dev mailing list [email protected] http://www.antlr.org/mailman/listinfo/antlr-dev
