fcml  1.2.2
fcml_lag_assembler.h
Go to the documentation of this file.
1 /*
2  * FCML - Free Code Manipulation Library.
3  * Copyright (C) 2010-2020 Slawomir Wojtasiak
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
26 #ifndef FCML_LAG_ASSEMBLER_H_
27 #define FCML_LAG_ASSEMBLER_H_
28 
29 #include "fcml_symbols.h"
30 #include "fcml_assembler.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
41  fcml_int error_line;
45 
57 
84 LIB_EXPORT fcml_ceh_error LIB_CALL fcml_fn_lag_assemble(
85  fcml_st_lag_assembler_context *context, const fcml_string *source_code,
87 
101 LIB_EXPORT void LIB_CALL fcml_fn_lag_assembler_result_prepare(
103 
114 LIB_EXPORT void LIB_CALL fcml_fn_lag_assembler_result_free(
116 
117 #ifdef __cplusplus
118 }
119 #endif
120 
121 #endif /* FCML_LAG_ASSEMBLER_H_ */
fcml_ptr fcml_st_symbol_table
Type for symbol tables.
Definition: fcml_symbols.h:35
LIB_EXPORT void LIB_CALL fcml_fn_lag_assembler_result_prepare(fcml_st_lag_assembler_result *result)
Prepares reusable result holder for assembler.
fcml_st_assembler_conf configuration
Assembler behavior can be configured here.
Definition: fcml_lag_assembler.h:51
fcml_st_ceh_error_container errors
Error and warning messages from one-line assembler.
Definition: fcml_lag_assembler.h:39
Assembler runtime configuration.
Definition: fcml_assembler.h:48
Container for all collected errors and warnings.
Definition: fcml_errors.h:180
Load-and-go assembler runtime context.
Definition: fcml_lag_assembler.h:47
fcml_st_assembled_instruction * instructions
Chain of assembled instructions.
Definition: fcml_lag_assembler.h:43
LIB_EXPORT void LIB_CALL fcml_fn_lag_assembler_result_free(fcml_st_lag_assembler_result *result)
Cleans result holder.
fcml_st_entry_point entry_point
Instruction entry point configuration.
Definition: fcml_lag_assembler.h:53
struct fcml_st_lag_assembler_result fcml_st_lag_assembler_result
Result holder for load-and-go assembler.
LIB_EXPORT fcml_ceh_error LIB_CALL fcml_fn_lag_assemble(fcml_st_lag_assembler_context *context, const fcml_string *source_code, fcml_st_lag_assembler_result *result)
Multipass load-and-go assembler.
fcml_st_symbol_table symbol_table
Symbols table.
Definition: fcml_lag_assembler.h:55
struct fcml_st_lag_assembler_context fcml_st_lag_assembler_context
Load-and-go assembler runtime context.
Result holder for load-and-go assembler.
Definition: fcml_lag_assembler.h:37
API for symbols handling.
Describes address of an instruction code.
Definition: fcml_common.h:824
Encoded instruction.
Definition: fcml_assembler.h:85
fcml_int error_line
Number of line where assembler failed.
Definition: fcml_lag_assembler.h:41
fcml_st_assembler * assembler
Assembler instance that should be used to assemble instructions.
Definition: fcml_lag_assembler.h:49
Structures and functions declarations related to one-line FCML assembler.
struct fcml_st_assembler fcml_st_assembler
Abstract assembler representation.
Definition: fcml_assembler.h:43
fcml_uint16_t fcml_ceh_error
All error codes should be held in variables of this type.
Definition: fcml_errors.h:156