Advertisement
yepp

parser ih

Nov 21st, 2015
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. // Generated by Bisonc++ V4.09.02 on Thu, 24 Sep 2015 17:14:55 +0200
  2.  
  3. // Include this file in the sources of the class Parser.
  4.  
  5. // $insert class.h
  6. #include "Parser.h"
  7. #include <cstdlib>
  8.  
  9. inline void Parser::error(char const *msg)
  10. {
  11. std::cerr << msg << '\n';
  12. exit(1);
  13. }
  14.  
  15. // $insert lex
  16. inline int Parser::lex()
  17. {
  18. int ret = lexer.yylex();
  19. d_loc__.first_line = lexer.lineno();
  20. if( ret == AZONOSITO ) {
  21. d_val__.szoveg = new std::string(lexer.YYText());
  22. }
  23. return ret;
  24. }
  25.  
  26. inline void Parser::print()
  27. {
  28. print__(); // displays tokens if --print was specified
  29. }
  30.  
  31. inline void Parser::exceptionHandler__(std::exception const &exc)
  32. {
  33. throw; // re-implement to handle exceptions thrown by actions
  34. }
  35.  
  36.  
  37. // Add here includes that are only required for the compilation
  38. // of Parser's sources.
  39.  
  40.  
  41.  
  42. // UN-comment the next using-declaration if you want to use
  43. // int Parser's sources symbols from the namespace std without
  44. // specifying std::
  45.  
  46. //using namespace std;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement