| fb-doc 0.2 documentation tool for FreeBasic

- Main Page
- Tutorial
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
Plugin.bas File Reference

An example code for an external emitter. More...

`#include "fb-doc_emitters.bi"`
`#include "fb-doc_parser.bi"`
Include dependency graph for Plugin.bas:

Go to the source code of this file.

## Functions

SUB_CDECL | dll_declare (BYVAL_AS_Parser_PTR P)
| Emitter called when the Parser is at a variable declaration. More...
SUB_CDECL | dll_function (BYVAL_AS_Parser_PTR P)
| Emitter called when the Parser is on top of a function body. More...
SUB_CDECL | dll_enum (BYVAL_AS_Parser_PTR P)
| Emitter called when the Parser is at the start of a ENUM block. More...
SUB_CDECL | dll_union (BYVAL_AS_Parser_PTR P)
| Emitter called when the Parser is at the start of a UNION block. More...
SUB_CDECL | dll_class (BYVAL_AS_Parser_PTR P)
| Emitter called when the Parser is at the start of a TYPE block. More...
SUB_CDECL | dll_define (BYVAL_AS_Parser_PTR P)
| Emitter called when the Parser is at an #DEFINE line or at the start of a #MACRO. More...
SUB_CDECL | dll_include (BYVAL_AS_Parser_PTR P)
| Emitter called when the Parser is at an #INCLUDE line. More...
SUB_CDECL | dll_init (BYVAL_AS_Parser_PTR P)
| Emitter called before the input gets parsed. More...
SUB_CDECL | dll_error (BYVAL_AS_Parser_PTR P)
| Emitter called for an error. More...
SUB_CDECL | dll_empty (BYVAL_AS_Parser_PTR P)
| Emitter called for an empty block in –geany mode. More...
SUB_CDECL | dll_exit (BYVAL_AS_Parser_PTR P)
| Emitter called after the input got parsed. More...
FUNCTION_CDECL_AS_EmitterIF_PTR | EmitterInit ()

## Detailed Description

An example code for an external emitter.

This file contains example source code for an external emitter. It isn't used in the fb-doc source tree. See Extending fb-doc for details.

Definition in file Plugin.bas.

## Function Documentation

SUB_CDECL dll_declare | ( | BYVAL_AS_Parser_PTR | P) |  |

Emitter called when the Parser is at a variable declaration.

This emitter generates a list of the function names called via the emitter interface. So when you input some source to fb-doc and use this emitter, the output is a list of the functions called by the parser for this input.

Before you can use this emitter, you have to compile it first, using the command

fbc -dylib Plugin.bas

The result is a binary called

- libdll_emitter.so (LINUX)
- libdll_emitter.dll (windows)

There's no way to compile or use an external emitter on DOS since DOS doesn't support dynamic linked libraries.

To use this emitter in fb-doc set its name (without the suffix .bas) just as an internal name (,so don't name your customized emitter similar to an internal emitter name).

Ie. the context of this file can get piped to fb-doc by the command

./fb-doc --geany Plugin < Plugin.bas

(LINUX example) and will generate the following output:

    DLL_INIT
    DLL_INCLUDE
    DLL_INCLUDE
    DLL_FUNCTION
    DLL_FUNCTION
    DLL_FUNCTION
    DLL_FUNCTION
    DLL_FUNCTION
    DLL_FUNCTION
    DLL_FUNCTION
    DLL_FUNCTION
    DLL_FUNCTION
    DLL_FUNCTION
    DLL_FUNCTION
    DLL_FUNCTION
    DLL_EXIT

Definition at line 66 of file Plugin.bas.

SUB_CDECL dll_function | ( | BYVAL_AS_Parser_PTR | P) |  |

Emitter called when the Parser is on top of a function body.

Definition at line 71 of file Plugin.bas.

SUB_CDECL dll_enum | ( | BYVAL_AS_Parser_PTR | P) |  |

Emitter called when the Parser is at the start of a ENUM block.

Definition at line 76 of file Plugin.bas.

SUB_CDECL dll_union | ( | BYVAL_AS_Parser_PTR | P) |  |

Emitter called when the Parser is at the start of a UNION block.

Definition at line 81 of file Plugin.bas.

SUB_CDECL dll_class | ( | BYVAL_AS_Parser_PTR | P) |  |

Emitter called when the Parser is at the start of a TYPE block.

Definition at line 86 of file Plugin.bas.

SUB_CDECL dll_define | ( | BYVAL_AS_Parser_PTR | P) |  |

Emitter called when the Parser is at an #DEFINE line or at the start of a #MACRO.

Definition at line 91 of file Plugin.bas.

SUB_CDECL dll_include | ( | BYVAL_AS_Parser_PTR | P) |  |

Emitter called when the Parser is at an #INCLUDE line.

Definition at line 96 of file Plugin.bas.

SUB_CDECL dll_init | ( | BYVAL_AS_Parser_PTR | P) |  |

Emitter called before the input gets parsed.

Definition at line 101 of file Plugin.bas.

SUB_CDECL dll_error | ( | BYVAL_AS_Parser_PTR | P) |  |

Emitter called for an error.

Definition at line 106 of file Plugin.bas.

SUB_CDECL dll_empty | ( | BYVAL_AS_Parser_PTR | P) |  |

Emitter called for an empty block in –geany mode.

Definition at line 111 of file Plugin.bas.

SUB_CDECL dll_exit | ( | BYVAL_AS_Parser_PTR | P) |  |

Emitter called after the input got parsed.

Definition at line 116 of file Plugin.bas.

FUNCTION_CDECL_AS_EmitterIF_PTR EmitterInit | ( | ) |  |

Definition at line 138 of file Plugin.bas.