Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > 35f158ed688457959180ccd9feeb7441 > files > 27

jflex-1.4.1-11mdv2008.1.x86_64.rpm

This directory contains an interoperability example for BYacc/J and JFlex
(a small calculator)

You need the parser generator byacc/j from http://byaccj.sourceforge.net/
for this example to work (version byacc/j 1.1 has been tested).

Use the Makefile to generate the lexer and parser.
The example can then be started with

java Parser


files:

calc.flex
  JFlex specification for the lexical part of the arithmetic expressions

calc.y
  BYacc/J specification and main program for the calculator