Emitter for repairing the Doxygen listing files. More...
#include "fbdoc_emit_syntax.bi"
#include "fbdoc_options.bi"
#include "fbdoc_version.bi"
#include "fbdoc_doxyfile.bi"
Go to the source code of this file.
Macros | |
#define | GET_WORD_TYPE() |
check a word in source code More... | |
Functions | |
FUNCTION_AS_STRING | html_specials (BYVAL_AS_UBYTE_PTR T, BYVAL_AS_INTEGER A, BYVAL_AS_INTEGER L) |
Replace special characters for HTML output. More... | |
FUNCTION_AS_STRING | tex_specials (BYVAL_AS_UBYTE_PTR T, BYVAL_AS_INTEGER A, BYVAL_AS_INTEGER L) |
Replace special characters for LaTeX output. More... | |
FUNCTION_AS_STRING | xml_specials (BYVAL_AS_UBYTE_PTR T, BYVAL_AS_INTEGER A, BYVAL_AS_INTEGER L) |
Replace special characters for XML output. More... | |
FUNCTION_AS_STRING | html_eol (BYVAL_AS_RepData_PTR Symb, BYREF_AS_INTEGER Nr) |
Generate end of line code for HTML output. More... | |
FUNCTION_AS_STRING | tex_eol (BYVAL_AS_RepData_PTR Symb, BYREF_AS_INTEGER Nr) |
Generate end of line code for LaTeX output. More... | |
FUNCTION_AS_STRING | xml_eol (BYVAL_AS_RepData_PTR Symb, BYREF_AS_INTEGER Nr) |
Generate end of line code for XML output. More... | |
SUB_CDECL | synt_init (BYVAL_AS_Parser_PTR P) |
Emitter to be called per file before parsing starts. More... | |
SUB_CDECL | synt_exit (BYVAL_AS_Parser_PTR P) |
Emitter to be called after parsing of a file. More... | |
SUB_CDECL | synt_incl (BYVAL_AS_Parser_PTR P) |
Emitter to generate an include statement. More... | |
SUB_CDECL | synt_func (BYVAL_AS_Parser_PTR P) |
Emitter to generate a function name. More... | |
SUB | init_syntax (BYVAL_AS_EmitterIF_PTR Emi) |
Initialize the SyntaxHighlighting EmitterIF. More... | |
Emitter for repairing the Doxygen listing files.
This file contains the emitter SyntaxHighlighting, used as default emitter in mode --syntax-mode (-s) to generate accurate source code listings for Doxygen back-end.
This emitter replaces the code section in the original Doxygen output files, originally containing the C-like intermediate formate (used as Doxygen input). The code section gets replaced by real FB source code in accurate syntax highlighting. Also links get transfered from the old Doxygen output to the new context. This works for Html, LaTeX and XML output.
In mode --syntax-mode (-s) fb-doc doesn't operate on single FB source input files. Instead it parses some tags in the Doxygen configuration file Doxyfile
and operates on the specified paths / files (in a similar way as Doxygen did).
Definition in file fbdoc_emit_syntax.bas.
#define GET_WORD_TYPE | ( | ) |
check a word in source code
This macro is used for single source reasons. It reads the current word from the input buffer and checks if it matches
The result is in the typ variable:
Definition at line 1102 of file fbdoc_emit_syntax.bas.
FUNCTION_AS_STRING html_specials | ( | BYVAL_AS_UBYTE_PTR | T, |
BYVAL_AS_INTEGER | A, | ||
BYVAL_AS_INTEGER | L | ||
) |
Replace special characters for HTML output.
T | The Buffer to read from |
A | Start position (zero based) |
L | Length of substring |
The function is used as Highlighter::special_chars() function. It extracts a substring from the input buffer. Special characters are replaced by their HTML equivalents.
Definition at line 81 of file fbdoc_emit_syntax.bas.
FUNCTION_AS_STRING tex_specials | ( | BYVAL_AS_UBYTE_PTR | T, |
BYVAL_AS_INTEGER | A, | ||
BYVAL_AS_INTEGER | L | ||
) |
Replace special characters for LaTeX output.
T | The Buffer to read from |
A | Start position (zero based) |
L | Length of substring |
The function is used as Highlighter::special_chars() function. It extracts a substring from the input buffer. Special characters are replaced by their LaTeX equivalents.
Definition at line 107 of file fbdoc_emit_syntax.bas.
FUNCTION_AS_STRING xml_specials | ( | BYVAL_AS_UBYTE_PTR | T, |
BYVAL_AS_INTEGER | A, | ||
BYVAL_AS_INTEGER | L | ||
) |
Replace special characters for XML output.
T | The Buffer to read from |
A | Start position (zero based) |
L | Length of substring |
The function is used as Highlighter::special_chars() function. It extracts a substring from the input buffer. Special characters are replaced by their XML equivalents.
Definition at line 135 of file fbdoc_emit_syntax.bas.
FUNCTION_AS_STRING html_eol | ( | BYVAL_AS_RepData_PTR | Symb, |
BYREF_AS_INTEGER | Nr | ||
) |
Generate end of line code for HTML output.
Symb | Symbol table for cross-referencing |
Nr | Line number |
The function is used as Highlighter::eol() function. It generates code to end the current line and start a new one with the next line number. The number counter gets increased and returned as a BYREF parameter. Special line numbers are
Definition at line 167 of file fbdoc_emit_syntax.bas.
FUNCTION_AS_STRING tex_eol | ( | BYVAL_AS_RepData_PTR | Symb, |
BYREF_AS_INTEGER | Nr | ||
) |
Generate end of line code for LaTeX output.
Symb | Symbol table for cross-referencing |
Nr | Line number |
The function is used as Highlighter::eol() function. It generates code to end the current line and start a new one with the next line number. The number counter gets increased and returned as a BYREF parameter. Special line no. are
Definition at line 197 of file fbdoc_emit_syntax.bas.
FUNCTION_AS_STRING xml_eol | ( | BYVAL_AS_RepData_PTR | Symb, |
BYREF_AS_INTEGER | Nr | ||
) |
Generate end of line code for XML output.
Symb | Symbol table for cross-referencing |
Nr | Line number |
The function is used as Highlighter::eol() function. It generates code to end the current line and start a new one with the next line number. The number counter gets increased and returned as a BYREF parameter. Special line numbers are
Definition at line 223 of file fbdoc_emit_syntax.bas.
SUB_CDECL synt_init | ( | BYVAL_AS_Parser_PTR | P | ) |
Emitter to be called per file before parsing starts.
P | the parser calling this emitter |
This emitter gets called before the parser starts its parsing process. It initializes the FB source code emission.
Definition at line 1392 of file fbdoc_emit_syntax.bas.
SUB_CDECL synt_exit | ( | BYVAL_AS_Parser_PTR | P | ) |
Emitter to be called after parsing of a file.
P | the parser calling this emitter |
This emitter gets called after the parser ends its parsing process. It sends the rest of the FB source code to the output stream.
Definition at line 1415 of file fbdoc_emit_syntax.bas.
SUB_CDECL synt_incl | ( | BYVAL_AS_Parser_PTR | P | ) |
Emitter to generate an include statement.
P | the parser calling this emitter |
This emitter operates on include statements. It extracts the file name and checks the Highlighter::Symbols table for a matching link. If there is no link, nothing is done.
In case of a matching link the source code gets emitted up to the link.
File names need special handling because the string literals don't get checked for linkage.
Definition at line 1440 of file fbdoc_emit_syntax.bas.
SUB_CDECL synt_func | ( | BYVAL_AS_Parser_PTR | P | ) |
Emitter to generate a function name.
P | the parser calling this emitter |
This emitter operates on SUB
, FUNCTION
, PROPERTY
, OPERATOR
, CONSTRUCTOR and
DESTRUCTOR` definitions (function body, not declaration). It extracts the function name and checks the Highlighter::Symbols table for a matching link. If there is no link, nothing is done.
In case of a matching link the source code gets emitted up to the link.
Funktion names need special handling because they vary between intermediate format and FB source (::
vs. .
).
Definition at line 1477 of file fbdoc_emit_syntax.bas.
SUB init_syntax | ( | BYVAL_AS_EmitterIF_PTR | Emi | ) |
Initialize the SyntaxHighlighting
EmitterIF.
Emi | The EmitterIF to initialize |
FIXME
Definition at line 1519 of file fbdoc_emit_syntax.bas.