PTC MKS Toolkit Knowledge Base

Section:IO
Product:MKS Lex and Yacc (None)
Version:
OS:All
Keywords:strings streams scanner yygetc
Category:General/Knowledge Base


How do I read from strings instead of streams in Lex?


Reading from strings instead of streams in a scanner is done in different ways depending on the language you program in.

There are examples in C and in C++ available within the self extracting file string.exe. We also have example of using a Macro. The C++ and Macro examples are in a file which you must download. Once you have it on your system type "string.exe -d" to extract the examples.