In case anybody else has the same problem, you get the position information from the lexbuffer. For instance:

let buff = LexBuffer<token>.FromString(s)

try

start tokenize buff

with

| ex -> raise (System.Exception(

System.String.Format("Parse failed at line {0}, column {1} ({2})",

buff.StartPos.Line, buff.StartPos.Column,

new System.String(buff.Lexeme))))

</buff>

By on 9/27/2010 12:30 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper