The glsl-toolkit Reference Manual

This is the glsl-toolkit Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 06:18:49 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 glsl-toolkit

A library to parse and modify OpenGL Shader Language (GLSL) source code

Maintainer

Yukari Hafner <>

Author

Yukari Hafner <>

Home Page

https://Shirakumo.github.io/glsl-toolkit/

Source Control

(GIT https://github.com/Shirakumo/glsl-toolkit.git)

Bug Tracker

https://github.com/Shirakumo/glsl-toolkit/issues

License

zlib

Version

1.0.0

Dependencies
  • documentation-utils (system).
  • parse-float (system).
  • trivial-indent (system).
  • cl-ppcre (system).
Source

glsl-toolkit.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 glsl-toolkit/glsl-toolkit.asd

Source

glsl-toolkit.asd.

Parent Component

glsl-toolkit (system).

ASDF Systems

glsl-toolkit.


3.1.2 glsl-toolkit/package.lisp

Source

glsl-toolkit.asd.

Parent Component

glsl-toolkit (system).

Packages

3.1.3 glsl-toolkit/toolkit.lisp

Dependency

package.lisp (file).

Source

glsl-toolkit.asd.

Parent Component

glsl-toolkit (system).

Public Interface
Internals

3.1.4 glsl-toolkit/parser.lisp

Dependency

toolkit.lisp (file).

Source

glsl-toolkit.asd.

Parent Component

glsl-toolkit (system).

Public Interface
Internals

3.1.5 glsl-toolkit/grammar.lisp

Dependency

parser.lisp (file).

Source

glsl-toolkit.asd.

Parent Component

glsl-toolkit (system).

Public Interface
Internals

3.1.6 glsl-toolkit/printer.lisp

Dependency

grammar.lisp (file).

Source

glsl-toolkit.asd.

Parent Component

glsl-toolkit (system).

Public Interface
Internals

3.1.7 glsl-toolkit/walker.lisp

Dependency

printer.lisp (file).

Source

glsl-toolkit.asd.

Parent Component

glsl-toolkit (system).

Public Interface
Internals

3.1.8 glsl-toolkit/merge.lisp

Dependency

walker.lisp (file).

Source

glsl-toolkit.asd.

Parent Component

glsl-toolkit (system).

Public Interface
Internals

3.1.9 glsl-toolkit/sexpr.lisp

Dependency

merge.lisp (file).

Source

glsl-toolkit.asd.

Parent Component

glsl-toolkit (system).

Internals

3.1.10 glsl-toolkit/transform.lisp

Dependency

sexpr.lisp (file).

Source

glsl-toolkit.asd.

Parent Component

glsl-toolkit (system).

Public Interface
Internals

3.1.11 glsl-toolkit/method-combination.lisp

Dependency

transform.lisp (file).

Source

glsl-toolkit.asd.

Parent Component

glsl-toolkit (system).

Public Interface

combine-methods (function).

Internals

3.1.12 glsl-toolkit/documentation.lisp

Dependency

method-combination.lisp (file).

Source

glsl-toolkit.asd.

Parent Component

glsl-toolkit (system).


4 Packages

Packages are listed by definition order.


4.1 glsl-parser-rules

Source

package.lisp.

Nickname

org.shirakumo.trial.glsl.parser.rules

Public Interface

4.2 glsl-toolkit

Source

package.lisp.

Nickname

org.shirakumo.trial.glsl

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Special variables

Special Variable: *glsl-keyword-symbols*

List to all the keywords in GLSL shader files but as interned and upcased keyword symbols.

See *GLSL-KEYWORDS*

Package

glsl-toolkit.

Source

toolkit.lisp.

Special Variable: *glsl-keywords*

List to all the keywords in GLSL shader files.

This does not include terminals and other keywords such as {}/*+ etc.

Package

glsl-toolkit.

Source

toolkit.lisp.


5.1.2 Symbol macros

Symbol Macro: no-value
Package

glsl-toolkit.

Source

parser.lisp.


5.1.3 Macros

Macro: define-binary-op-walker (type)

Define a walker for a binary AST object.

This walker recurses over the left and right nodes in the object and returns a fresh value constructed from them.

Package

glsl-toolkit.

Source

walker.lisp.

Macro: define-empty-op-walker (type)

Define a walker for an empty AST object.

This walker function does nothing but construct a fresh return value.

Package

glsl-toolkit.

Source

walker.lisp.

Macro: define-object (name rule &body transform)

Defines a parsing object.

The RULE should be a parsing rule to match against. It should probably contain calls to the V rule in order to populate the V values list. This list is used to store the return values of the object.

TRANSFORM is an optional list of forms to be evaluated to transform the values list on a successful match. It acts as an implicit PROGN and the last value is returned as the value of the rule.

If no TRANSFORM is given, the return value is the V values list prepended with the name of the rule.

See DEFINE-RULE

Package

glsl-toolkit.

Source

parser.lisp.

Macro: define-reference (name &body rules)

Defines a reference parsing rule.

The body should be a number of sub-rules that may be matched in order to match this rule. Either the value stored in V by the V function, or the return value of the first matching sub-rule is returned.

See DEFINE-RULE

Package

glsl-toolkit.

Source

parser.lisp.

Macro: define-rule (name &body body)

Defines a new parsing rule of the given name.

This will create a function definition in the ORG.SHIRAKUMO.TRIAL.GLSL.RULES package by re-interning the symbol in that package.

A default lexical binding named V is provided.

See DEFINE-REFERENCE
See DEFINE-OBJECT

Package

glsl-toolkit.

Source

parser.lisp.

Macro: define-serialization (type args &body body)

Convenience function to define the serialization of AST objects of the given type.

ARGS must be a lambda-list to destructure the contents of the
AST object.

See SERIALIZER

Package

glsl-toolkit.

Source

printer.lisp.

Macro: define-serializer (type (object) &body body)

Convenience function to define a serializer function for AST objects of the given type.

See SERIALIZER

Package

glsl-toolkit.

Source

printer.lisp.

Macro: define-unary-op-walker (type)

Define a walker for a unary AST object.

This walker recurses over the single node in the object and returns a fresh value constructed from it.

Package

glsl-toolkit.

Source

walker.lisp.

Macro: define-walker (type (ast func env) &body body)

Define a new walker function that is responsible for walking over a particular type of AST object node.

See *WALKERS*
See WALKER
See DEFINE-WALKING-BODY

Package

glsl-toolkit.

Source

walker.lisp.

Macro: define-walking-body (type args &body body)

Convenience definition macro.

The ARGS should be a destructuring-bind lambda-list to destructure the contents of the object.

The body should be forms that provide the values to use in the resulting AST object. The last value should be the tail of the object’s list. Thus this is about equivalent to

(define-walker type (o)
(destructuring-bind .. (o)
(list* ’type body)))

Within the body the WALK function is rebound to one that can be conveniently used to recursively walk the AST. It only needs the new node to walk over. It optionally takes a new environment to supply.

You can reach the other function values like the full AST, the walk function, and the environment by changing the type to a list and providing the binding symbols as keyword arguments in it with :KEY :FUNC and :ENV.

See DEFINE-WALKER

Package

glsl-toolkit.

Source

walker.lisp.

Macro: with-indentation ((&optional step) &body body)

Makes sure the body is evaluated with an increased indentation level.

See *INDENT*
See INDENT

Package

glsl-toolkit.

Source

printer.lisp.

Macro: with-token-input (vector &body body)

Readies the environment for token parsing.

This binds *TOKEN-ARRAY* to the given vector and binds *TOKEN-INDEX* to 0.

See *TOKEN-ARRAY*
See *TOKEN-INDEX*

Package

glsl-toolkit.

Source

parser.lisp.


5.1.4 Compiler macros

Compiler Macro: advance (&optional offset)
Package

glsl-toolkit.

Source

parser.lisp.

Compiler Macro: backtrack (&optional offset)
Package

glsl-toolkit.

Source

parser.lisp.

Compiler Macro: consume ()
Package

glsl-toolkit.

Source

parser.lisp.

Compiler Macro: end-of-tokens-p ()
Package

glsl-toolkit.

Source

parser.lisp.

Compiler Macro: peek (&optional offset)
Package

glsl-toolkit.

Source

parser.lisp.

Compiler Macro: sformat (string &rest args)
Package

glsl-toolkit.

Source

printer.lisp.


5.1.5 Ordinary functions

Function: ! ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: != ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: % ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: %= ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: & ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: && ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: &= ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: ( ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: ) ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: * ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: *= ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: + ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: ++ ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: += ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: , ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: - ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: -- ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: -= ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: . ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: / ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: /= ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: : ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: ; ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: < ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: << ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: <<= ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: <= ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: = ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: == ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: > ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: >= ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: >> ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: >>= ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: ? ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: [ ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: ] ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: ^ ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: ^= ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: ^^ ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: addition ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: advance (&optional offset)

Advances the current token index.

See *TOKEN-INDEX*
See BACKTRACK

Package

glsl-toolkit.

Source

parser.lisp.

Function: array-initializer ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: array-modifier ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: array-specifier ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: assignment ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: assignment-expression ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: backtrack (&optional offset)

Reduces the current token index.

See *TOKEN-INDEX*
See ADVANCE

Package

glsl-toolkit.

Source

parser.lisp.

Function: basic-type ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: binding (name environment)

Accessor to the binding in the environment for the given name.

See BINDINGS
See ENVIRONMENT

Package

glsl-toolkit.

Source

walker.lisp.

Function: (setf binding) (name environment)
Package

glsl-toolkit.

Source

walker.lisp.

Function: bit-inversion ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: bitwise-and ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: boolean-constant ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: break ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: call-modifier ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: case-label ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: combine-methods (shaders)

Performs method combination on the listed shader parts.

Each shader in SHADERS may be a string, pathname, stream, or shader AST.

The method combination replicates the CLOS standard method combination, including before/after/around, call-next-method, and next-method-p.

Any standard function definition is assumed to be a primary
method. Before, after, and around methods can be defined by suffixing the name with @before/@after/@around, respectively. Note that aside from the suffix the function signatures (including qualifiers, return type, and argument types, but not argument names) have to match exactly, as otherwise the functions are considered separate units.

Within any primary or around method body, the variable next_method_p is statically replaced with 1 or 0 depending on whether a next method is available or not, and a call to call_next_method is replaced with a call to the next method function. If no arguments are passed to call_next_method, the arguments are copied automatically. You can also make use of maybe_call_next_method, which is semantically the same as if(next_method_p) call_next_method(...);

If methods are defined without a single corresponding primary method, an error is signalled.

The order of method definitions is relevant in the following way:
- For @before, the later methods are called *first*
- For @after, the later methods are called *last*
- For @around, the later methods are called *first*
- For @primary, the later methods are called *first*

Example:

void foo@after(int x){ 1; }
int foo(int y){ return 2; }
int foo(int z){
if(next_method_p) return call_next_method();
return -1;
}
void foo@before(int w){ 0; }

See PARSE

Package

glsl-toolkit.

Source

method-combination.lisp.

Function: compile-rule (rule)

Compile the rule s-expression.

The following types are handled specially:
- NULL NIL is returned
- KEYWORD Attempts to match a token that is EQ to this keyword. On success returns the keyword.
- SYMBOL Attempts to match the rule given named by the symbol. Returns whatever the rule returns.
- CHARACTER Attempts to match a token that is EQL to this character. Returns the character on match.
- STRING Attempts to match the string against the tokens. Returns the string on successful match.
- CONS One of the following compound, identified by the first symbol.
- AND Matches if all of the sub-rules match. Returns the last rule’s return value on successful match. - OR Matches if any of the sub-rules match.
Returns the first successful rule’s return value. - NOTANY Matches if none of the choices match.
Returns the token that did not match.
- ANY Matches if any of the choices match.
Returns the token that did match.
- WHEN Performs all the other sub-rules only if the first sub-rule matches. Returns the last sub-rule’s return value.
- V Makes sure the result of the sub-rule is added to the values list if the sub-rule matches. Returns what the sub-rule returned.
- * Repeatedly matches the sub-rule as many times as possible. Returns T.
- + Attempts to match the sub-rule at least once. Returns T on success.
- ? Attempts to match the sub-rule. If it does not match the secondary form is returned, or NO-VALUE. - ! Evaluates the sub-rule and returns its result, but always resets the token index to its initial value. - Otherwise the rule is returned unchanged.

See CONSUME-STRING
See CONSUME-ANY
See CONSUME-NOTANY
See DEFINE-RULE

Package

glsl-toolkit.

Source

parser.lisp.

Function: compound-statement ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: condition ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: condition-declarator ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: conditional ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: conditional-expression ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: constant-expression ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: constant-p (value environment)

Returns T if the given AST node is a constant value.

Package

glsl-toolkit.

Source

walker.lisp.

Function: consume ()

Returns the token at the current index and advances the index by one.

See PEEK
See ADVANCE

Package

glsl-toolkit.

Source

parser.lisp.

Function: consume-any (choices)

Consume any of the tokens in the choices sequence, if possible.

If a token matches, it is returned. Otherwise NIL is returned instead. The index is only modified if a match occurs.

Package

glsl-toolkit.

Source

parser.lisp.

Function: consume-notany (choices)

Consume any token that is not one of the tokens in the choices sequence.

If a token matches, it is returned. Otherwise NIL is
returned instead. The index is only modified if a match
occurs.

Package

glsl-toolkit.

Source

parser.lisp.

Function: consume-string (string)

Attempts to consume the given string from the token array.

If the string matches, it is returned. Otherwise, NIL is returned instead. If the match succeeds, the token index is modified. Otherwise it is reset to the point where it was before the match was attempted.

Package

glsl-toolkit.

Source

parser.lisp.

Function: consume-whitespace ()

Consumes all spaces and newlines in the token array from the current position on.

Package

glsl-toolkit.

Source

parser.lisp.

Function: continue ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: control-flow-p (value environment)

Returns T if the given AST node is a control-flow instruction.

Package

glsl-toolkit.

Source

walker.lisp.

Function: decimal-token ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: declaration ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: declaration-p (value environment)

Returns T if the given AST node is a declaration statement.

Package

glsl-toolkit.

Source

walker.lisp.

Function: decrement-modifier ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: discard ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: division ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: do-statement ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: end-of-tokens-p ()

Returns true if the end of the token array has been reached.

See *TOKEN-ARRAY*
See *TOKEN-INDEX*

Package

glsl-toolkit.

Source

parser.lisp.

Function: equal ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: exclusive-or ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: expression ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: expression-p (value environment)

Returns T if the given AST node is an expression.

Package

glsl-toolkit.

Source

walker.lisp.

Function: expression-statement ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: field-modifier ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: float-constant ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: float-token ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: for-statement ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: function-declaration ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: function-definition ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: function-identifier-p (value environment)

Returns T if the given AST node is an identifier for a function.

Package

glsl-toolkit.

Source

walker.lisp.

Function: function-prototype ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: global-identifier-p (value environment)

Returns T if the given AST node is an identifier that refers to a global definition.

Package

glsl-toolkit.

Source

walker.lisp.

Function: greater-equal-than ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: greater-than ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: hexadecimal-token ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: identifier ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: identifier-p (value environment)

Returns T if the given AST node might be an identifier.

This is not always accurate, as some identifiers can also be types at the same time. It thus depends on the context.

Package

glsl-toolkit.

Source

walker.lisp.

Function: identifier-token ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: inclusive-or ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: increment-modifier ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: indent (&optional offset)

Starts a fresh line and emits as many spaces as the *INDENT* variable dictates.

Package

glsl-toolkit.

Source

printer.lisp.

Function: initializer ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: instance-name ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: integer-constant ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: integer-token ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: interface-declaration ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: interpolation-qualifier ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: invariant-qualifier ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: inversion ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: iteration-statement ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: jump-statement ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: keyword-p (value environment)

Returns T if the given AST node is a GLSL keyword.

See *GLSL-KEYWORD-SYMBOLS*

Package

glsl-toolkit.

Source

walker.lisp.

Function: keyword-token ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: layout-qualifier ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: layout-qualifier-id ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: left-shift ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: less-equal-than ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: less-than ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: lex (input &optional toplevel-rule)

Lex the input string into a token array for use in parsing.

See NORMALIZE-SHADER-SOURCE
See RULE
See PARSE

Package

glsl-toolkit.

Source

parser.lisp.

Function: local-identifier-p (value environment)

Returns T if the given AST node is an identifier that refers to a local definition.

Package

glsl-toolkit.

Source

walker.lisp.

Function: logical-and ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: logical-or ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: logical-xor ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: make-environment (&optional parent)

Create a new environment object.

If not parent environment is passed in, the environment is assumed to be a top-level root environment.

See ENVIRONMENT

Package

glsl-toolkit.

Source

walker.lisp.

Function: matching-declarators-p (a b)

Returns true if the two variable declarations are considered to match.

This is true if:
- The first of both lists (qualifiers) match by MATCHING-QUALIFIERS-P - The second of both lists (specifiers) match by MATCHING-SPECIFIERS-P - The fourth of both lists (array-identifiers) match by EQUAL

The third of both lists (identifiers) must not match.
The fifth of both lists (initializers) must not match.

Package

glsl-toolkit.

Source

merge.lisp.

Function: matching-qualifiers-p (a b)

Returns true if the two given qualifier lists are considered to match.

The following qualifier parts are not considered:
:HIGHP :MEDIUMP :LOWP :INVARIANT :PRECISE :SMOOTH :FLAT :NOPERSPECTIVE

All other qualifiers must match by EQUAL, but don’t have to be
in the same order.

See https://www.khronos.org/opengl/wiki/Shader_Compilation#Qualifier_matching

Package

glsl-toolkit.

Source

merge.lisp.

Function: matching-specifiers-p (a b)

Returns true if the two given specifier lists are considered to match.

In order to match, the two lists have to be EQUAL.

Package

glsl-toolkit.

Source

merge.lisp.

Function: merge-shader-sources (sources &key to min-version profile)

Convenience function to merge the sources of multiple shaders into a single one.

Each source may be a string, pathname, or shader AST.

See PARSE
See MERGE-SHADERS
See SERIALIZE

Package

glsl-toolkit.

Source

merge.lisp.

Function: merge-shaders (shaders &key min-version profile)

Merge the given shader ASTs into a single AST.

The top-level AST nodes must be AST objects of type SHADER.

The merging will attempt to conflate declarations where possible and rename variables where necessary, in order to create a single shader that is internally consistent.

It also emits a single main function at the end, which does nothing but call the main function of each sub-shader in the sequence that the shaders were passed.

See HANDLE-DECLARATION
See HANDLE-IDENTIFIER
See WALK
See MERGE-SHADER-SOURCES

Package

glsl-toolkit.

Source

merge.lisp.

Function: modified-reference ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: modulus ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: multiple-expressions ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: multiplication ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: negation ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: normalize-shader-source (input)

Attempts to normalise the shader source code.

This does the following:
- Removes any and all comments from the code
- Handles the backslash-before-newline trick to get multiple lines to act as one.
- Converts CRLF/LFCR/LFLF/CRCR into NEWLINE
- Converts TAB to SPACE
- Converts consecutive whitespace into singular whitespace while preserving newlines.

The input may be one of the following types:
- PATHNAME
- STRING
- STREAM

See NEWLINE-P

Package

glsl-toolkit.

Source

parser.lisp.

Function: not-equal ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: octal-token ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: operator ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: parameter-declaration ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: parse (input &optional toplevel-rule)

Parses the given GLSL shader source input into an AST.

The input may be of the following types:
- STRING STREAM PATHNAME
The input is lexed before parsing as by LEX
- LIST
The input is converted into a vector
- VECTOR
The input is parsed by the given toplevel parsing rule.

See LEX
See RULE

Package

glsl-toolkit.

Source

parser.lisp.

Function: peek (&optional offset)

Returns the token at the index relative to the current position.

See *TOKEN-ARRAY*
See *TOKEN-INDEX*

Package

glsl-toolkit.

Source

parser.lisp.

Function: postfix-expression ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: precise-qualifier ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: precision-declaration ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: precision-qualifier ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: prefix-decrement ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: prefix-increment ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: preprocess (source &key include-resolution)
Package

glsl-toolkit.

Source

transform.lisp.

Function: preprocessor-directive ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: preprocessor-p (value environment)

Returns T if the given AST node is a preprocessor instruction.

Package

glsl-toolkit.

Source

walker.lisp.

Function: preprocessor-token ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: primary-expression ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: reference-modifier ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: remove-rule (name)

Removes the parsing rule of the given name.

Package

glsl-toolkit.

Source

parser.lisp.

Function: remove-serializer (type)

Removes the serializer function for AST objects of the given type.

See *SERIALIZERS*
See SERIALIZER

Package

glsl-toolkit.

Source

printer.lisp.

Function: remove-walker (type)

Removes the walker function for AST objects of the given type.

See WALKER
See *WALKERS*

Package

glsl-toolkit.

Source

walker.lisp.

Function: return ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: right-shift ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: root-environment-p (environment)

Returns T if the environment is a top-level root environment.

See ENVIRONMENT
See ROOT

Package

glsl-toolkit.

Source

walker.lisp.

Function: rule (name)

Returns the symbol that identifies the parsing rule of the given name.

This is a place that can be set with the function object
that should be used to parse the rule of the given name.

If no such rule exists, an error is signalled.

Package

glsl-toolkit.

Source

parser.lisp.

Function: (setf rule) (name)
Package

glsl-toolkit.

Source

parser.lisp.

Function: same-+ ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: selection-statement ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: serialize (part &optional to)

Serializes the AST part to shader source.

TO may be one of the following:
- NULL
The output is gathered into a string and returned. - T
The output is sent to *STANDARD-OUTPUT*.
- STREAM
The output is sent to this stream.
- PATHNAME
The output is written to the file. If the file already exists, an error is signalled.

See *SERIALIZE-STREAM*
See SERIALIZE-PART

Package

glsl-toolkit.

Source

printer.lisp.

Function: serialize-part (part)

Serializes the AST part.

This appropriately handles all values that can be contained in the AST. For AST objects, an appropriate serializer function is called if possible. Should an unknown AST object occur, an error is signalled.

See SERIALIZER

Package

glsl-toolkit.

Source

printer.lisp.

Function: serializer (type)

Accessor to the serializing function for AST objects of the given type.

See *SERIALIZERS*
See DEFINE-SERIALIZER
See REMOVE-SERIALIZER

Package

glsl-toolkit.

Source

printer.lisp.

Function: (setf serializer) (type)
Package

glsl-toolkit.

Source

printer.lisp.

Function: sformat (string &rest args)

Convenience function used to format to the serializing stream.

A special format directive ~O is provided as well, which causes SERIALIZE-PART to be called on the respective object.

Package

glsl-toolkit.

Source

printer.lisp.

Function: shader ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: simple-statement ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: statement ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: statement-p (value environment)

Returns T if the given AST node is a statement.

See DECLARATION-P
See EXPRESSION-P
See CONTROL-FLOW-P

Package

glsl-toolkit.

Source

walker.lisp.

Function: storage-qualifier ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: struct-declaration ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: struct-declarator ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: struct-field-declarator ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: struct-specifier ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: subroutine-qualifier ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: subtraction ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: switch-statement ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: token ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: tokenize ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: trace-parse ()

Cause all parse rule functions to emit tracing information.

See UNTRACE-PARSE
See TRACE-PARSE-FUNC

Package

glsl-toolkit.

Source

parser.lisp.

Function: transform (source profile version)
Package

glsl-toolkit.

Source

transform.lisp.

Function: type-name ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: type-qualifier ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: type-specifier ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: type-specifier-nonarray ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: unary-expression ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: uniquify (table &optional name)

Create a (hopefully) unique identifier for the given name.

The returned name is prefixed by two underscores. Identifiers like that are reserved for use by the underlying library or framework (us), so there should not be any clash with user identifiers unless the shader is not conforming to begin with.

See *UNIQUE-COUNTER*

Package

glsl-toolkit.

Source

merge.lisp.

Function: untrace-parse ()

Make all parse rule functions cease to emit tracing information.

See TRACE-PARSE
See UNTRACE-PARSE-FUNC

Package

glsl-toolkit.

Source

parser.lisp.

Function: variable-declaration ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: variable-identifier-p (value environment)

Returns T if the given AST node is an identifier for a variable.

Package

glsl-toolkit.

Source

walker.lisp.

Function: variable-initializer ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: walk (ast function &optional environment)

Walk over the AST, calling FUNCTION on each interesting node.

Returns a fresh AST that was constructed by the function.

The function will be called with three arguments:
- The AST node at the current point
- The surrounding context in which the AST node is
- The environment object that maintains lexical information

The function should return a single value, which is the value that should be put into a fresh AST in place of the original node.

Note that calling any of the environment inspection functions on an identifier in a lower level than the current AST node that the function received is not going to work. The lexical information is only guaranteed to be ready by the time the function is called with the identifier itself.

See ROOT-ENVIRONMENT-P
See PREPROCESSOR-P
See CONSTANT-P
See DECLARATION-P
See EXPRESSION-P
See CONTROL-FLOW-P
See KEYWORD-P
See STATEMENT-P
See IDENTIFIER-P
See GLOBAL-IDENTIFIER-P
See LOCAL-IDENTIFIER-P
See VARIABLE-IDENTIFIER-P
See FUNCTION-IDENTIFIER-P
See ENVIRONMENT
See WALK-PART

Package

glsl-toolkit.

Source

walker.lisp.

Function: walk-part (ast context function environment)

Walk over the given AST node.

On AST objects, this will call out to the respective walker function.

See WALKER

Package

glsl-toolkit.

Source

walker.lisp.

Function: walker (type)

Accessor to the walker function for AST objects of the given type.

See *WALKERS*
See REMOVE-WALKER
See DEFINE-WALKER

Package

glsl-toolkit.

Source

walker.lisp.

Function: (setf walker) (type)
Package

glsl-toolkit.

Source

walker.lisp.

Function: while-statement ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: whitespace ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: { ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: | ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: |= ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: || ()
Package

glsl-parser-rules.

Source

grammar.lisp.

Function: } ()
Package

glsl-parser-rules.

Source

grammar.lisp.


5.1.6 Classes

Class: environment

Struct to hold information about the lexical environment during code walking.

See MAKE-ENVIRONMENT
See ROOT
See BINDINGS

Package

glsl-toolkit.

Source

walker.lisp.

Direct methods
Direct slots
Slot: root
Readers

root.

Writers

This slot is read-only.

Slot: bindings
Initform

(make-hash-table :test (quote equal))

Readers

bindings.

Writers

This slot is read-only.


5.2 Internals


5.2.1 Special variables

Special Variable: *indent*

Variable to represent the current indenting level.

See WITH-INDENTATION
See INDENT

Package

glsl-toolkit.

Source

printer.lisp.

Special Variable: *max-index*
Package

glsl-toolkit.

Source

parser.lisp.

Special Variable: *serialize-stream*

The stream to which the serializing output is sent to.

This has to be bound when SERIALIZE-PART is called.

Package

glsl-toolkit.

Source

printer.lisp.

Special Variable: *serializers*

Hash table associating AST object types to serializer functions.

The function must accept a single argument, which is the
AST object itself.

See SERIALIZER
See REMOVE-SERIALIZER

Package

glsl-toolkit.

Source

printer.lisp.

Special Variable: *sexpr-transforms*
Package

glsl-toolkit.

Source

sexpr.lisp.

Special Variable: *token-array*

Holds a vector of tokens to be processed by the parser.

See PEEK
See CONSUME
See *TOKEN-INDEX*
See WITH-TOKEN-INPUT

Package

glsl-toolkit.

Source

parser.lisp.

Special Variable: *token-index*

Holds the index into the token array that represents the current parser position.

See ADVANCE
See BACKTRACK
See *TOKEN-ARRAY*
See WITH-TOKEN-INPUT

Package

glsl-toolkit.

Source

parser.lisp.

Special Variable: *trace-level*

Integer to represent the current stack level during tracing.

Package

glsl-toolkit.

Source

parser.lisp.

Special Variable: *traced*

Hash table to hold associate names with the original function definitions.

Package

glsl-toolkit.

Source

parser.lisp.

Special Variable: *unique-counter*

Counter to hold the current index used to compute names for unique identifiers.

See UNIQUIFY

Package

glsl-toolkit.

Source

merge.lisp.

Special Variable: *walkers*

Hash table associating AST object types to walker functions.

A walker function must accept three arguments:
- The AST object to process
- The function that should walk over the AST
- The current lexical environment
It must return an AST object to use in place of the current one in the resulting AST.

See WALKER
See REMOVE-WALKER
See DEFINE-WALKER

Package

glsl-toolkit.

Source

walker.lisp.


5.2.2 Macros

Macro: define-binary-op (name left op right)

Shorthand to define a binary operator object.

This takes care to avoid duplicate parsing of the same sequence if the subsequence should succeed. Meaning that if the left expression matches, but the operator or the right one does not it simply returns the left expression, instead of failing to match and causing a re-matching lower down in the tree.

Without this optimisation, performance would suffer greatly.

See DEFINE-OBJECT

Package

glsl-toolkit.

Source

grammar.lisp.

Macro: define-expr-binary (name ast default)
Package

glsl-toolkit.

Source

sexpr.lisp.

Macro: define-operator-objects (&body names)

Shorthand to define an object that parses a string and returns the keyword version of that string.

Used to define the various token objects.

See DEFINE-OBJECT

Package

glsl-toolkit.

Source

grammar.lisp.

Macro: define-sexpr-comparator (name ast)
Package

glsl-toolkit.

Source

sexpr.lisp.

Macro: define-sexpr-transform (op args &body body)
Package

glsl-toolkit.

Source

sexpr.lisp.

Macro: with-glsl-syntax (&body forms)
Package

glsl-toolkit.

Source

sexpr.lisp.


5.2.3 Ordinary functions

Function: %format-object (s a cp at)

Helper function to call SERIALIZE-PART in a format string.

Package

glsl-toolkit.

Source

printer.lisp.

Function: call-traced-function (name)

Wrapper to output trace information around the call to the given function.

See *TRACE-LEVEL*
See *TRACED*

Package

glsl-toolkit.

Source

parser.lisp.

Function: check-parse-complete (toplevel-rule)
Package

glsl-toolkit.

Source

parser.lisp.

Function: compile-format-string (string)

Rewrite the format string so that the ~O directive is acceptable.

Package

glsl-toolkit.

Source

printer.lisp.

Function: definition-argvars (def)
Package

glsl-toolkit.

Source

method-combination.lisp.

Function: definition-identifier (def)
Package

glsl-toolkit.

Source

method-combination.lisp.

Function: (setf definition-identifier) (def)
Package

glsl-toolkit.

Source

method-combination.lisp.

Function: definition-signature (def)
Package

glsl-toolkit.

Source

method-combination.lisp.

Function: discover-expr-around (point)
Package

glsl-toolkit.

Source

parser.lisp.

Function: ends-with (end sequence)
Package

glsl-toolkit.

Source

toolkit.lisp.

Function: enlist (list &rest items)

Ensures that LIST is a list.

If it is not, it is combined with ITEMS to form a list.

Package

glsl-toolkit.

Source

toolkit.lisp.

Function: ensure-shader (thing)
Package

glsl-toolkit.

Source

parser.lisp.

Function: find-any (choices sequence)

Like CL:FIND, but the item to find is a sequence of things that can be found.

Package

glsl-toolkit.

Source

toolkit.lisp.

Function: find-direction-qualifier (qualifiers)

Find the direction qualifier keyword in the qualifiers list.

Package

glsl-toolkit.

Source

merge.lisp.

Function: find-layout-qualifier (qualifiers)

Find the layout qualifier object in the qualifiers list.

Package

glsl-toolkit.

Source

merge.lisp.

Function: find-matching-layout-declaration (qualifiers declarations)
Package

glsl-toolkit.

Source

merge.lisp.

Function: handle-declaration (ast context environment global-env)

Handles a declaration during a shader merging operation.

This will take care of registering the identifier with the global environment, substituting the name if necessary, merging the
declarations if possible, and erroring if there is a severe
mismatch that cannot be resolved.

The merging of variable declarations is in part according to the
OpenGL specification on interface matching between shader stages.
More specifically, the following strategy is employed here:
- If the declaration is a pipeline declaration (in/out/inout)
- If it has a layout qualifier
- If there is no known matching layout qualifier, register it
- If there is one and the declarations match, map the name to
that of the previous declaration and remove the current one
- Otherwise error as there are conflicting declarations that
cannot be rectified
- If the identifier is already known
- If the declarations of this one and the previous declaration
of the same identifier match, map the name to that of the
previous declaration and remove the current one
- Otherwise warn about the possible mismatch and remap the
current identifier to a new one
- Store the identifier directly and return the AST as-is
- If the identifier is already known
- Remap the identifier to a new one
- Otherwise store the identifier directly and return the AST as-is

See https://www.khronos.org/opengl/wiki/Shader_Compilation#Interface_matching See FIND-DIRECTION-QUALIFIER
See FIND-LAYOUT-QUALIFIER
See MATCHING-DECLARATORS-P
See MERGE-SHADERS

Package

glsl-toolkit.

Source

merge.lisp.

Function: handle-function-definition (ast env)
Package

glsl-toolkit.

Source

method-combination.lisp.

Function: handle-identifier (ast context environment global-env)

Handles an identifier during a shader merging operation.

This will take care of substituting the identifier if it has been remapped globally.

See GLOBAL-IDENTIFIER-P
See MERGE-SHADERS

Package

glsl-toolkit.

Source

merge.lisp.

Function: mapcar* (function list)

Like CL:MAPCAR, but only gathers non-NIL results.

Package

glsl-toolkit.

Source

toolkit.lisp.

Function: merge-plists (a b)

Merges the two plists together by appending their values for the same keys.

Returns a fresh plist.

Package

glsl-toolkit.

Source

toolkit.lisp.

Function: newline-p (input)

Returns true if the input is a newline character and thus either CR or LF.

Package

glsl-toolkit.

Source

parser.lisp.

Function: remove-sexpr-transform (op)
Package

glsl-toolkit.

Source

sexpr.lisp.

Function: resolve-method-definitions (identifier definitions)
Package

glsl-toolkit.

Source

method-combination.lisp.

Function: separate-qualifier-specifier (types)
Package

glsl-toolkit.

Source

sexpr.lisp.

Function: sexpr->glsl-ast (form)
Package

glsl-toolkit.

Source

sexpr.lisp.

Function: sexpr-transform (op)
Package

glsl-toolkit.

Source

sexpr.lisp.

Function: (setf sexpr-transform) (op)
Package

glsl-toolkit.

Source

sexpr.lisp.

Function: split-shader-into-groups (shader)
Package

glsl-toolkit.

Source

merge.lisp.

Function: starts-with (start sequence)
Package

glsl-toolkit.

Source

toolkit.lisp.

Function: symbol->identifier (symbol)
Package

glsl-toolkit.

Source

sexpr.lisp.

Function: trace-parse-func (name)

Ensures the given function is being traced for parsing, if it isn’t already.

This replaces the global function definition.

See CALL-TRACED-FUNCTION
See *TRACED*
See UNTRACE-PARSE-FUNC

Package

glsl-toolkit.

Source

parser.lisp.

Function: transform-to-core (version ast ctx env)
Package

glsl-toolkit.

Source

transform.lisp.

Function: transform-to-gles (version ast ctx env)
Package

glsl-toolkit.

Source

transform.lisp.

Function: unlist (listish)
Package

glsl-toolkit.

Source

toolkit.lisp.

Function: untrace-parse-func (name)

Ensures the given functions restored to its original definition, if it isn’t already.

This replaces the global function definition.

See *TRACED*
See TRACE-PARSE-FUNC

Package

glsl-toolkit.

Source

parser.lisp.


5.2.4 Generic functions

Generic Reader: bindings (object)

Accessor to the table associating identifiers to bindings.

The values must be lists where the first item is a keyword that identifies the type of binding as either a :FUNCTION or :VARIABLE binding.

See ENVIRONMENT
See BINDING

Package

glsl-toolkit.

Methods
Reader Method: bindings ((environment environment))

automatically generated reader method

Source

walker.lisp.

Target Slot

bindings.

Generic Reader: root (object)

Accessor to the root environment.

The root environment is the top-level lexical environment that holds all global definitions. On root environments, this must resolve to the environment instance itself.

See ENVIRONMENT

Package

glsl-toolkit.

Methods
Reader Method: root ((environment environment))

automatically generated reader method

Source

walker.lisp.

Target Slot

root.


5.2.5 Types

Type: index ()

Type specifier for a token index.

Package

glsl-toolkit.

Source

parser.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   !   %   &   (   )   *   +   ,   -   .   /   :   ;   <   =   >   ?   [   ]   ^   {   |   }  
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   R   S   T   U   V   W  
Index Entry  Section

!
!: Public ordinary functions
!=: Public ordinary functions

%
%: Public ordinary functions
%=: Public ordinary functions
%format-object: Private ordinary functions

&
&: Public ordinary functions
&&: Public ordinary functions
&=: Public ordinary functions

(
(: Public ordinary functions
(setf binding): Public ordinary functions
(setf definition-identifier): Private ordinary functions
(setf rule): Public ordinary functions
(setf serializer): Public ordinary functions
(setf sexpr-transform): Private ordinary functions
(setf walker): Public ordinary functions

)
): Public ordinary functions

*
*: Public ordinary functions
*=: Public ordinary functions

+
+: Public ordinary functions
++: Public ordinary functions
+=: Public ordinary functions

,
,: Public ordinary functions

-
-: Public ordinary functions
--: Public ordinary functions
-=: Public ordinary functions

.
.: Public ordinary functions

/
/: Public ordinary functions
/=: Public ordinary functions

:
:: Public ordinary functions

;
;: Public ordinary functions

<
<: Public ordinary functions
<<: Public ordinary functions
<<=: Public ordinary functions
<=: Public ordinary functions

=
=: Public ordinary functions
==: Public ordinary functions

>
>: Public ordinary functions
>=: Public ordinary functions
>>: Public ordinary functions
>>=: Public ordinary functions

?
?: Public ordinary functions

[
[: Public ordinary functions

]
]: Public ordinary functions

^
^: Public ordinary functions
^=: Public ordinary functions
^^: Public ordinary functions

{
{: Public ordinary functions

|
|: Public ordinary functions
|=: Public ordinary functions
||: Public ordinary functions

}
}: Public ordinary functions

A
addition: Public ordinary functions
advance: Public compiler macros
advance: Public ordinary functions
array-initializer: Public ordinary functions
array-modifier: Public ordinary functions
array-specifier: Public ordinary functions
assignment: Public ordinary functions
assignment-expression: Public ordinary functions

B
backtrack: Public compiler macros
backtrack: Public ordinary functions
basic-type: Public ordinary functions
binding: Public ordinary functions
bindings: Private generic functions
bindings: Private generic functions
bit-inversion: Public ordinary functions
bitwise-and: Public ordinary functions
boolean-constant: Public ordinary functions
break: Public ordinary functions

C
call-modifier: Public ordinary functions
call-traced-function: Private ordinary functions
case-label: Public ordinary functions
check-parse-complete: Private ordinary functions
combine-methods: Public ordinary functions
compile-format-string: Private ordinary functions
compile-rule: Public ordinary functions
Compiler Macro, advance: Public compiler macros
Compiler Macro, backtrack: Public compiler macros
Compiler Macro, consume: Public compiler macros
Compiler Macro, end-of-tokens-p: Public compiler macros
Compiler Macro, peek: Public compiler macros
Compiler Macro, sformat: Public compiler macros
compound-statement: Public ordinary functions
condition: Public ordinary functions
condition-declarator: Public ordinary functions
conditional: Public ordinary functions
conditional-expression: Public ordinary functions
constant-expression: Public ordinary functions
constant-p: Public ordinary functions
consume: Public compiler macros
consume: Public ordinary functions
consume-any: Public ordinary functions
consume-notany: Public ordinary functions
consume-string: Public ordinary functions
consume-whitespace: Public ordinary functions
continue: Public ordinary functions
control-flow-p: Public ordinary functions

D
decimal-token: Public ordinary functions
declaration: Public ordinary functions
declaration-p: Public ordinary functions
decrement-modifier: Public ordinary functions
define-binary-op: Private macros
define-binary-op-walker: Public macros
define-empty-op-walker: Public macros
define-expr-binary: Private macros
define-object: Public macros
define-operator-objects: Private macros
define-reference: Public macros
define-rule: Public macros
define-serialization: Public macros
define-serializer: Public macros
define-sexpr-comparator: Private macros
define-sexpr-transform: Private macros
define-unary-op-walker: Public macros
define-walker: Public macros
define-walking-body: Public macros
definition-argvars: Private ordinary functions
definition-identifier: Private ordinary functions
definition-signature: Private ordinary functions
discard: Public ordinary functions
discover-expr-around: Private ordinary functions
division: Public ordinary functions
do-statement: Public ordinary functions

E
end-of-tokens-p: Public compiler macros
end-of-tokens-p: Public ordinary functions
ends-with: Private ordinary functions
enlist: Private ordinary functions
ensure-shader: Private ordinary functions
equal: Public ordinary functions
exclusive-or: Public ordinary functions
expression: Public ordinary functions
expression-p: Public ordinary functions
expression-statement: Public ordinary functions

F
field-modifier: Public ordinary functions
find-any: Private ordinary functions
find-direction-qualifier: Private ordinary functions
find-layout-qualifier: Private ordinary functions
find-matching-layout-declaration: Private ordinary functions
float-constant: Public ordinary functions
float-token: Public ordinary functions
for-statement: Public ordinary functions
Function, !: Public ordinary functions
Function, !=: Public ordinary functions
Function, %: Public ordinary functions
Function, %=: Public ordinary functions
Function, %format-object: Private ordinary functions
Function, &: Public ordinary functions
Function, &&: Public ordinary functions
Function, &=: Public ordinary functions
Function, (: Public ordinary functions
Function, (setf binding): Public ordinary functions
Function, (setf definition-identifier): Private ordinary functions
Function, (setf rule): Public ordinary functions
Function, (setf serializer): Public ordinary functions
Function, (setf sexpr-transform): Private ordinary functions
Function, (setf walker): Public ordinary functions
Function, ): Public ordinary functions
Function, *: Public ordinary functions
Function, *=: Public ordinary functions
Function, +: Public ordinary functions
Function, ++: Public ordinary functions
Function, +=: Public ordinary functions
Function, ,: Public ordinary functions
Function, -: Public ordinary functions
Function, --: Public ordinary functions
Function, -=: Public ordinary functions
Function, .: Public ordinary functions
Function, /: Public ordinary functions
Function, /=: Public ordinary functions
Function, :: Public ordinary functions
Function, ;: Public ordinary functions
Function, <: Public ordinary functions
Function, <<: Public ordinary functions
Function, <<=: Public ordinary functions
Function, <=: Public ordinary functions
Function, =: Public ordinary functions
Function, ==: Public ordinary functions
Function, >: Public ordinary functions
Function, >=: Public ordinary functions
Function, >>: Public ordinary functions
Function, >>=: Public ordinary functions
Function, ?: Public ordinary functions
Function, addition: Public ordinary functions
Function, advance: Public ordinary functions
Function, array-initializer: Public ordinary functions
Function, array-modifier: Public ordinary functions
Function, array-specifier: Public ordinary functions
Function, assignment: Public ordinary functions
Function, assignment-expression: Public ordinary functions
Function, backtrack: Public ordinary functions
Function, basic-type: Public ordinary functions
Function, binding: Public ordinary functions
Function, bit-inversion: Public ordinary functions
Function, bitwise-and: Public ordinary functions
Function, boolean-constant: Public ordinary functions
Function, break: Public ordinary functions
Function, call-modifier: Public ordinary functions
Function, call-traced-function: Private ordinary functions
Function, case-label: Public ordinary functions
Function, check-parse-complete: Private ordinary functions
Function, combine-methods: Public ordinary functions
Function, compile-format-string: Private ordinary functions
Function, compile-rule: Public ordinary functions
Function, compound-statement: Public ordinary functions
Function, condition: Public ordinary functions
Function, condition-declarator: Public ordinary functions
Function, conditional: Public ordinary functions
Function, conditional-expression: Public ordinary functions
Function, constant-expression: Public ordinary functions
Function, constant-p: Public ordinary functions
Function, consume: Public ordinary functions
Function, consume-any: Public ordinary functions
Function, consume-notany: Public ordinary functions
Function, consume-string: Public ordinary functions
Function, consume-whitespace: Public ordinary functions
Function, continue: Public ordinary functions
Function, control-flow-p: Public ordinary functions
Function, decimal-token: Public ordinary functions
Function, declaration: Public ordinary functions
Function, declaration-p: Public ordinary functions
Function, decrement-modifier: Public ordinary functions
Function, definition-argvars: Private ordinary functions
Function, definition-identifier: Private ordinary functions
Function, definition-signature: Private ordinary functions
Function, discard: Public ordinary functions
Function, discover-expr-around: Private ordinary functions
Function, division: Public ordinary functions
Function, do-statement: Public ordinary functions
Function, end-of-tokens-p: Public ordinary functions
Function, ends-with: Private ordinary functions
Function, enlist: Private ordinary functions
Function, ensure-shader: Private ordinary functions
Function, equal: Public ordinary functions
Function, exclusive-or: Public ordinary functions
Function, expression: Public ordinary functions
Function, expression-p: Public ordinary functions
Function, expression-statement: Public ordinary functions
Function, field-modifier: Public ordinary functions
Function, find-any: Private ordinary functions
Function, find-direction-qualifier: Private ordinary functions
Function, find-layout-qualifier: Private ordinary functions
Function, find-matching-layout-declaration: Private ordinary functions
Function, float-constant: Public ordinary functions
Function, float-token: Public ordinary functions
Function, for-statement: Public ordinary functions
Function, function-declaration: Public ordinary functions
Function, function-definition: Public ordinary functions
Function, function-identifier-p: Public ordinary functions
Function, function-prototype: Public ordinary functions
Function, global-identifier-p: Public ordinary functions
Function, greater-equal-than: Public ordinary functions
Function, greater-than: Public ordinary functions
Function, handle-declaration: Private ordinary functions
Function, handle-function-definition: Private ordinary functions
Function, handle-identifier: Private ordinary functions
Function, hexadecimal-token: Public ordinary functions
Function, identifier: Public ordinary functions
Function, identifier-p: Public ordinary functions
Function, identifier-token: Public ordinary functions
Function, inclusive-or: Public ordinary functions
Function, increment-modifier: Public ordinary functions
Function, indent: Public ordinary functions
Function, initializer: Public ordinary functions
Function, instance-name: Public ordinary functions
Function, integer-constant: Public ordinary functions
Function, integer-token: Public ordinary functions
Function, interface-declaration: Public ordinary functions
Function, interpolation-qualifier: Public ordinary functions
Function, invariant-qualifier: Public ordinary functions
Function, inversion: Public ordinary functions
Function, iteration-statement: Public ordinary functions
Function, jump-statement: Public ordinary functions
Function, keyword-p: Public ordinary functions
Function, keyword-token: Public ordinary functions
Function, layout-qualifier: Public ordinary functions
Function, layout-qualifier-id: Public ordinary functions
Function, left-shift: Public ordinary functions
Function, less-equal-than: Public ordinary functions
Function, less-than: Public ordinary functions
Function, lex: Public ordinary functions
Function, local-identifier-p: Public ordinary functions
Function, logical-and: Public ordinary functions
Function, logical-or: Public ordinary functions
Function, logical-xor: Public ordinary functions
Function, make-environment: Public ordinary functions
Function, mapcar*: Private ordinary functions
Function, matching-declarators-p: Public ordinary functions
Function, matching-qualifiers-p: Public ordinary functions
Function, matching-specifiers-p: Public ordinary functions
Function, merge-plists: Private ordinary functions
Function, merge-shader-sources: Public ordinary functions
Function, merge-shaders: Public ordinary functions
Function, modified-reference: Public ordinary functions
Function, modulus: Public ordinary functions
Function, multiple-expressions: Public ordinary functions
Function, multiplication: Public ordinary functions
Function, negation: Public ordinary functions
Function, newline-p: Private ordinary functions
Function, normalize-shader-source: Public ordinary functions
Function, not-equal: Public ordinary functions
Function, octal-token: Public ordinary functions
Function, operator: Public ordinary functions
Function, parameter-declaration: Public ordinary functions
Function, parse: Public ordinary functions
Function, peek: Public ordinary functions
Function, postfix-expression: Public ordinary functions
Function, precise-qualifier: Public ordinary functions
Function, precision-declaration: Public ordinary functions
Function, precision-qualifier: Public ordinary functions
Function, prefix-decrement: Public ordinary functions
Function, prefix-increment: Public ordinary functions
Function, preprocess: Public ordinary functions
Function, preprocessor-directive: Public ordinary functions
Function, preprocessor-p: Public ordinary functions
Function, preprocessor-token: Public ordinary functions
Function, primary-expression: Public ordinary functions
Function, reference-modifier: Public ordinary functions
Function, remove-rule: Public ordinary functions
Function, remove-serializer: Public ordinary functions
Function, remove-sexpr-transform: Private ordinary functions
Function, remove-walker: Public ordinary functions
Function, resolve-method-definitions: Private ordinary functions
Function, return: Public ordinary functions
Function, right-shift: Public ordinary functions
Function, root-environment-p: Public ordinary functions
Function, rule: Public ordinary functions
Function, same-+: Public ordinary functions
Function, selection-statement: Public ordinary functions
Function, separate-qualifier-specifier: Private ordinary functions
Function, serialize: Public ordinary functions
Function, serialize-part: Public ordinary functions
Function, serializer: Public ordinary functions
Function, sexpr->glsl-ast: Private ordinary functions
Function, sexpr-transform: Private ordinary functions
Function, sformat: Public ordinary functions
Function, shader: Public ordinary functions
Function, simple-statement: Public ordinary functions
Function, split-shader-into-groups: Private ordinary functions
Function, starts-with: Private ordinary functions
Function, statement: Public ordinary functions
Function, statement-p: Public ordinary functions
Function, storage-qualifier: Public ordinary functions
Function, struct-declaration: Public ordinary functions
Function, struct-declarator: Public ordinary functions
Function, struct-field-declarator: Public ordinary functions
Function, struct-specifier: Public ordinary functions
Function, subroutine-qualifier: Public ordinary functions
Function, subtraction: Public ordinary functions
Function, switch-statement: Public ordinary functions
Function, symbol->identifier: Private ordinary functions
Function, token: Public ordinary functions
Function, tokenize: Public ordinary functions
Function, trace-parse: Public ordinary functions
Function, trace-parse-func: Private ordinary functions
Function, transform: Public ordinary functions
Function, transform-to-core: Private ordinary functions
Function, transform-to-gles: Private ordinary functions
Function, type-name: Public ordinary functions
Function, type-qualifier: Public ordinary functions
Function, type-specifier: Public ordinary functions
Function, type-specifier-nonarray: Public ordinary functions
Function, unary-expression: Public ordinary functions
Function, uniquify: Public ordinary functions
Function, unlist: Private ordinary functions
Function, untrace-parse: Public ordinary functions
Function, untrace-parse-func: Private ordinary functions
Function, variable-declaration: Public ordinary functions
Function, variable-identifier-p: Public ordinary functions
Function, variable-initializer: Public ordinary functions
Function, walk: Public ordinary functions
Function, walk-part: Public ordinary functions
Function, walker: Public ordinary functions
Function, while-statement: Public ordinary functions
Function, whitespace: Public ordinary functions
Function, [: Public ordinary functions
Function, ]: Public ordinary functions
Function, ^: Public ordinary functions
Function, ^=: Public ordinary functions
Function, ^^: Public ordinary functions
Function, {: Public ordinary functions
Function, |: Public ordinary functions
Function, |=: Public ordinary functions
Function, ||: Public ordinary functions
Function, }: Public ordinary functions
function-declaration: Public ordinary functions
function-definition: Public ordinary functions
function-identifier-p: Public ordinary functions
function-prototype: Public ordinary functions

G
Generic Function, bindings: Private generic functions
Generic Function, root: Private generic functions
global-identifier-p: Public ordinary functions
greater-equal-than: Public ordinary functions
greater-than: Public ordinary functions

H
handle-declaration: Private ordinary functions
handle-function-definition: Private ordinary functions
handle-identifier: Private ordinary functions
hexadecimal-token: Public ordinary functions

I
identifier: Public ordinary functions
identifier-p: Public ordinary functions
identifier-token: Public ordinary functions
inclusive-or: Public ordinary functions
increment-modifier: Public ordinary functions
indent: Public ordinary functions
initializer: Public ordinary functions
instance-name: Public ordinary functions
integer-constant: Public ordinary functions
integer-token: Public ordinary functions
interface-declaration: Public ordinary functions
interpolation-qualifier: Public ordinary functions
invariant-qualifier: Public ordinary functions
inversion: Public ordinary functions
iteration-statement: Public ordinary functions

J
jump-statement: Public ordinary functions

K
keyword-p: Public ordinary functions
keyword-token: Public ordinary functions

L
layout-qualifier: Public ordinary functions
layout-qualifier-id: Public ordinary functions
left-shift: Public ordinary functions
less-equal-than: Public ordinary functions
less-than: Public ordinary functions
lex: Public ordinary functions
local-identifier-p: Public ordinary functions
logical-and: Public ordinary functions
logical-or: Public ordinary functions
logical-xor: Public ordinary functions

M
Macro, define-binary-op: Private macros
Macro, define-binary-op-walker: Public macros
Macro, define-empty-op-walker: Public macros
Macro, define-expr-binary: Private macros
Macro, define-object: Public macros
Macro, define-operator-objects: Private macros
Macro, define-reference: Public macros
Macro, define-rule: Public macros
Macro, define-serialization: Public macros
Macro, define-serializer: Public macros
Macro, define-sexpr-comparator: Private macros
Macro, define-sexpr-transform: Private macros
Macro, define-unary-op-walker: Public macros
Macro, define-walker: Public macros
Macro, define-walking-body: Public macros
Macro, with-glsl-syntax: Private macros
Macro, with-indentation: Public macros
Macro, with-token-input: Public macros
make-environment: Public ordinary functions
mapcar*: Private ordinary functions
matching-declarators-p: Public ordinary functions
matching-qualifiers-p: Public ordinary functions
matching-specifiers-p: Public ordinary functions
merge-plists: Private ordinary functions
merge-shader-sources: Public ordinary functions
merge-shaders: Public ordinary functions
Method, bindings: Private generic functions
Method, root: Private generic functions
modified-reference: Public ordinary functions
modulus: Public ordinary functions
multiple-expressions: Public ordinary functions
multiplication: Public ordinary functions

N
negation: Public ordinary functions
newline-p: Private ordinary functions
normalize-shader-source: Public ordinary functions
not-equal: Public ordinary functions

O
octal-token: Public ordinary functions
operator: Public ordinary functions

P
parameter-declaration: Public ordinary functions
parse: Public ordinary functions
peek: Public compiler macros
peek: Public ordinary functions
postfix-expression: Public ordinary functions
precise-qualifier: Public ordinary functions
precision-declaration: Public ordinary functions
precision-qualifier: Public ordinary functions
prefix-decrement: Public ordinary functions
prefix-increment: Public ordinary functions
preprocess: Public ordinary functions
preprocessor-directive: Public ordinary functions
preprocessor-p: Public ordinary functions
preprocessor-token: Public ordinary functions
primary-expression: Public ordinary functions

R
reference-modifier: Public ordinary functions
remove-rule: Public ordinary functions
remove-serializer: Public ordinary functions
remove-sexpr-transform: Private ordinary functions
remove-walker: Public ordinary functions
resolve-method-definitions: Private ordinary functions
return: Public ordinary functions
right-shift: Public ordinary functions
root: Private generic functions
root: Private generic functions
root-environment-p: Public ordinary functions
rule: Public ordinary functions

S
same-+: Public ordinary functions
selection-statement: Public ordinary functions
separate-qualifier-specifier: Private ordinary functions
serialize: Public ordinary functions
serialize-part: Public ordinary functions
serializer: Public ordinary functions
sexpr->glsl-ast: Private ordinary functions
sexpr-transform: Private ordinary functions
sformat: Public compiler macros
sformat: Public ordinary functions
shader: Public ordinary functions
simple-statement: Public ordinary functions
split-shader-into-groups: Private ordinary functions
starts-with: Private ordinary functions
statement: Public ordinary functions
statement-p: Public ordinary functions
storage-qualifier: Public ordinary functions
struct-declaration: Public ordinary functions
struct-declarator: Public ordinary functions
struct-field-declarator: Public ordinary functions
struct-specifier: Public ordinary functions
subroutine-qualifier: Public ordinary functions
subtraction: Public ordinary functions
switch-statement: Public ordinary functions
symbol->identifier: Private ordinary functions

T
token: Public ordinary functions
tokenize: Public ordinary functions
trace-parse: Public ordinary functions
trace-parse-func: Private ordinary functions
transform: Public ordinary functions
transform-to-core: Private ordinary functions
transform-to-gles: Private ordinary functions
type-name: Public ordinary functions
type-qualifier: Public ordinary functions
type-specifier: Public ordinary functions
type-specifier-nonarray: Public ordinary functions

U
unary-expression: Public ordinary functions
uniquify: Public ordinary functions
unlist: Private ordinary functions
untrace-parse: Public ordinary functions
untrace-parse-func: Private ordinary functions

V
variable-declaration: Public ordinary functions
variable-identifier-p: Public ordinary functions
variable-initializer: Public ordinary functions

W
walk: Public ordinary functions
walk-part: Public ordinary functions
walker: Public ordinary functions
while-statement: Public ordinary functions
whitespace: Public ordinary functions
with-glsl-syntax: Private macros
with-indentation: Public macros
with-token-input: Public macros


A.3 Variables

Jump to:   *  
B   N   R   S  
Index Entry  Section

*
*glsl-keyword-symbols*: Public special variables
*glsl-keywords*: Public special variables
*indent*: Private special variables
*max-index*: Private special variables
*serialize-stream*: Private special variables
*serializers*: Private special variables
*sexpr-transforms*: Private special variables
*token-array*: Private special variables
*token-index*: Private special variables
*trace-level*: Private special variables
*traced*: Private special variables
*unique-counter*: Private special variables
*walkers*: Private special variables

B
bindings: Public classes

N
no-value: Public symbol macros

R
root: Public classes

S
Slot, bindings: Public classes
Slot, root: Public classes
Special Variable, *glsl-keyword-symbols*: Public special variables
Special Variable, *glsl-keywords*: Public special variables
Special Variable, *indent*: Private special variables
Special Variable, *max-index*: Private special variables
Special Variable, *serialize-stream*: Private special variables
Special Variable, *serializers*: Private special variables
Special Variable, *sexpr-transforms*: Private special variables
Special Variable, *token-array*: Private special variables
Special Variable, *token-index*: Private special variables
Special Variable, *trace-level*: Private special variables
Special Variable, *traced*: Private special variables
Special Variable, *unique-counter*: Private special variables
Special Variable, *walkers*: Private special variables
Symbol Macro, no-value: Public symbol macros


A.4 Data types

Jump to:   C   D   E   F   G   I   M   P   S   T   W  
Index Entry  Section

C
Class, environment: Public classes

D
documentation.lisp: The glsl-toolkit/documentation․lisp file

E
environment: Public classes

F
File, documentation.lisp: The glsl-toolkit/documentation․lisp file
File, glsl-toolkit.asd: The glsl-toolkit/glsl-toolkit․asd file
File, grammar.lisp: The glsl-toolkit/grammar․lisp file
File, merge.lisp: The glsl-toolkit/merge․lisp file
File, method-combination.lisp: The glsl-toolkit/method-combination․lisp file
File, package.lisp: The glsl-toolkit/package․lisp file
File, parser.lisp: The glsl-toolkit/parser․lisp file
File, printer.lisp: The glsl-toolkit/printer․lisp file
File, sexpr.lisp: The glsl-toolkit/sexpr․lisp file
File, toolkit.lisp: The glsl-toolkit/toolkit․lisp file
File, transform.lisp: The glsl-toolkit/transform․lisp file
File, walker.lisp: The glsl-toolkit/walker․lisp file

G
glsl-parser-rules: The glsl-parser-rules package
glsl-toolkit: The glsl-toolkit system
glsl-toolkit: The glsl-toolkit package
glsl-toolkit.asd: The glsl-toolkit/glsl-toolkit․asd file
grammar.lisp: The glsl-toolkit/grammar․lisp file

I
index: Private types

M
merge.lisp: The glsl-toolkit/merge․lisp file
method-combination.lisp: The glsl-toolkit/method-combination․lisp file

P
Package, glsl-parser-rules: The glsl-parser-rules package
Package, glsl-toolkit: The glsl-toolkit package
package.lisp: The glsl-toolkit/package․lisp file
parser.lisp: The glsl-toolkit/parser․lisp file
printer.lisp: The glsl-toolkit/printer․lisp file

S
sexpr.lisp: The glsl-toolkit/sexpr․lisp file
System, glsl-toolkit: The glsl-toolkit system

T
toolkit.lisp: The glsl-toolkit/toolkit․lisp file
transform.lisp: The glsl-toolkit/transform․lisp file
Type, index: Private types

W
walker.lisp: The glsl-toolkit/walker․lisp file