How to pass a string to lex and not a file descriptor?

  • 0
    How to pass a string to lex and not a file descriptor?
    I make a parser for sql queries using the lex + yacc bundle. I need to parse requests that come over the network in real time.

    In the examples that I found, the input stream is passed as a file descriptor, and I need to parse the string that is already in the program memory using a parser.
    C++ Anonymous, Nov 16, 2020

  • 1 Answers
  • 0
    Read flex.sourceforge.net/manual/Multiple-Input-Buffers .html , near yy_scan_string
    Nicholas Ho

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!