[antlr-interest] C# runtime libs for Silverlight?
pat at pat.net
Wed Sep 22 20:05:40 PDT 2010
On Sep 22, 2010, at 2:50 PM, Johannes Luber wrote:
>> So, do you know if I need to build both Antlr3.Runtime? and
>> (as distributed in the binary)
>> Or is the antlr.runtime there for projects compiled against an older API/
> The antlr.runtime.dll is, IIRC, from ANTLR 2 and used only for StringTemplate 3.1. I couldn't remove this dependency as ST 3.2 requires .NET 3.5 (as being built with CSharp3). I suggest to exchange the library for Silverlight ports and to build upon the current state in the repo, even if there may be some bugs left. The CSharp2 target changed so much internally that you would have to redo a port completely.
I was able today to build the runtime lib from the 3.1.3 distribution for Silverlight mostly just by redefining the missing Serializable attributes and changing the ArrayList and Hashtable to use the Generics collections. I found that the parser that I had generated (actually from a 3.2 build in ANTLRworks I think) compiled against this fine with the same kinds of changes and seems to be working in a Silverlight app... though I haven't tested it well yet.
I found that only the antlr dll was required to run the parser and that I did not need StringTemplate.
I was confused because there are two directories under the runtimes path in the distribution: CSharp and CSharp3. I initially tried to build CSharp3 but it seems incomplete so I switched to CSharp...
I'm not sure that I understand your info above...but assuming I pull the latest from github I guess I should try again to build the CSharp3 runtime? Are there any big advantages to the output aside from, I'm guessing, being a bit more concise?
More information about the antlr-interest