flex++ error, problems with yylex

guimona@jsp.umontreal.ca (Alexandre Guimond)
Mon, 24 Jan 1994 14:28:42 GMT

          From comp.compilers

Related articles
flex++ error, problems with yylex guimona@jsp.umontreal.ca (1994-01-24)
| List of all articles for this month |
Newsgroups: comp.compilers
From: guimona@jsp.umontreal.ca (Alexandre Guimond)
Keywords: flex, C++, question
Organization: Universite de Montreal
Date: Mon, 24 Jan 1994 14:28:42 GMT

Hi,


    I'm not used to work with flex++. Actualy this is the first
time. Here's an error I got:


[~/gena] make readsjt
/home/saguenay2/guimond/bin/bison++ -v -d --yacc readsjt.y
conflicts: 1 reduce/reduce
/usr/local/bin/flex++ -b -f readsjt.l
/usr/local/bin/g++ -c y.tab.c lex.yy.cc
readsjt.l:55: argument list for `yylex' does not match any in class `yyFlexLexer'
readsjt.l: In method `int yyFlexLexer::yylex()':
readsjt.l:32: type `parser' is not a base type for type `yyFlexLexer'
readsjt.l: At top level:
readsjt.l:199: argument list for `yy_get_next_buffer' does not match any in class `yyFlexLexer'
readsjt.l:301: argument list for `yy_get_previous_state' does not match any in class `yyFlexLexer'
readsjt.l:379: argument list for `yyinput' does not match any in class `yyFlexLexer'
readsjt.l:478: argument list for `yy_load_buffer_state' does not match any in class `yyFlexLexer'
make: *** [readsjt] Error 1


    What did I do wrong? Should I redefine yylex()? Here is
the body part of readsjt.y:


main()
{
    parser MyParser;


    MyParser.yyparse();
}


    Not very complicated, is it? But is it enough? Can anyone send
me .l and .y files to use with bison++ and flex++ as examples.


Any help would be greatly appreciated.


thanks.
--
Alexandre Guimond, guimona@JSP.UMontreal.CA
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.