![]() ![]() So strictly speaking, LR parsing (left recursion) is not possible in JavaCC. Unlike YACC (Yet Another Compiler Compiler), JavaCC is a top down parser for LL type grammars. Java Compiler Compiler is an Open Source parser generator for Java programs. Download and install a plug-in (Google for easy-javacc-1.5.7.exe, a free Eclipse plug-in for JavaCC). ![]() If you are using Eclipse, then there are free JavaCC plug-ins available. JavaCC works fine with Java VM 1.2 or greater. At the end of the tutorial, we will parse a SQL file and extract table specifications (please note that this is for an illustrative purpose complete SQL formats are not supported). This will give you an idea of creating a parser through a suitable step by step example. This article targets beginners to parser development. Once you get a good start with creating a simple parser, sure you will find it as a better alternative in many hectic situations. However, it makes your application robust and error free, particularly when dealing files with a specific format. Of course, creating a parser is time consuming since it needs iterative testing of all possible states. Most of the time, when it is needed to parse a file or stream, programmers tend to depend on " Tokenizer" or " StreamTokenizer" rather than create a parser. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |