What can be used for parser/lexer in silverlight, M Programming or ANTLR?
I am trying to create a simple parser/lexer, my problem is I have to use this in silverlight, so I need a parser/lexer that requires no runtime, it needs to have pure C# code without any dependency on any runtime. I know there used to be lex/yacc tool, but cant find it anymore for C#, I did study Sql Modelling M language, but to my understanding, it will not work inside silverlight as it needs Sql modelling runtime or some dependent components that may not be available on silverlight开发者_运维知识库 on non microsoft platform.
So M Programming looks like out, can ANTLR be used in silverlight or is there any other parser which generates all the code without any runtime dependencies?
http://irony.codeplex.com/ provides a good Parser/Lexer for expression parsing and it is straight forward to use it.
gppg and gplex should work without issue.
The Jigsaw library would meet your requirements. It has a PackRat parsing library (a recursive descent parser with memoization) that recognizes PEG grammars. Unlike Irony it requires no separate scanning phase.
精彩评论