Introduction

AnnoFlex is an annotation-based code generator for lexical scanners. It uses Java as the main language for the scanner definition and custom Javadoc tags to annotate methods with regular expressions. Javadoc tags are used to circumvent double escaping as it occurs in common Java annotations. AnnoFlex is a fast code generator which creates fast lexical scanners. It provides a lot of sophisticated features, is easy to use and has significant advantages over classical code generators.

Highlights

Advantages

Due to the fact that AnnoFlex uses Java source code files as the base for the scanner definition, it possible to use all features of your favorite IDE for the entire code of your scanner - out of the box, without any plugins and without any restrictions. This includes, but is not limited to, the following features:

Developing a lexical scanner with AnnoFlex is easier and less time-consuming than with classical generators. The main reason for that is that the code of a scanner is not just a collection of plain-text snippets that are assembled by the code generator to a compilable class. Instead, the scanner is directly written in Java and only critical parts of the lexical analysis are added by the code generator. Because of this the code of an AnnoFlex-based scanner feels like real code and not like unusable plain text. Try it out and feel the difference.