2

I'm creating a Lexer in the vein of StdLexical with a few changes in terms of behavior (but for the purposes of my question, a demonstration of how to add it to StdLexical would be fine). I'm trying to add support for recording the positions of tokens, but running into issues. If I simply try to add positioned I get the not entirely unexpected error which is basically indicating that I can't run positioned with Parsers that don't output positional.

So: How do I constrain the input to my lexer so that it can have positional parsers, OR (If this is the wrong question to be asking): What is the best way to add positional information to StdLexical?

  • Do you mean to have a list of positions where each token happens, have each token be an instance of (toke, position), or something else? – Daniel C. Sobral Feb 17 '12 at 14:34

0 Answers0