Skip to content
Authors

File resolution_machine.h

FileList > resolution_machine > src > resolution_machine.h

Go to the source code of this file

Handle the production of a word in a language configured into a production store. More...

  • #include <production_store.h>
  • #include <pdgl_defs.h>
  • #include <stdio.h>

Classes

Type Name
struct resmach_partial_t
The type of a partial resolution placeholder.
struct resmach_stack_t
A stack of resolution partials being resolved.

Public Functions

Type Name
uint8_t resmach_execute (const prodstr_store_t * store, resmach_stack_t * stack, FILE * stream)
Execute the production of a word in the language found in the production store.

Macros

Type Name
define RESMACH_EXECUTE_FAIL (0x1u)
The execution was unsuccessful.
define RESMACH_EXECUTE_NO_ENTRY (0x1u &lt;&lt; 0x1u)
The execution was unsuccessful with a TOML error for missing entry symbol.
define RESMACH_EXECUTE_NULL_STACK (0x1u &lt;&lt; 0x3u)
The execution was unsuccessful with a NULL pointer to the stack.
define RESMACH_EXECUTE_NULL_STORE (0x1u &lt;&lt; 0x2u)
The execution was unsuccessful with a NULL pointer to the production store.
define RESMACH_EXECUTE_NULL_STREAM (0x1u &lt;&lt; 0x4u)
The execution was unsuccessful with a NULL pointer to an output stream.
define RESMACH_EXECUTE_SUCCESS (0x0u)
The execution was successful.

Detailed Description

Author:

Joe Starr

Public Functions Documentation

function resmach_execute

Execute the production of a word in the language found in the production store.

uint8_t resmach_execute (
    const prodstr_store_t * store,
    resmach_stack_t * stack,
    FILE * stream
) 

Utilizing the given stack execute the production of a word in the language configured in the production store. Output the results of the execution to the configured stream.

Parameters:

  • store A production store containing a DGL
  • stack A stack of partial resolutions.
  • stream An output stream.

Returns:

A status flag indicating success.


Macro Definition Documentation

define RESMACH_EXECUTE_FAIL

The execution was unsuccessful.

#define RESMACH_EXECUTE_FAIL `(0x1u)`

Flag \ bit 7 6 5 4 3 2 1 0
Fail 0 0 0 0 0 0 0 1
No Entry Symbol 0 0 0 0 0 0 1 0
NULL store 0 0 0 0 0 1 0 0
NULL stack 0 0 0 0 1 0 0 0
NULL stream 0 0 0 1 0 0 0 0

define RESMACH_EXECUTE_NO_ENTRY

The execution was unsuccessful with a TOML error for missing entry symbol.

#define RESMACH_EXECUTE_NO_ENTRY `(0x1u << 0x1u)`


define RESMACH_EXECUTE_NULL_STACK

The execution was unsuccessful with a NULL pointer to the stack.

#define RESMACH_EXECUTE_NULL_STACK `(0x1u << 0x3u)`


define RESMACH_EXECUTE_NULL_STORE

The execution was unsuccessful with a NULL pointer to the production store.

#define RESMACH_EXECUTE_NULL_STORE `(0x1u << 0x2u)`


define RESMACH_EXECUTE_NULL_STREAM

The execution was unsuccessful with a NULL pointer to an output stream.

#define RESMACH_EXECUTE_NULL_STREAM `(0x1u << 0x4u)`


define RESMACH_EXECUTE_SUCCESS

The execution was successful.

#define RESMACH_EXECUTE_SUCCESS `(0x0u)`



The documentation for this class was generated from the following file source/resolution_machine/src/resolution_machine.h