Lab for Automated Reasoning and Analysis LARA

Tools for Constructing Lexers

We can use JavaCC file to generate lexers.



javacc polyTokens.jj
javac *.java
java -cp . PolyTokenTest < TestPolyInput.poly


  • still must e.g. manually convert digit sequence into an integer
  • but easier once you know that you have correct token (we know its beginning and end)
cc09/tools_for_constructing_lexers.txt · Last modified: 2009/09/15 15:03 by vkuncak