> I'm using TP lex in my application and I would like to change the input buffer from using files to (memory) strings. What is the supposed way to do this?
>From the comments: "The variables yyinput and yyoutput are the text files which are used by the lexical analyzer. By default, they are assigned to standard input and output, but you may change these assignments to fit your target application (use the Turbo Pascal standard routines assign, reset, and rewrite for this purpose)." Thankfully, we also have: http://www.freepascal.org/docs-html/3.0.0/fcl/streamio/index.html Which can turn any TStream descendant into a TextFile. Just change Assign as in the comment above into AssignStream, everything else is totally the same. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/TP-lex-change-input-buffer-tp5724893p5724895.html Sent from the Free Pascal - General mailing list archive at Nabble.com. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal