black@LAPTOP-AV68QI6I MINGW64 ~/Desktop/projects/C++
$ gcc scanner.cpp lex.yy.cpp -o scanner
scanner.l:25:16: error: macro "yywrap" passed 1 arguments, but takes just 0
int yywrap(void) {
^
lex.yy.cpp:233:18: error: expected unqualified-id before numeric constant
#define yywrap() 1
^
FlexLexer.h:145:15: note: in expansion of macro 'yywrap'
virtual int yywrap();
^~~~~~
lex.yy.cpp: In member function 'virtual int yyFlexLexer::yylex()':
lex.yy.cpp:496:12: error: 'cin' was not declared in this scope
yyin = &cin;
^~~
lex.yy.cpp:496:12: note: suggested alternative:
In file included from FlexLexer.h:51,
from lex.yy.cpp:239:
C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86 _64-w64-mingw32/8.1.0/include/c++/iostream:60:18: note: 'std::cin'
extern istream cin; /// Linked to standard input
^~~
lex.yy.cpp:499:13: error: 'cout' was not declared in this scope
yyout = &cout;
^~~~
lex.yy.cpp:499:13: note: suggested alternative:
In file included from FlexLexer.h:51,
from lex.yy.cpp:239:
C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86 _64-w64-mingw32/8.1.0/include/c++/iostream:61:18: note: 'std::cout'
extern ostream cout; /// Linked to standard output
^~~~
lex.yy.cpp:501:10: error: 'yy_current_buffer' was not declared in this scope
if ( ! yy_current_buffer )
^~~~~~~~~~~~~~~~~
lex.yy.cpp:501:10: note: suggested alternative: 'yy_create_buffer'
if ( ! yy_current_buffer )
^~~~~~~~~~~~~~~~~
yy_create_buffer
lex.yy.cpp:628:8: error: 'yy_current_buffer' was not declared in this scope
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
^~~~~~~~~~~~~~~~~
lex.yy.cpp:628:8: note: suggested alternative: 'yy_create_buffer'
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
^~~~~~~~~~~~~~~~~
yy_create_buffer
lex.yy.cpp:651:23: error: 'yy_current_buffer' was not declared in this scope
if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
^~~~~~~~~~~~~~~~~
lex.yy.cpp:651:23: note: suggested alternative: 'yy_create_buffer'
if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
^~~~~~~~~~~~~~~~~
yy_create_buffer
lex.yy.cpp: At global scope:
lex.yy.cpp:748:46: error: 'ostream' has not been declared
yyFlexLexer::yyFlexLexer( istream* arg_yyin, ostream* arg_yyout )
^~~~~~~
lex.yy.cpp:748:1: error: no declaration matches 'yyFlexLexer::yyFlexLexer(istrea m*, int*)'
yyFlexLexer::yyFlexLexer( istream* arg_yyin, ostream* arg_yyout )
^~~~~~~~~~~
In file included from lex.yy.cpp:239:
FlexLexer.h:119:7: note: candidates are: 'yyFlexLexer::yyFlexLexer(const yyFlexL exer&)'
class yyFlexLexer : public FlexLexer {
^~~~~~~~~~~
FlexLexer.h:124:3: note: 'yyFlexLexer::yyFlexLexer(std::istream* , std:
stream*)'
yyFlexLexer( std::istream* arg_yyin = 0, std:
stream* arg_yyout = 0 );
^~~~~~~~~~~
FlexLexer.h:123:3: note: 'yyFlexLexer::yyFlexLexer(std::istream& , std:
stream&)'
yyFlexLexer( std::istream& arg_yyin, std:
stream& arg_yyout );
^~~~~~~~~~~
FlexLexer.h:119:7: note: 'class yyFlexLexer' defined here
class yyFlexLexer : public FlexLexer {
^~~~~~~~~~~
lex.yy.cpp: In destructor 'virtual yyFlexLexer::~yyFlexLexer()':
lex.yy.cpp:780:20: error: 'yy_current_buffer' was not declared in this scope
yy_delete_buffer( yy_current_buffer );
^~~~~~~~~~~~~~~~~
lex.yy.cpp:780:20: note: suggested alternative: 'yy_create_buffer'
yy_delete_buffer( yy_current_buffer );
^~~~~~~~~~~~~~~~~
yy_create_buffer
lex.yy.cpp: At global scope:
lex.yy.cpp:783:52: error: 'ostream' has not been declared
void yyFlexLexer::switch_streams( istream* new_in, ostream* new_out )
^~~~~~~
lex.yy.cpp:783:6: error: no declaration matches 'void yyFlexLexer::switch_stream s(istream*, int*)'
void yyFlexLexer::switch_streams( istream* new_in, ostream* new_out )
^~~~~~~~~~~
In file included from lex.yy.cpp:239:
FlexLexer.h:144:16: note: candidates are: 'virtual void yyFlexLexer::switch_stre ams(std::istream*, std:
stream*)'
virtual void switch_streams( std::istream* new_in = 0, std:
stream* new_out = 0 );
^~~~~~~~~~~~~~
FlexLexer.h:143:16: note: 'virtual void yyFlexLexer::switch_stre ams(std::istream&, std:
stream&)'
virtual void switch_streams( std::istream& new_in, std:
stream& new_out );
^~~~~~~~~~~~~~
FlexLexer.h:119:7: note: 'class yyFlexLexer' defined here
class yyFlexLexer : public FlexLexer {
^~~~~~~~~~~
lex.yy.cpp: In member function 'virtual int yyFlexLexer::LexerInput(char*, int)' :
lex.yy.cpp:801:11: error: base operand of '->' has non-pointer type 'std::istrea m' {aka 'std::basic_istream<char>'}
if ( yyin->eof() || yyin->fail() )
^~
lex.yy.cpp:801:26: error: base operand of '->' has non-pointer type 'std::istrea m' {aka 'std::basic_istream<char>'}
if ( yyin->eof() || yyin->fail() )
^~
lex.yy.cpp:805:6: error: base operand of '->' has non-pointer type 'std::istream ' {aka 'std::basic_istream<char>'}
yyin->get( buf[0] );
^~
lex.yy.cpp:807:11: error: base operand of '->' has non-pointer type 'std::istrea m' {aka 'std::basic_istream<char>'}
if ( yyin->eof() )
^~
lex.yy.cpp:810:11: error: base operand of '->' has non-pointer type 'std::istrea m' {aka 'std::basic_istream<char>'}
if ( yyin->bad() )
^~
lex.yy.cpp: In member function 'virtual void yyFlexLexer::LexerOutput(const char *, int)':
lex.yy.cpp:827:14: error: base operand of '->' has non-pointer type 'std:
strea m' {aka 'std::basic_ostream<char>'}
(void) yyout->write( buf, size );
^~
lex.yy.cpp: In member function 'int yyFlexLexer::yy_get_next_buffer()':
lex.yy.cpp:840:24: error: 'yy_current_buffer' was not declared in this scope
register char *dest = yy_current_buffer->yy_ch_buf;
^~~~~~~~~~~~~~~~~
lex.yy.cpp:840:24: note: suggested alternative: 'yy_create_buffer'
register char *dest = yy_current_buffer->yy_ch_buf;
^~~~~~~~~~~~~~~~~
yy_create_buffer
lex.yy.cpp: In member function 'void yyFlexLexer::yyunput(int, char*)':
lex.yy.cpp:1035:15: error: 'yy_current_buffer' was not declared in this scope
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
^~~~~~~~~~~~~~~~~
lex.yy.cpp:1035:15: note: suggested alternative: 'yy_create_buffer'
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
^~~~~~~~~~~~~~~~~
yy_create_buffer
lex.yy.cpp: In member function 'int yyFlexLexer::yyinput()':
lex.yy.cpp:1077:22: error: 'yy_current_buffer' was not declared in this scope
if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
^~~~~~~~~~~~~~~~~
lex.yy.cpp:1077:22: note: suggested alternative: 'yy_create_buffer'
if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
^~~~~~~~~~~~~~~~~
yy_create_buffer
lex.yy.cpp: At global scope:
lex.yy.cpp:1134:6: error: no declaration matches 'void yyFlexLexer::yyrestart(is tream*)'
void yyFlexLexer::yyrestart( istream* input_file )
^~~~~~~~~~~
In file included from lex.yy.cpp:239:
FlexLexer.h:137:8: note: candidates are: 'virtual void yyFlexLexer::yyrestart(st d::istream&)'
void yyrestart( std::istream& s );
^~~~~~~~~
FlexLexer.h:136:8: note: 'virtual void yyFlexLexer::yyrestart(st d::istream*)'
void yyrestart( std::istream* s );
^~~~~~~~~
FlexLexer.h:119:7: note: 'class yyFlexLexer' defined here
class yyFlexLexer : public FlexLexer {
^~~~~~~~~~~
lex.yy.cpp: In member function 'virtual void yyFlexLexer::yy_switch_to_buffer(YY _BUFFER_STATE)':
lex.yy.cpp:1146:7: error: 'yy_current_buffer' was not declared in this scope
if ( yy_current_buffer == new_buffer )
^~~~~~~~~~~~~~~~~
lex.yy.cpp:1146:7: note: suggested alternative: 'yy_create_buffer'
if ( yy_current_buffer == new_buffer )
^~~~~~~~~~~~~~~~~
yy_create_buffer
lex.yy.cpp:1149:7: error: 'yy_current_buffer' was not declared in this scope
if ( yy_current_buffer )
^~~~~~~~~~~~~~~~~
lex.yy.cpp:1149:7: note: suggested alternative: 'yy_create_buffer'
if ( yy_current_buffer )
^~~~~~~~~~~~~~~~~
yy_create_buffer
lex.yy.cpp:1157:2: error: 'yy_current_buffer' was not declared in this scope
yy_current_buffer = new_buffer;
^~~~~~~~~~~~~~~~~
lex.yy.cpp:1157:2: note: suggested alternative: 'yy_create_buffer'
yy_current_buffer = new_buffer;
^~~~~~~~~~~~~~~~~
yy_create_buffer
lex.yy.cpp: In member function 'void yyFlexLexer::yy_load_buffer_state()':
lex.yy.cpp:1171:15: error: 'yy_current_buffer' was not declared in this scope
yy_n_chars = yy_current_buffer->yy_n_chars;
^~~~~~~~~~~~~~~~~
lex.yy.cpp:1171:15: note: suggested alternative: 'yy_create_buffer'
yy_n_chars = yy_current_buffer->yy_n_chars;
^~~~~~~~~~~~~~~~~
yy_create_buffer
lex.yy.cpp: At global scope:
lex.yy.cpp:1178:17: error: no declaration matches 'yy_buffer_state* yyFlexLexer: :yy_create_buffer(istream*, int)'
YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( istream* file, int size )
^~~~~~~~~~~
In file included from lex.yy.cpp:239:
FlexLexer.h:134:20: note: candidates are: 'virtual yy_buffer_state* yyFlexLexer: :yy_create_buffer(std::istream&, int)'
yy_buffer_state* yy_create_buffer( std::istream& s, int size );
^~~~~~~~~~~~~~~~
FlexLexer.h:133:20: note: 'virtual yy_buffer_state* yyFlexLexer: :yy_create_buffer(std::istream*, int)'
yy_buffer_state* yy_create_buffer( std::istream* s, int size );
^~~~~~~~~~~~~~~~
FlexLexer.h:119:7: note: 'class yyFlexLexer' defined here
class yyFlexLexer : public FlexLexer {
^~~~~~~~~~~
lex.yy.cpp: In member function 'virtual void yyFlexLexer::yy_delete_buffer(YY_BU FFER_STATE)':
lex.yy.cpp:1208:12: error: 'yy_current_buffer' was not declared in this scope
if ( b == yy_current_buffer )
^~~~~~~~~~~~~~~~~
lex.yy.cpp:1208:12: note: suggested alternative: 'yy_create_buffer'
if ( b == yy_current_buffer )
^~~~~~~~~~~~~~~~~
yy_create_buffer
lex.yy.cpp: At global scope:
lex.yy.cpp:1219:6: error: no declaration matches 'void yyFlexLexer::yy_init_buff er(YY_BUFFER_STATE, istream*)'
void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, istream* file )
^~~~~~~~~~~
In file included from lex.yy.cpp:239:
FlexLexer.h:156:8: note: candidate is: 'void yyFlexLexer::yy_init_buffer(yy_buff er_state*, std::istream&)'
void yy_init_buffer( yy_buffer_state* b, std::istream& s );
^~~~~~~~~~~~~~
FlexLexer.h:119:7: note: 'class yyFlexLexer' defined here
class yyFlexLexer : public FlexLexer {
^~~~~~~~~~~
lex.yy.cpp: In member function 'void yyFlexLexer::yy_flush_buffer(YY_BUFFER_STAT E)':
lex.yy.cpp:1250:12: error: 'yy_current_buffer' was not declared in this scope
if ( b == yy_current_buffer )
^~~~~~~~~~~~~~~~~
lex.yy.cpp:1250:12: note: suggested alternative: 'yy_create_buffer'
if ( b == yy_current_buffer )
^~~~~~~~~~~~~~~~~
yy_create_buffer
lex.yy.cpp: In member function 'virtual void yyFlexLexer::LexerError(const char* )':
lex.yy.cpp:1321:2: error: 'cerr' was not declared in this scope
cerr << msg << '\n';
^~~~
lex.yy.cpp:1321:2: note: suggested alternative:
In file included from FlexLexer.h:51,
from lex.yy.cpp:239:
C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86 _64-w64-mingw32/8.1.0/include/c++/iostream:62:18: note: 'std::cerr'
extern ostream cerr; /// Linked to standard error (unbuffered)
^~~~
scanner.l: At global scope:
scanner.l:26:5: error: expected primary-expression before 'return'
return 1;
^~~~~~
scanner.l:26:5: error: expected '}' before 'return'
scanner.l:25:18: note: to match this '{'
int yywrap(void) {
^
scanner.l:27:1: error: expected declaration before '}' token
}
^