minor fixes
This commit is contained in:
parent
a52fd95965
commit
f0622cbb3f
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1,3 @@
|
||||
build/
|
||||
.cache/
|
||||
|
||||
|
8
lexer.l
8
lexer.l
@ -26,17 +26,13 @@
|
||||
// boilerplate for this small example. Bummer.
|
||||
%}
|
||||
|
||||
%option nodefault
|
||||
%option noyywrap
|
||||
%option c++
|
||||
%option yyclass="Lexer"
|
||||
%option prefix="stela_"
|
||||
%option nodefault noyywrap noyylineno c++ yyclass="Lexer" prefix="stela_"
|
||||
|
||||
%%
|
||||
|
||||
[a-z]+ {
|
||||
std::cout << "Scanner: identifier [" << yytext << "]\n";
|
||||
return stela::Parser::make_STRING(yytext, stela::location( /* put location data here if you want */ ));
|
||||
return stela::Parser::make_STRING(yytext, stela::location());
|
||||
}
|
||||
|
||||
\( {
|
||||
|
5
main.cpp
5
main.cpp
@ -1,7 +1,7 @@
|
||||
#include <iostream>
|
||||
#include "interpreter.hpp"
|
||||
#include "lexer.hpp"
|
||||
#include "parser.hpp"
|
||||
#include "interpreter.hpp"
|
||||
#include <iostream>
|
||||
|
||||
int main()
|
||||
{
|
||||
@ -10,4 +10,3 @@ int main()
|
||||
std::cout << "Prase completed with result: " << result << '\n';
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user