3

I am playing with the Racket recently, currently implementing a lexer for a subset of scripting language...and wondering whether there are more examples to show how to use the lexer generator in Racket?

I understand the calculator example in the doc, but it is too simple to show the full features... I am especially curious how to reference position of each character....

  • Before answering this question: when you say "reference position of each character", you mean that you want a parsed representation that preserves information about the location of each token in the original source? – John Clements Jan 28 '11 at 20:32

1 Answers1

3

The libraries at PLaneT are a great resource for more elaborate examples. Try for example the Infix Parser .

soegaard
  • 30,661
  • 4
  • 57
  • 106