User Profile

Collapse

Profile Sidebar

Collapse
arvindkgs
arvindkgs
Last Activity: Oct 22 '08, 09:45 AM
Joined: Oct 12 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • arvindkgs
    started a topic Clearing parser state of a bison generated parser
    in C

    Clearing parser state of a bison generated parser

    Iam using c lexer that is flex generated and a c++ parser that is bison generated. i have modified the parser to acccept only string input.
    I am calling the parser function yyparse in a loop and reading line by line of user input. I stop the loop if the input is "quit".

    The problem i am facing is that when input does'nt match any rule then, the parser stops abruptly, and at next iteration starts off
    at same...
    See more | Go to post

  • arvindkgs
    replied to lex/yacc with c++...... HELP!!!
    in C
    Although Lex and YACC predate C++, it is possible to generate a C++ parser. While Flex includes an option to generate a C++ lexer, we won't be using that, as YACC doesn't know how to deal with it directly.
    It is possible to make the yacc generate a c++ file, but the lex outputs a c file. so in order for the yacc generated file to recoginize the c functions and variables,
    To do so, make a C header in YACC like this:

    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...