updated vmprofiler dep, ported to cmkr...

merge-requests/3/head
John Doe 2 years ago
parent 786ecb2f81
commit 2826d47afd

@ -41,11 +41,16 @@ set(vmassembler_SOURCES "")
list(APPEND vmassembler_SOURCES
"src/compiler.cpp"
"src/lexer.flex.cpp"
"src/main.cpp"
"src/parser.cpp"
"src/parser.tab.cpp"
"src/lexer.l"
"src/parser.y"
"include/compiler.hpp"
"include/gen_code.hpp"
"include/parser.hpp"
"src/parser.tab.h"
)
list(APPEND vmassembler_SOURCES
@ -76,6 +81,7 @@ target_compile_features(vmassembler PRIVATE
target_include_directories(vmassembler PRIVATE
include
src
)
target_link_libraries(vmassembler PRIVATE

@ -6,7 +6,7 @@ name = "vmassembler"
[target.vmassembler]
type = "executable"
compile-features = ["cxx_std_20"]
sources = ["src/**.cpp", "include/**.hpp"]
include-directories = ["include"]
sources = ["src/**.cpp", "src/**.l", "src/**.y", "include/**.hpp", "src/**.h"]
include-directories = ["include", "src"]
link-libraries = ["vmprofiler", "xtils", "cli-parser", "linux-pe"]
compile-definitions = ["NOMINMAX"]

@ -3,7 +3,7 @@
int main()
{
const auto hello = vm::call< vm::calls::get_hello, vm::u64 >();
const auto hello = vm::call< vm::calls::get_hello, vm::u64 >();
const auto world = vm::call< vm::calls::get_world, vm::u64 >();
std::printf( "> %s %s\n", ( char * )&hello, (char*)&world );
std::printf( "> %s %s\n", ( char * )&hello, (char*)&world );
}

@ -1 +1 @@
Subproject commit 14cc72c0ff121d13f2ba26be34d1e99492aad296
Subproject commit 52d185f8c70352ced670481e57f896143d3d8527

File diff suppressed because it is too large Load Diff

@ -1,5 +1,5 @@
%{
#include "parser.tab.h"
#include <parser.tab.h>
#include <stdlib.h>
%}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,91 @@
/* A Bison parser, made by GNU Bison 2.7. */
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
under terms of your choice, so long as that work isn't itself a
parser generator using the skeleton or a modified version thereof
as a parser skeleton. Alternatively, if you modify or redistribute
the parser skeleton itself, you may (at your option) remove this
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
#ifndef YY_YY_PARSER_TAB_H_INCLUDED
# define YY_YY_PARSER_TAB_H_INCLUDED
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int yydebug;
#endif
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
LABEL = 258,
VINSTR = 259,
IMM = 260
};
#endif
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
{
/* Line 2058 of yacc.c */
#line 10 "parser.y"
char vinstr_name[20];
char label_name[256];
unsigned long long imm_val;
/* Line 2058 of yacc.c */
#line 69 "parser.tab.h"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
extern YYSTYPE yylval;
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
#else
int yyparse ();
#endif
#else /* ! YYPARSE_PARAM */
#if defined __STDC__ || defined __cplusplus
int yyparse (void);
#else
int yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */
#endif /* !YY_YY_PARSER_TAB_H_INCLUDED */

@ -1,6 +1,6 @@
%{
#include <stdlib.h>
#include "parser.h"
#include <parser.hpp>
int yylex(void);
void yyerror(char *);
extern int yylineno;

Loading…
Cancel
Save