We aggregate information from all open source repositories to provide the most of useful open source products, from Enterprise product to small libraries across all platforms. Please search and find what you want.

NaiveLanguageTools

NLT is free, open-source C# lexer and GLR parser suite — which translates to ability to parse ambiguous grammars. Grammar can be defined directly in code or (preferably) in separate file (lex/yacc-like) for included generator.

If you understand/guess the meaning of grammar in C#:

// scanning
lexer.AddStringRule(“)”, match => SymbolEnum.RPAREN);
// parsing
prod_builder.AddProduction(SymbolEnum.exp,
SymbolEnum.LPAREN, SymbolEnum.exp, SymbolEnum.RPAREN,
(_1, e, _3) => (AstNode)e);

or grammar in NLT format:

// scanning
/[A-Za-z_][A-Za-z_0-9]*/ -> IDENTIFIER, IdentifierSymbol.Create($text);
// parsing
program -> list:namespace_list
{ new Program(currCoords(), (Namespaces)list) };

you should be able to use it :-).

There is Example project included which serves as tutorial.

1 of 5

2 of 5

3 of 5

4 of 5

5 of 5

62 Reviews

  • Unlimited Calling, Faxing, Video Conferencing
  • 24/7 U.S Based Customer Support
  • Super Reliable, Simple to Use
Website http://skila.pl
Tags
License
Features
  • parser
  • lexer
  • C#
  • generator