Lex Question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mnogostrukost
    New Member
    • Mar 2008
    • 1

    Lex Question

    I have a lex and yacc based parser that reads it's imput from stdin.
    How to "tell" lex to read from a string?
  • gpraghuram
    Recognized Expert Top Contributor
    • Mar 2007
    • 1275

    #2
    Originally posted by mnogostrukost
    I have a lex and yacc based parser that reads it's imput from stdin.
    How to "tell" lex to read from a string?

    I have faced siilar issue before.
    What i did i printed the string to a file and opened the file and assigned it to yyin so that lex can read it.
    There may be a better solution for this also.

    Raghuram

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      Read this article.

      kind regards,

      Jos

      Comment

      Working...