C/C++/C#/VB based Lexical Analyzers
During the Compiler Design Lab hours, I'm using JLex as the Lexical Analyzer Generator, which produces a Java program from a lexical specification.
I'd like to know开发者_运维技巧 if there are other tools which can help me in the same by generating C/C++/C# or VB programs instead of a Java program, and can run in Windows.
- C#
- GPLEx is a generator for lexical scanners accepting a “LEX-like” input specification and produces a C# output file (C# 2 with generics).
- Grammatica is a C# and Java parser generator
- ANTLR parser generator that supports generating code in C, Java, Python, C#, and Objective-C
- C# Lex
- C# Flex
- Java
- JLex
- JFLex
- ANTLR
- Grammatica
- Ragel is a finite state machine compiler with output support for C, C++, Objective-C, D, Java and Ruby source code
- C/C++
- Lex
- Flex
- Flex++
- ANTLR
- Quex
- Ragel
Lex (and its variants like Flex) should be a starting point. You can download the Windows ports of these to get started. The output is in C. Additionally, look for yacc and bison if you want parser generators too. Here is a comprehensive page for all four.
Ragel can generate fast lexical analyzers from a regular language in C, C++, Objective-C, D, Java, and Ruby.
精彩评论