mirror of
https://github.com/Ed94/gencpp.git
synced 2025-06-14 18:51:47 -07:00
Reorganization of files, refactors, doc updates (WIP)
Removing the gen. namespace from the files for components, dependencies, and file_processors. They are only necessary if the include directory is transparent, and in my case those are not. Made a docs directory. I'm offloading information from the main readme to there along with additional informationn I end up elaborating on down the line. Enum tables were moved to their own directory (project/enums). Library will not compile for now. Major refactor occuring with parsing related components.
This commit is contained in:
@ -1,47 +1,43 @@
|
||||
# Documentation
|
||||
|
||||
The core library is contained within `gen.hpp` and `gen.cpp`.
|
||||
Things related to the editor and scanner are in their own respective files. (Ex: `gen.scanner.<hpp/cpp>` )
|
||||
|
||||
Dependencies are within `gen.dep.<hpp/cpp>`
|
||||
|
||||
The library is fragmented into a series of headers and sources files meant to be scanned in and then generated to a tailored format for the target
|
||||
`gen` files.
|
||||
|
||||
The principal (user) files are `gen.hpp` and `gen.cpp`.
|
||||
They contain includes for its various components: `components/<component_name>.<hpp/cpp>`
|
||||
|
||||
Dependencies are bundled into `gen.dep.<hpp/cpp>`.
|
||||
Just like the `gen.<hpp/cpp>` they include their components: `dependencies/<dependency_name>.<hpp/cpp>`
|
||||
|
||||
The fle processors are in their own respective files. (Ex: `file_processors/<file_processor>.<hpp/cpp>` )
|
||||
They directly include `depedencies/file_handling.<hpp/cpp>` as the core library does not include file processing by defualt.
|
||||
|
||||
**TODO : Right now the library is not finished structurally, as such the first self-hosting iteration is still WIP**
|
||||
Both libraries use *pre-generated* (self-hosting I guess) version of the library to then generate the latest version of itself.
|
||||
(sort of a verification that the generated version is equivalent)
|
||||
(sort of a verification that the generated version is equivalent).
|
||||
|
||||
The default `gen.bootstrap.cpp` located in the project folder is meant to be produce a standard segmented library, where the components of the library
|
||||
have relatively dedicated header and source files. With dependencies included at the top of the file and each header starting with a pragma once.
|
||||
This will overwrite the existing library implementation in the immediate directory.
|
||||
have relatively dedicated header and source files. Dependencies included at the top of the file and each header starting with a pragma once.
|
||||
The output will be in the `project/gen` directory (if the directory does not exist, it will create it).
|
||||
|
||||
Use those to get a general idea of how to make your own tailored version.
|
||||
|
||||
If the naming convention is undesired, the `gencpp.refactor` script can be used with the [refactor]()
|
||||
|
||||
Feature Macros:
|
||||
|
||||
* `GEN_DEFINE_ATTRIBUTE_TOKENS` : Allows user to define their own attribute macros for use in parsing.
|
||||
* This is auto-generated if using the bootstrap or single-header generation
|
||||
* *Note: The user will use the `AttributeTokens.csv` when the library is fully self-hosting.*
|
||||
* `GEN_DEFINE_LIBRARY_CORE_CONSTANTS` : Optional typename codes as they are non-standard to C/C++ and not necessary to library usage
|
||||
* `GEN_DONT_USE_NAMESPACE` : By default, the library is wrapped in a `gen` namespace, this will disable that expose it to the global scope.
|
||||
* `GEN_DONT_ENFORCE_GEN_TIME_GUARD` : By default, the library ( gen.hpp/ gen.cpp ) expects the macro `GEN_TIME` to be defined, this disables that.
|
||||
* `GEN_ROLL_OWN_DEPENDENCIES` : Optional override so that user may define the dependencies themselves.
|
||||
* `GEN_DEFINE_LIBRARY_CORE_CONSTANTS` : Optional typename codes as they are non-standard to C/C++ and not necessary to library usage
|
||||
* `GEN_ENFORCE_STRONG_CODE_TYPES` : Enforces casts to filtered code types.
|
||||
* `GEN_EXPOSE_BACKEND` : Will expose symbols meant for internal use only.
|
||||
* `GEN_Define_Attribute_Tokens` : Allows user to define their own attribute macros for use in parsing.
|
||||
|
||||
`GEN_USE_RECURSIVE_AST_DUPLICATION` is available but its not well tested and should not need to be used.
|
||||
If constructing ASTs properly. There should be no modification of ASTs, and thus this would never become an issue.
|
||||
(I will probably remove down the line...)
|
||||
* `GEN_ROLL_OWN_DEPENDENCIES` : Optional override so that user may define the dependencies themselves.
|
||||
|
||||
## On multi-threading
|
||||
|
||||
Currently unsupported. The following changes would have to be made:
|
||||
|
||||
* Setup static data access with fences if more than one thread will generate ASTs ( or keep a different set for each thread)
|
||||
* Make sure local persistent data of functions are also thread local.
|
||||
* The builder should be done on a per-thread basis.
|
||||
* Due to the design of the editor and scanner, it will most likely be best to make each file a job to process request entries on. Receipts should have an an array to store per thread. They can be combined to the final receipts array when all files have been processed.
|
||||
|
||||
## Extending the library
|
||||
|
||||
This library is relatively very small, and can be extended without much hassle.
|
||||
|
@ -17,20 +17,9 @@ AST* AST::duplicate()
|
||||
|
||||
String AST::to_string()
|
||||
{
|
||||
# define ProcessModuleFlags() \
|
||||
if ( bitfield_is_equal( u32, ModuleFlags, ModuleFlag::Export )) \
|
||||
result.append( "export " ); \
|
||||
\
|
||||
if ( bitfield_is_equal( u32, ModuleFlags, ModuleFlag::Import )) \
|
||||
result.append( "import " ); \
|
||||
|
||||
local_persist thread_local
|
||||
char SerializationLevel = 0;
|
||||
|
||||
#if defined(GEN_BENCHMARK) && defined(GEN_BENCHMARK_SERIALIZATION)
|
||||
u64 time_start = time_rel_ms();
|
||||
#endif
|
||||
|
||||
// TODO : Need to refactor so that intermeidate strings are freed conviently.
|
||||
String result = String::make( GlobalAllocator, "" );
|
||||
|
||||
@ -82,7 +71,8 @@ String AST::to_string()
|
||||
|
||||
case Class:
|
||||
{
|
||||
ProcessModuleFlags();
|
||||
if ( bitfield_is_equal( u32, ModuleFlags, ModuleFlag::Export ))
|
||||
result.append( "export " );
|
||||
|
||||
if ( Attributes || ParentType )
|
||||
{
|
||||
@ -129,7 +119,8 @@ String AST::to_string()
|
||||
|
||||
case Class_Fwd:
|
||||
{
|
||||
ProcessModuleFlags();
|
||||
if ( bitfield_is_equal( u32, ModuleFlags, ModuleFlag::Export ))
|
||||
result.append( "export " );
|
||||
|
||||
if ( Attributes )
|
||||
result.append_fmt( "class %s %s;", Attributes->to_string(), Name );
|
||||
@ -140,7 +131,8 @@ String AST::to_string()
|
||||
|
||||
case Enum:
|
||||
{
|
||||
ProcessModuleFlags();
|
||||
if ( bitfield_is_equal( u32, ModuleFlags, ModuleFlag::Export ))
|
||||
result.append( "export " );
|
||||
|
||||
if ( Attributes || UnderlyingType )
|
||||
{
|
||||
@ -170,7 +162,8 @@ String AST::to_string()
|
||||
|
||||
case Enum_Fwd:
|
||||
{
|
||||
ProcessModuleFlags();
|
||||
if ( bitfield_is_equal( u32, ModuleFlags, ModuleFlag::Export ))
|
||||
result.append( "export " );
|
||||
|
||||
if ( Attributes )
|
||||
result.append_fmt( "%s ", Attributes->to_string() );
|
||||
@ -181,7 +174,8 @@ String AST::to_string()
|
||||
|
||||
case Enum_Class:
|
||||
{
|
||||
ProcessModuleFlags();
|
||||
if ( bitfield_is_equal( u32, ModuleFlags, ModuleFlag::Export ))
|
||||
result.append( "export " );
|
||||
|
||||
if ( Attributes || UnderlyingType )
|
||||
{
|
||||
@ -219,7 +213,8 @@ String AST::to_string()
|
||||
|
||||
case Enum_Class_Fwd:
|
||||
{
|
||||
ProcessModuleFlags();
|
||||
if ( bitfield_is_equal( u32, ModuleFlags, ModuleFlag::Export ))
|
||||
result.append( "export " );
|
||||
|
||||
result.append( "enum class " );
|
||||
|
||||
@ -262,7 +257,8 @@ String AST::to_string()
|
||||
|
||||
case Function:
|
||||
{
|
||||
ProcessModuleFlags();
|
||||
if ( bitfield_is_equal( u32, ModuleFlags, ModuleFlag::Export ))
|
||||
result.append( "export " );
|
||||
|
||||
if ( Attributes )
|
||||
result.append_fmt( "%s ", Attributes->to_string() );
|
||||
@ -301,7 +297,8 @@ String AST::to_string()
|
||||
|
||||
case Function_Fwd:
|
||||
{
|
||||
ProcessModuleFlags();
|
||||
if ( bitfield_is_equal( u32, ModuleFlags, ModuleFlag::Export ))
|
||||
result.append( "export " );
|
||||
|
||||
if ( Attributes )
|
||||
result.append_fmt( "%s ", Attributes->to_string() );
|
||||
@ -347,7 +344,8 @@ String AST::to_string()
|
||||
break;
|
||||
|
||||
case Namespace:
|
||||
ProcessModuleFlags();
|
||||
if ( bitfield_is_equal( u32, ModuleFlags, ModuleFlag::Export ))
|
||||
result.append( "export " );
|
||||
|
||||
result.append_fmt( "namespace %s\n{\n%s}"
|
||||
, Name
|
||||
@ -358,7 +356,8 @@ String AST::to_string()
|
||||
case Operator:
|
||||
case Operator_Member:
|
||||
{
|
||||
ProcessModuleFlags();
|
||||
if ( bitfield_is_equal( u32, ModuleFlags, ModuleFlag::Export ))
|
||||
result.append( "export " );
|
||||
|
||||
if ( Attributes )
|
||||
result.append_fmt( "%s ", Attributes->to_string() );
|
||||
@ -395,7 +394,8 @@ String AST::to_string()
|
||||
case Operator_Fwd:
|
||||
case Operator_Member_Fwd:
|
||||
{
|
||||
ProcessModuleFlags();
|
||||
if ( bitfield_is_equal( u32, ModuleFlags, ModuleFlag::Export ))
|
||||
result.append( "export " );
|
||||
|
||||
if ( Attributes )
|
||||
result.append_fmt( "%s ", Attributes->to_string() );
|
||||
@ -513,7 +513,8 @@ String AST::to_string()
|
||||
|
||||
case Struct:
|
||||
{
|
||||
ProcessModuleFlags();
|
||||
if ( bitfield_is_equal( u32, ModuleFlags, ModuleFlag::Export ))
|
||||
result.append( "export " );
|
||||
|
||||
if ( Name == nullptr)
|
||||
{
|
||||
@ -566,7 +567,8 @@ String AST::to_string()
|
||||
|
||||
case Struct_Fwd:
|
||||
{
|
||||
ProcessModuleFlags();
|
||||
if ( bitfield_is_equal( u32, ModuleFlags, ModuleFlag::Export ))
|
||||
result.append( "export " );
|
||||
|
||||
if ( Attributes )
|
||||
result.append_fmt( "struct %s %s;", Attributes->to_string(), Name );
|
||||
@ -577,7 +579,8 @@ String AST::to_string()
|
||||
|
||||
case Template:
|
||||
{
|
||||
ProcessModuleFlags();
|
||||
if ( bitfield_is_equal( u32, ModuleFlags, ModuleFlag::Export ))
|
||||
result.append( "export " );
|
||||
|
||||
result.append_fmt( "template< %s >\n%s", Params->to_string(), Declaration->to_string() );
|
||||
}
|
||||
@ -585,7 +588,8 @@ String AST::to_string()
|
||||
|
||||
case Typedef:
|
||||
{
|
||||
ProcessModuleFlags();
|
||||
if ( bitfield_is_equal( u32, ModuleFlags, ModuleFlag::Export ))
|
||||
result.append( "export " );
|
||||
|
||||
result.append( "typedef ");
|
||||
|
||||
@ -624,7 +628,8 @@ String AST::to_string()
|
||||
|
||||
case Union:
|
||||
{
|
||||
ProcessModuleFlags();
|
||||
if ( bitfield_is_equal( u32, ModuleFlags, ModuleFlag::Export ))
|
||||
result.append( "export " );
|
||||
|
||||
result.append( "union " );
|
||||
|
||||
@ -650,7 +655,8 @@ String AST::to_string()
|
||||
|
||||
case Using:
|
||||
{
|
||||
ProcessModuleFlags();
|
||||
if ( bitfield_is_equal( u32, ModuleFlags, ModuleFlag::Export ))
|
||||
result.append( "export " );
|
||||
|
||||
if ( Attributes )
|
||||
result.append_fmt( "%s ", Attributes->to_string() );
|
||||
@ -675,7 +681,8 @@ String AST::to_string()
|
||||
|
||||
case Variable:
|
||||
{
|
||||
ProcessModuleFlags();
|
||||
if ( bitfield_is_equal( u32, ModuleFlags, ModuleFlag::Export ))
|
||||
result.append( "export " );
|
||||
|
||||
if ( Attributes || Specs )
|
||||
{
|
||||
@ -726,11 +733,7 @@ String AST::to_string()
|
||||
break;
|
||||
}
|
||||
|
||||
#if defined(GEN_BENCHMARK) && defined(GEN_BENCHMARK_SERIALIZATION)
|
||||
log_fmt("AST::to_string() time taken: %llu for: %s\n", time_rel_ms() - time_start, result );
|
||||
#endif
|
||||
return result;
|
||||
#undef ProcessModuleFlags
|
||||
}
|
||||
|
||||
bool AST::is_equal( AST* other )
|
||||
@ -760,19 +763,19 @@ bool AST::validate_body()
|
||||
{
|
||||
using namespace ECode;
|
||||
|
||||
#define CheckEntries( Unallowed_Types ) \
|
||||
do \
|
||||
{ \
|
||||
for ( Code entry : cast<CodeBody>() ) \
|
||||
{ \
|
||||
switch ( entry->Type ) \
|
||||
{ \
|
||||
Unallowed_Types \
|
||||
log_failure( "AST::validate_body: Invalid entry in body %s", entry.debug_str() ); \
|
||||
return false; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
#define CheckEntries( Unallowed_Types ) \
|
||||
do \
|
||||
{ \
|
||||
for ( Code entry : cast<CodeBody>() ) \
|
||||
{ \
|
||||
switch ( entry->Type ) \
|
||||
{ \
|
||||
Unallowed_Types \
|
||||
log_failure( "AST::validate_body: Invalid entry in body %s", entry.debug_str() ); \
|
||||
return false; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
while (0);
|
||||
|
||||
switch ( Type )
|
||||
@ -825,6 +828,8 @@ bool AST::validate_body()
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
#undef CheckEntries
|
||||
}
|
||||
|
||||
#pragma endregion AST
|
@ -72,4 +72,4 @@ namespace EOperator
|
||||
|
||||
# undef Define_Operators
|
||||
}
|
||||
using OperatorT = EOperator::Type;
|
||||
using OperatorT = EOperator::Type;
|
@ -101,5 +101,4 @@ namespace ESpecifier
|
||||
|
||||
# undef Define_Specifiers
|
||||
}
|
||||
|
||||
using SpecifierT = ESpecifier::Type;
|
@ -9,8 +9,8 @@ namespace Parser
|
||||
Attributes_Start is only used to indicate the start of the user_defined attribute list.
|
||||
*/
|
||||
|
||||
#ifndef GEN_Define_Attribute_Tokens
|
||||
# define GEN_Define_Attribute_Tokens \
|
||||
#ifndef GEN_DEFINE_ATTRIBUTE_TOKENS
|
||||
# define GEN_DEFINE_ATTRIBUTE_TOKENS \
|
||||
Entry( API_Export, "GEN_API_Export_Code" ) \
|
||||
Entry( API_Import, "GEN_API_Import_Code" )
|
||||
#endif
|
||||
@ -97,7 +97,7 @@ namespace Parser
|
||||
{
|
||||
# define Entry( Name_, Str_ ) Name_,
|
||||
Define_TokType
|
||||
GEN_Define_Attribute_Tokens
|
||||
GEN_DEFINE_ATTRIBUTE_TOKENS
|
||||
# undef Entry
|
||||
NumTokens,
|
||||
};
|
||||
@ -110,7 +110,7 @@ namespace Parser
|
||||
{
|
||||
# define Entry( Name_, Str_ ) { sizeof(Str_), Str_ },
|
||||
Define_TokType
|
||||
GEN_Define_Attribute_Tokens
|
||||
GEN_DEFINE_ATTRIBUTE_TOKENS
|
||||
# undef Entry
|
||||
};
|
||||
|
||||
@ -137,7 +137,7 @@ namespace Parser
|
||||
{
|
||||
# define Entry( Name_, Str_ ) Str_,
|
||||
Define_TokType
|
||||
GEN_Define_Attribute_Tokens
|
||||
GEN_DEFINE_ATTRIBUTE_TOKENS
|
||||
# undef Entry
|
||||
};
|
||||
|
@ -105,7 +105,7 @@ void define_constants()
|
||||
#endif
|
||||
# undef def_constant_code_type
|
||||
|
||||
t_empty = (CodeType) make_code();
|
||||
t_empty = (CodeType) make_code();
|
||||
t_empty->Type = ECode::Typename;
|
||||
t_empty->Name = get_cached_string( txt_StrC("") );
|
||||
t_empty.set_global();
|
||||
@ -127,12 +127,12 @@ void define_constants()
|
||||
access_private->Name = get_cached_string( txt_StrC("private:") );
|
||||
access_private.set_global();
|
||||
|
||||
access_protected = make_code();
|
||||
access_protected = make_code();
|
||||
access_protected->Type = ECode::Access_Protected;
|
||||
access_protected->Name = get_cached_string( txt_StrC("protected:") );
|
||||
access_protected.set_global();
|
||||
|
||||
access_public = make_code();
|
||||
access_public = make_code();
|
||||
access_public->Type = ECode::Access_Public;
|
||||
access_public->Name = get_cached_string( txt_StrC("public:") );
|
||||
access_public.set_global();
|
File diff suppressed because it is too large
Load Diff
@ -68,7 +68,7 @@ ModuleFlag operator|( ModuleFlag A, ModuleFlag B)
|
||||
|
||||
Override these to change the attribute to your own unique identifier convention.
|
||||
|
||||
The tokenizer identifies attribute defines with the GEN_Define_Attribute_Tokens macros.
|
||||
The tokenizer identifies attribute defines with the GEN_DEFINE_ATTRIBUTE_TOKENS macros.
|
||||
See the example below and the Define_TokType macro used in gen.cpp to know the format.
|
||||
While the library can parse raw attributes, most projects use defines to wrap them for compiler
|
||||
platform indendence. The token define allows support for them without having to modify the library.
|
@ -12,8 +12,7 @@ sw token_fmt_va( char* buf, uw buf_size, s32 num_tokens, va_list va )
|
||||
char tok_map_mem[ TokenFmt_TokenMap_MemSize ];
|
||||
|
||||
tok_map_arena = Arena::init_from_memory( tok_map_mem, sizeof(tok_map_mem) );
|
||||
|
||||
tok_map = HashTable<StrC>::init( tok_map_arena );
|
||||
tok_map = HashTable<StrC>::init( tok_map_arena );
|
||||
|
||||
s32 left = num_tokens - 1;
|
||||
|
@ -10,12 +10,15 @@ struct FileInfo;
|
||||
char* str_fmt_buf ( char const* fmt, ... );
|
||||
char* str_fmt_buf_va ( char const* fmt, va_list va );
|
||||
sw str_fmt_va ( char* str, sw n, char const* fmt, va_list va );
|
||||
sw str_fmt_file ( FileInfo* f, char const* fmt, ... );
|
||||
sw str_fmt_file_va ( FileInfo* f, char const* fmt, va_list va );
|
||||
sw str_fmt_out_va ( char const* fmt, va_list va );
|
||||
sw str_fmt_out_err ( char const* fmt, ... );
|
||||
sw str_fmt_out_err_va( char const* fmt, va_list va );
|
||||
|
||||
// TODO : Move these to file handling.
|
||||
|
||||
sw str_fmt_file ( FileInfo* f, char const* fmt, ... );
|
||||
sw str_fmt_file_va ( FileInfo* f, char const* fmt, va_list va )
|
||||
|
||||
constexpr
|
||||
char const* Msg_Invalid_Value = "INVALID VALUE PROVIDED";
|
||||
|
@ -2,8 +2,8 @@
|
||||
#define GEN_ENFORCE_STRONG_CODE_TYPES
|
||||
#define GEN_EXPOSE_BACKEND
|
||||
#include "gen.cpp"
|
||||
#include "filesystem/gen.scanner.hpp"
|
||||
#include "helpers/gen.helper.hpp"
|
||||
#include "filesystem/scanner.hpp"
|
||||
#include "helpers/helper.hpp"
|
||||
|
||||
using namespace gen;
|
||||
|
||||
@ -33,25 +33,27 @@ int gen_main()
|
||||
{
|
||||
gen::init();
|
||||
|
||||
Code push_ignores = scan_file( "helpers/gen.push_ignores.inline.hpp" );
|
||||
Code pop_ignores = scan_file( "helpers/gen.pop_ignores.inline.hpp" );
|
||||
Code push_ignores = scan_file( "helpers/push_ignores.inline.hpp" );
|
||||
Code pop_ignores = scan_file( "helpers/pop_ignores.inline.hpp" );
|
||||
|
||||
// gen_dep.hpp
|
||||
{
|
||||
Code header_start = scan_file( "dependencies/gen.header_start.hpp" );
|
||||
Code header_start = scan_file( "dependencies/header_start.hpp" );
|
||||
Code nspace_macro = untyped_str( namespace_by_default ? nspace_default : nspace_non_default );
|
||||
Code macros = scan_file( "dependencies/gen.macros.hpp" );
|
||||
Code basic_types = scan_file( "dependencies/gen.basic_types.hpp" );
|
||||
Code debug = scan_file( "dependencies/gen.debug.hpp" );
|
||||
Code memory = scan_file( "dependencies/gen.memory.hpp" );
|
||||
Code string_ops = scan_file( "dependencies/gen.string_ops.hpp" );
|
||||
Code printing = scan_file( "dependencies/gen.printing.hpp" );
|
||||
Code containers = scan_file( "dependencies/gen.containers.hpp" );
|
||||
Code hashing = scan_file( "dependencies/gen.hashing.hpp" );
|
||||
Code string = scan_file( "dependencies/gen.string.hpp" );
|
||||
Code file_handling = scan_file( "dependencies/gen.file_handling.hpp" );
|
||||
Code parsing = scan_file( "dependencies/gen.parsing.hpp" );
|
||||
Code timing = scan_file( "dependencies/gen.timing.hpp" );
|
||||
Code macros = scan_file( "dependencies/macros.hpp" );
|
||||
Code basic_types = scan_file( "dependencies/basic_types.hpp" );
|
||||
Code debug = scan_file( "dependencies/debug.hpp" );
|
||||
Code memory = scan_file( "dependencies/memory.hpp" );
|
||||
Code string_ops = scan_file( "dependencies/string_ops.hpp" );
|
||||
Code printing = scan_file( "dependencies/printing.hpp" );
|
||||
Code containers = scan_file( "dependencies/containers.hpp" );
|
||||
Code hashing = scan_file( "dependencies/hashing.hpp" );
|
||||
Code string = scan_file( "dependencies/string.hpp" );
|
||||
Code parsing = scan_file( "dependencies/parsing.hpp" );
|
||||
Code timing = scan_file( "dependencies/timing.hpp" );
|
||||
|
||||
// TOOD : Make this optional
|
||||
Code file_handling = scan_file( "dependencies/file_handling.hpp" );
|
||||
|
||||
Builder
|
||||
deps_header;
|
||||
@ -82,15 +84,15 @@ int gen_main()
|
||||
// gen_dep.cpp
|
||||
{
|
||||
CodeInclude header = def_include( txt_StrC("gen_dep.hpp") );
|
||||
Code impl_start = scan_file( "dependencies/gen.impl_start.cpp" );
|
||||
Code debug = scan_file( "dependencies/gen.debug.cpp" );
|
||||
Code string_ops = scan_file( "dependencies/gen.string_ops.cpp" );
|
||||
Code printing = scan_file( "dependencies/gen.printing.cpp" );
|
||||
Code memory = scan_file( "dependencies/gen.memory.cpp" );
|
||||
Code parsing = scan_file( "dependencies/gen.parsing.cpp" );
|
||||
Code hashing = scan_file( "dependencies/gen.hashing.cpp" );
|
||||
Code string = scan_file( "dependencies/gen.string.cpp" );
|
||||
Code timing = scan_file( "dependencies/gen.timing.cpp" );
|
||||
Code impl_start = scan_file( "dependencies/impl_start.cpp" );
|
||||
Code debug = scan_file( "dependencies/debug.cpp" );
|
||||
Code string_ops = scan_file( "dependencies/string_ops.cpp" );
|
||||
Code printing = scan_file( "dependencies/printing.cpp" );
|
||||
Code memory = scan_file( "dependencies/memory.cpp" );
|
||||
Code parsing = scan_file( "dependencies/parsing.cpp" );
|
||||
Code hashing = scan_file( "dependencies/hashing.cpp" );
|
||||
Code string = scan_file( "dependencies/string.cpp" );
|
||||
Code timing = scan_file( "dependencies/timing.cpp" );
|
||||
|
||||
Builder
|
||||
deps_impl;
|
||||
@ -115,18 +117,19 @@ int gen_main()
|
||||
|
||||
// gen.hpp
|
||||
{
|
||||
Code header_start = scan_file( "components/gen.header_start.hpp" );
|
||||
Code header_start = scan_file( "components/header_start.hpp" );
|
||||
Code nspace_macro = untyped_str( namespace_by_default ? nspace_default : nspace_non_default );
|
||||
Code types = scan_file( "components/gen.types.hpp" );
|
||||
Code data_structs = scan_file( "components/gen.data_structures.hpp" );
|
||||
Code interface = scan_file( "components/gen.interface.hpp" );
|
||||
Code header_end = scan_file( "components/gen.header_end.hpp" );
|
||||
Code types = scan_file( "components/types.hpp" );
|
||||
Code data_structs = scan_file( "components/data_structures.hpp" );
|
||||
Code interface = scan_file( "components/interface.hpp" );
|
||||
Code header_end = scan_file( "components/header_end.hpp" );
|
||||
|
||||
CodeBody ecode = gen_ecode( "./components/ECode.csv" );
|
||||
CodeBody eoperator = gen_eoperator( "./components/EOperator.csv" );
|
||||
CodeBody especifier = gen_especifier( "./components/ESpecifier.csv" );
|
||||
CodeBody ecode = gen_ecode( "enums/ECode.csv" );
|
||||
CodeBody eoperator = gen_eoperator( "enums/EOperator.csv" );
|
||||
CodeBody especifier = gen_especifier( "enums/ESpecifier.csv" );
|
||||
|
||||
Code builder = scan_file( "filesystem/gen.builder.hpp" );
|
||||
// TODO : Make this optional to include
|
||||
Code builder = scan_file( "file_proecessors/builder.hpp" );
|
||||
|
||||
Builder
|
||||
header;
|
||||
@ -159,18 +162,19 @@ int gen_main()
|
||||
{
|
||||
Code impl_start = scan_file( "components/gen.impl_start.cpp" );
|
||||
CodeInclude header = def_include( txt_StrC("gen.hpp") );
|
||||
Code data = scan_file( "components/gen.data.cpp" );
|
||||
Code ast_case_macros = scan_file( "components/gen.ast_case_macros.cpp" );
|
||||
Code ast = scan_file( "components/gen.ast.cpp" );
|
||||
Code interface = scan_file( "components/gen.interface.cpp" );
|
||||
Code upfront = scan_file( "components/gen.interface.upfront.cpp" );
|
||||
Code parsing = scan_file( "components/gen.interface.parsing.cpp" );
|
||||
Code untyped = scan_file( "components/gen.untyped.cpp" );
|
||||
Code data = scan_file( "components/static_data.cpp" );
|
||||
Code ast_case_macros = scan_file( "components/ast_case_macros.cpp" );
|
||||
Code ast = scan_file( "components/ast.cpp" );
|
||||
Code interface = scan_file( "components/interface.cpp" );
|
||||
Code upfront = scan_file( "components/interface.upfront.cpp" );
|
||||
Code parsing = scan_file( "components/interface.parsing.cpp" );
|
||||
Code untyped = scan_file( "components/untyped.cpp" );
|
||||
|
||||
CodeBody etoktype = gen_etoktype( "components/ETokType.csv", "components/AttributeTokens.csv" );
|
||||
CodeBody etoktype = gen_etoktype( "enums/ETokType.csv", "enums/AttributeTokens.csv" );
|
||||
CodeNamespace parser_nspace = def_namespace( name(Parser), def_namespace_body( args(etoktype)) );
|
||||
|
||||
Code builder = scan_file( "filesystem/gen.builder.cpp" );
|
||||
// TODO : Make this optional to include
|
||||
Code builder = scan_file( "file_proecessors/builder.cpp" );
|
||||
|
||||
Builder
|
||||
impl;
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "helpers/gen.push_ignores.inline.hpp"
|
||||
#include "helpers/push_ignores.inline.hpp"
|
||||
|
||||
// ReSharper disable CppClangTidyClangDiagnosticSwitchEnum
|
||||
|
||||
@ -16,19 +16,19 @@
|
||||
|
||||
GEN_NS_BEGIN
|
||||
|
||||
#include "components/gen.data.cpp"
|
||||
#include "components/static_data.cpp"
|
||||
|
||||
#include "components/gen.ast_case_macros.cpp"
|
||||
#include "components/gen.ast.cpp"
|
||||
#include "components/ast_case_macros.cpp"
|
||||
#include "components/ast.cpp"
|
||||
|
||||
#include "components/gen.interface.cpp"
|
||||
#include "components/gen.interface.upfront.cpp"
|
||||
#include "components/gen.etoktype.cpp"
|
||||
#include "components/gen.interface.parsing.cpp"
|
||||
#include "components/gen.untyped.cpp"
|
||||
#include "components/interface.cpp"
|
||||
#include "components/interface.upfront.cpp"
|
||||
#include "components/etoktype.cpp"
|
||||
#include "components/interface.parsing.cpp"
|
||||
#include "components/untyped.cpp"
|
||||
|
||||
#include "filesystem/gen.builder.cpp"
|
||||
#include "file_proecessors/builder.cpp"
|
||||
|
||||
GEN_NS_END
|
||||
|
||||
#include "helpers/gen.pop_ignores.inline.hpp"
|
||||
#include "helpers/pop_ignores.inline.hpp"
|
||||
|
@ -1,19 +1,19 @@
|
||||
// This file is intended to be included within gen.cpp (There is no pragma diagnostic ignores)
|
||||
#include "gen.dep.hpp"
|
||||
|
||||
#include "dependencies/gen.impl_start.cpp"
|
||||
#include "dependencies/impl_start.cpp"
|
||||
|
||||
GEN_NS_BEGIN
|
||||
|
||||
#include "dependencies/gen.debug.cpp"
|
||||
#include "dependencies/gen.string_ops.cpp"
|
||||
#include "dependencies/gen.printing.cpp"
|
||||
#include "dependencies/gen.memory.cpp"
|
||||
#include "dependencies/gen.parsing.cpp"
|
||||
#include "dependencies/gen.hashing.cpp"
|
||||
#include "dependencies/gen.string.cpp"
|
||||
#include "dependencies/gen.timing.cpp"
|
||||
#include "dependencies/debug.cpp"
|
||||
#include "dependencies/string_ops.cpp"
|
||||
#include "dependencies/printing.cpp"
|
||||
#include "dependencies/memory.cpp"
|
||||
#include "dependencies/parsing.cpp"
|
||||
#include "dependencies/hashing.cpp"
|
||||
#include "dependencies/string.cpp"
|
||||
#include "dependencies/timing.cpp"
|
||||
|
||||
#include "dependencies/gen.file_handling.cpp"
|
||||
#include "dependencies/file_handling.cpp"
|
||||
|
||||
GEN_NS_END
|
||||
|
@ -1,7 +1,7 @@
|
||||
// This file is intended to be included within gen.hpp (There is no pragma diagnostic ignores)
|
||||
#pragma once
|
||||
|
||||
#include "dependencies/gen.header_start.hpp"
|
||||
#include "dependencies/header_start.hpp"
|
||||
|
||||
#ifdef GEN_DONT_USE_NAMESPACE
|
||||
# define GEN_NS_BEGIN
|
||||
@ -13,16 +13,17 @@
|
||||
|
||||
GEN_NS_BEGIN
|
||||
|
||||
#include "dependencies/gen.macros.hpp"
|
||||
#include "dependencies/gen.basic_types.hpp"
|
||||
#include "dependencies/gen.debug.hpp"
|
||||
#include "dependencies/gen.memory.hpp"
|
||||
#include "dependencies/gen.string_ops.hpp"
|
||||
#include "dependencies/gen.printing.hpp"
|
||||
#include "dependencies/gen.containers.hpp"
|
||||
#include "dependencies/gen.string.hpp"
|
||||
#include "dependencies/gen.file_handling.hpp"
|
||||
#include "dependencies/gen.parsing.hpp"
|
||||
#include "dependencies/gen.timing.hpp"
|
||||
#include "dependencies/macros.hpp"
|
||||
#include "dependencies/basic_types.hpp"
|
||||
#include "dependencies/debug.hpp"
|
||||
#include "dependencies/memory.hpp"
|
||||
#include "dependencies/string_ops.hpp"
|
||||
#include "dependencies/printing.hpp"
|
||||
#include "dependencies/containers.hpp"
|
||||
#include "dependencies/string.hpp"
|
||||
#include "dependencies/parsing.hpp"
|
||||
#include "dependencies/timing.hpp"
|
||||
|
||||
#include "dependencies/file_handling.hpp"
|
||||
|
||||
GEN_NS_END
|
||||
|
@ -8,8 +8,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "helpers/gen.push_ignores.inline.hpp"
|
||||
#include "components/gen.header_start.hpp"
|
||||
#include "helpers/push_ignores.inline.hpp"
|
||||
#include "components/header_start.hpp"
|
||||
|
||||
#ifdef GEN_DONT_USE_NAMESPACE
|
||||
# define GEN_NS_BEGIN
|
||||
@ -21,16 +21,16 @@
|
||||
|
||||
GEN_NS_BEGIN
|
||||
|
||||
#include "components/gen.types.hpp"
|
||||
#include "components/gen.ecode.hpp"
|
||||
#include "components/gen.eoperator.hpp"
|
||||
#include "components/gen.especifier.hpp"
|
||||
#include "components/gen.data_structures.hpp"
|
||||
#include "components/gen.interface.hpp"
|
||||
#include "components/gen.header_end.hpp"
|
||||
#include "components/types.hpp"
|
||||
#include "components/ecode.hpp"
|
||||
#include "components/eoperator.hpp"
|
||||
#include "components/especifier.hpp"
|
||||
#include "components/data_structures.hpp"
|
||||
#include "components/interface.hpp"
|
||||
#include "components/header_end.hpp"
|
||||
|
||||
#include "filesystem/gen.builder.hpp"
|
||||
#include "file_processors/builder.hpp"
|
||||
|
||||
GEN_NS_END
|
||||
|
||||
#include "helpers/gen.pop_ignores.inline.hpp"
|
||||
#include "helpers/pop_ignores.inline.hpp"
|
||||
|
Reference in New Issue
Block a user