Lime Parser Generator 0.1.0
Runtime-extensible LALR(1) parser with SIMD tokenization and LLVM JIT
Loading...
Searching...
No Matches
Dynamic Plugin Entry Point

Entry point convention for shared-library plugins. More...

Macros

#define LIME_PLUGIN_ENTRY_SYMBOL   "lime_plugin_entry"
 Symbol name looked up by the manager after dlopen().
 
#define LIME_PLUGIN_EXPORT   __declspec(dllexport)
 Macro for declaring the plugin entry point with proper visibility.
 

Typedefs

typedef const LimeParserPlugin *(* LimePluginEntryFn) (void)
 Function signature for the dynamic plugin entry point.
 

Detailed Description

Entry point convention for shared-library plugins.

Macro Definition Documentation

◆ LIME_PLUGIN_ENTRY_SYMBOL

#define LIME_PLUGIN_ENTRY_SYMBOL   "lime_plugin_entry"

#include <include/parser_manager.h>

Symbol name looked up by the manager after dlopen().

Definition at line 360 of file parser_manager.h.

◆ LIME_PLUGIN_EXPORT

#define LIME_PLUGIN_EXPORT   __declspec(dllexport)

#include <include/parser_manager.h>

Macro for declaring the plugin entry point with proper visibility.

Usage
LIME_PLUGIN_EXPORT const LimeParserPlugin *lime_plugin_entry(void) {
return &my_plugin;
}
#define LIME_PLUGIN_EXPORT
Macro for declaring the plugin entry point with proper visibility.
The plugin interface struct – the contract between the manager and a parser implementation.

Definition at line 373 of file parser_manager.h.

Typedef Documentation

◆ LimePluginEntryFn

typedef const LimeParserPlugin *(* LimePluginEntryFn) (void)

#include <include/parser_manager.h>

Function signature for the dynamic plugin entry point.

Every shared library plugin must export a function named "lime_plugin_entry" with this signature. The manager calls it after dlopen() to obtain the plugin's interface struct.

Returns
Pointer to the plugin's LimeParserPlugin struct. Must remain valid until the plugin's destroy() callback is called.
Example
LIME_PLUGIN_EXPORT const LimeParserPlugin *lime_plugin_entry(void) {
return &my_plugin;
}

Definition at line 357 of file parser_manager.h.