The npg Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The npg Reference Manual

This is the npg Reference Manual, generated automatically by Declt version 2.3 "Robert April" on Tue Jan 09 15:24:49 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction


		     NPG a Naive Parser Generator
			   for Common Lisp

	 Copyright (C) 2003-2006, 2010 by Walter C. Pelissero

This library is  free software; you can redistribute  it and/or modify
it  under  the terms  of  the GNU  Lesser  General  Public License  as
published by the  Free Software Foundation; either version  2.1 of the
License,  or (at  your option)  any  later version.   This library  is
distributed  in the  hope  that it  will  be useful,  but WITHOUT  ANY
WARRANTY;  without even  the  implied warranty  of MERCHANTABILITY  or
FITNESS FOR A  PARTICULAR PURPOSE.  See the GNU  Lesser General Public
License for more details.  You should  have received a copy of the GNU
Lesser General Public  License along with this library;  if not, write
to the  Free Software  Foundation, Inc., 59  Temple Place,  Suite 330,
Boston, MA 02111-1307 USA


This library generates on the fly (no external representation of the
parser is produced) a recursive descent parser based on the grammar
rules you have fed it with.  The parser object can then be used to
scan tokenised input.  Although a facility to produce a lexical
analiser is not provided, to write such a library is fairly easy for
most languages.  NPG parsers require your lexer to adhere to a certain
protocol to be able to communicate with them.  Examples are provided
that explain these requirements.

While quite possibly not producing the fastest parsers in town, it's
fairly simple and hopefully easy to debug.  It accepts a lispy EBNF
grammar description of arbitrary complexity with the exception of
mutually left recursive rules (watch out, they produce undetected
infinite recursion) and produces a backtracking recursive descent
parser.  Immediate left recursive rules are properly simplified,
though.

Multiple concurrent parsers are supported.

To compile, an ASDF file is provided.

See the examples directory for clues on how to use it.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

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


Previous: , Up: Systems   [Contents][Index]

2.1 npg

Maintainer

Walter C. Pelissero <walter@pelissero.de>

Author

Walter C. Pelissero <walter@pelissero.de>

License

Lesser General Public License

Description

NPG a Naive Parser Generator

Long Description

NPG is a backtracking recursive descent parser generator for Common Lisp. It accepts rules in a Lispy EBNF syntax without indirect left recursive rules.

Source

npg.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Next: , Previous: , Up: Modules   [Contents][Index]

3.1 npg/examples

Parent

npg (system)

Location

examples/

Components

Previous: , Up: Modules   [Contents][Index]

3.2 npg/src

Parent

npg (system)

Location

src/

Components

Next: , Previous: , Up: Top   [Contents][Index]

4 Files

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


Next: , Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 npg.asd

Location

npg.asd

Systems

npg (system)

Packages

npg-system

Internal Definitions

sample-file (class)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.2 npg/src/package.lisp

Parent

src (module)

Location

src/package.lisp

Packages

naive-parser-generator


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.3 npg/src/common.lisp

Dependency

package.lisp (file)

Parent

src (module)

Location

src/common.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.4 npg/src/define.lisp

Dependencies
Parent

src (module)

Location

src/define.lisp

Exported Definitions
Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

4.1.5 npg/src/parser.lisp

Dependencies
Parent

src (module)

Location

src/parser.lisp

Exported Definitions
Internal Definitions

Previous: , Up: Files   [Contents][Index]

4.2 Doc


Next: , Previous: , Up: Doc files   [Contents][Index]

4.2.1 npg/README

Parent

npg (system)

Location

README


Next: , Previous: , Up: Doc files   [Contents][Index]

4.2.2 npg/COPYING

Parent

npg (system)

Location

COPYING


Next: , Previous: , Up: Doc files   [Contents][Index]

4.2.3 npg/.project

Parent

npg (system)

Location

.project


Next: , Previous: , Up: Doc files   [Contents][Index]

4.2.4 npg/examples/python

Parent

examples (module)

Location

examples/python.lisp


Previous: , Up: Doc files   [Contents][Index]

4.2.5 npg/examples/vs-cobol-ii

Parent

examples (module)

Location

examples/vs-cobol-ii.lisp


Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

5.1 npg-system

Source

npg.asd

Use List
Internal Definitions

sample-file (class)


Previous: , Up: Packages   [Contents][Index]

5.2 naive-parser-generator

Source

package.lisp (file)

Nickname

npg

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

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


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Macros

Macro: defrule NAME &rest PRODUCTIONS

Wrapper macro for DEFINE-RULE.

Package

naive-parser-generator

Source

define.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.2 Functions

Function: generate-grammar &optional EQUAL-P

Return a GRAMMAR structure suitable for the PARSE function, using the current rules. EQUAL-P, if present, is a function to be used to match the input tokens; it defaults to STRING-EQUAL.

Package

naive-parser-generator

Source

define.lisp (file)

Function: grammar-keyword-p KEYWORD GRAMMAR

Check if KEYWORD is part of this grammar.

Package

naive-parser-generator

Source

parser.lisp (file)

Function: make-token &key (TYPE TYPE) (VALUE VALUE) (POSITION POSITION)
Package

naive-parser-generator

Source

common.lisp (file)

Function: parse GRAMMAR START TOKENIZER

Match a GRAMMAR against the list of input tokens coming from TOKENIZER. Return the reduced values according to the nonterminal actions. Raise an error on failure.

Package

naive-parser-generator

Source

parser.lisp (file)

Function: print-grammar-figures GRAMMAR &optional STREAM
Package

naive-parser-generator

Source

parser.lisp (file)

Function: reset-grammar ()

Empty the current grammar from any existing rule.

Package

naive-parser-generator

Source

define.lisp (file)

Function: token-position INSTANCE
Function: (setf token-position) VALUE INSTANCE
Package

naive-parser-generator

Source

common.lisp (file)

Function: token-type INSTANCE
Function: (setf token-type) VALUE INSTANCE
Package

naive-parser-generator

Source

common.lisp (file)

Function: token-value INSTANCE
Function: (setf token-value) VALUE INSTANCE
Package

naive-parser-generator

Source

common.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.3 Generic functions

Generic Function: later-position POS1 POS2

Compare two file postions and return true if POS1 is later than POS2 in the input stream.

Package

naive-parser-generator

Source

parser.lisp (file)

Methods
Method: later-position POS1 POS2
Method: later-position (POS1 integer) (POS2 integer)
Generic Function: read-next-tokens TOKENS-SOURCE

Read next token from a lexical analysed stream. The nature of TOKENS-SOURCE is implementation dependent and any lexical analyzer is supposed to specialise this method.

Package

naive-parser-generator

Source

parser.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

6.1.4 Structures

Structure: grammar ()
Package

naive-parser-generator

Source

common.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

terminals-in-grammar (method)

Direct slots
Slot: rules
Readers

grammar-rules (function)

Writers

(setf grammar-rules) (function)

Slot: keywords
Readers

grammar-keywords (function)

Writers

(setf grammar-keywords) (function)

Slot: equal-p
Readers

grammar-equal-p (function)

Writers

(setf grammar-equal-p) (function)


Previous: , Up: Definitions   [Contents][Index]

6.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Special variables

Special Variable: *debug*

Either nil or a stream where to write the debug informations.

Package

naive-parser-generator

Source

parser.lisp (file)

Special Variable: *grammars*
Package

naive-parser-generator

Source

parser.lisp (file)

Special Variable: *keywords*
Package

naive-parser-generator

Source

define.lisp (file)

Special Variable: *rules*
Package

naive-parser-generator

Source

define.lisp (file)

Special Variable: *smart-default-reduction*

If true the default reductions take only the non-static tokens - those that are not declared as strings in the grammar.

Package

naive-parser-generator

Source

define.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.2 Functions

Function: add-grammar NAME GRAMMAR
Package

naive-parser-generator

Source

parser.lisp (file)

Function: add-keyword KEYWORD KEYWORDS
Package

naive-parser-generator

Source

common.lisp (file)

Function: add-rule RULE-NAME RULE RULES
Package

naive-parser-generator

Source

common.lisp (file)

Function: const-terminal-p OBJECT
Package

naive-parser-generator

Source

define.lisp (file)

Function: copy-grammar INSTANCE
Package

naive-parser-generator

Source

common.lisp (file)

Function: copy-production INSTANCE
Package

naive-parser-generator

Source

common.lisp (file)

Function: copy-rule INSTANCE
Package

naive-parser-generator

Source

common.lisp (file)

Function: copy-token INSTANCE
Package

naive-parser-generator

Source

common.lisp (file)

Function: create-rule NAME PRODUCTION-DESCRIPTIONS

Return a new rule object together with a list of keywords making up the production definitions.

Package

naive-parser-generator

Source

define.lisp (file)

Function: define-rule NAME PRODUCTIONS

Accept a rule in EBNF-like syntax, translate it into a sexp and a call to INSERT-RULE-IN-CURRENT-GRAMMAR.

Package

naive-parser-generator

Source

define.lisp (file)

Function: delete-grammar NAME
Package

naive-parser-generator

Source

parser.lisp (file)

Function: ebnf-to-sebnf TOKENS

Take a production as a list of TOKENS and expand it. This turns a EBNF syntax into a sexp-based EBNF syntax or SEBNF.

Package

naive-parser-generator

Source

define.lisp (file)

Function: expand-production-token TOK

Translate token of the type NAME? or NAME* or NAME+ into (? NAME) or (* NAME) or (+ NAME). This is used by the DEFRULE macro.

Package

naive-parser-generator

Source

define.lisp (file)

Function: find-grammar NAME
Package

naive-parser-generator

Source

parser.lisp (file)

Function: find-keyword KEYWORD-NAME KEYWORDS
Package

naive-parser-generator

Source

common.lisp (file)

Function: find-rule RULE-NAME RULES
Package

naive-parser-generator

Source

common.lisp (file)

Function: grammar-equal-p INSTANCE
Function: (setf grammar-equal-p) VALUE INSTANCE
Package

naive-parser-generator

Source

common.lisp (file)

Function: grammar-keywords INSTANCE
Function: (setf grammar-keywords) VALUE INSTANCE
Package

naive-parser-generator

Source

common.lisp (file)

Function: grammar-p OBJECT
Package

naive-parser-generator

Source

common.lisp (file)

Function: grammar-rules INSTANCE
Function: (setf grammar-rules) VALUE INSTANCE
Package

naive-parser-generator

Source

common.lisp (file)

Function: insert-rule-in-current-grammar NAME PRODUCTIONS

Add rule to the current grammar and its keywords to the keywords hash table. You don’t want to use this directly. See DEFRULE macro instead.

Package

naive-parser-generator

Source

define.lisp (file)

Function: make-action-arguments TOKENS

Given a list of tokens making up a production, return three values: the list of variables for the function reducing this production, those that are non static and their unambiguous user-friendly names.

Package

naive-parser-generator

Source

define.lisp (file)

Function: make-action-function NAME TOKENS ACTION

Create a function with name NAME, arguments derived from TOKENS and body ACTION. Return it’s definition.

Package

naive-parser-generator

Source

define.lisp (file)

Function: make-alternative-rule TOKENS

Make a rule for a list of alternatives ("or" syntax) and return it.

Package

naive-parser-generator

Source

define.lisp (file)

Function: make-default-action-function NAME TOKENS

Create a sexp to be used as default action in case one is not supplied in the production. This is usually a quite sensible one. That is, only the non-constant tokens are returned in a list and in case only a variable token is available that one is returned (not included in a list). If all the tokens are constant, then all of them are returned in a list.

Package

naive-parser-generator

Source

define.lisp (file)

Function: make-grammar &key (RULES RULES) (KEYWORDS KEYWORDS) (EQUAL-P EQUAL-P)
Package

naive-parser-generator

Source

common.lisp (file)

Function: make-keywords-table ()
Package

naive-parser-generator

Source

common.lisp (file)

Function: make-list-rule TOKEN &optional SEPARATOR

Make a rule for a possibly empty list (* syntax) return it.

Package

naive-parser-generator

Source

define.lisp (file)

Function: make-nonempty-list-rule TOKEN &optional SEPARATOR

Make a rule for a non-empty list (+ syntax) and return it.

Package

naive-parser-generator

Source

define.lisp (file)

Function: make-optional-rule TOKEN

Make a rule for a possibly missing (non)terminal (? syntax) and return it.

Package

naive-parser-generator

Source

define.lisp (file)

Function: make-production &key (TOKENS TOKENS) (TOKENS-LENGTH TOKENS-LENGTH) (ACTION ACTION)
Package

naive-parser-generator

Source

common.lisp (file)

Function: make-production-from-descr NAME PRODUCTION-DESCRIPTION

Take a production NAME and its description in the form of a sexp and return a production structure object together with a list of used keywords.

Package

naive-parser-generator

Source

define.lisp (file)

Function: make-rule &key (NAME NAME) (PRODUCTIONS PRODUCTIONS)
Package

naive-parser-generator

Source

common.lisp (file)

Function: make-rule-productions RULE-NAME PRODUCTION-DESCRIPTIONS

Return a production object that belongs to RULE-NAME made according to PRODUCTION-DESCRIPTIONS. See also MAKE-PRODUCTION-FROM-DESCR.

Package

naive-parser-generator

Source

define.lisp (file)

Function: make-rules-table ()
Package

naive-parser-generator

Source

common.lisp (file)

Function: prod-action INSTANCE
Function: (setf prod-action) VALUE INSTANCE
Package

naive-parser-generator

Source

common.lisp (file)

Function: prod-tokens INSTANCE
Function: (setf prod-tokens) VALUE INSTANCE
Package

naive-parser-generator

Source

common.lisp (file)

Function: prod-tokens-length INSTANCE
Function: (setf prod-tokens-length) VALUE INSTANCE
Package

naive-parser-generator

Source

common.lisp (file)

Function: production-p OBJECT
Package

naive-parser-generator

Source

common.lisp (file)

Function: reduce-production PRODUCTION ARGUMENTS

Apply PRODUCTION’s action on ARGUMENTS. This has the effect of "reducing" the production.

Package

naive-parser-generator

Source

parser.lisp (file)

Function: remove-immediate-left-recursivity RULE

Turn left recursive rules of the type A -> A x | y
into
A -> y A2
A2 -> x A2 | E
where E is the empty production.

Package

naive-parser-generator

Source

define.lisp (file)

Function: remove-left-recursivity-from-rules RULES
Package

naive-parser-generator

Source

define.lisp (file)

Function: resolve-all-nonterminals RULES
Package

naive-parser-generator

Source

define.lisp (file)

Function: resolve-nonterminals TOKENS RULES

Given a list of production tokens, try to expand the nonterminal ones with their respective rule from the the RULES pool.

Package

naive-parser-generator

Source

define.lisp (file)

Function: rule-name INSTANCE
Function: (setf rule-name) VALUE INSTANCE
Package

naive-parser-generator

Source

common.lisp (file)

Function: rule-p OBJECT
Package

naive-parser-generator

Source

common.lisp (file)

Function: rule-productions INSTANCE
Function: (setf rule-productions) VALUE INSTANCE
Package

naive-parser-generator

Source

common.lisp (file)

Function: sebnf-to-bnf TOKENS

Take a production in SEBNF (Symbolic Extended BNF) syntax and turn it into BNF. The production is simplified but the current grammar is populated with additional rules.

Package

naive-parser-generator

Source

define.lisp (file)

Function: token-p OBJECT
Package

naive-parser-generator

Source

common.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.3 Generic functions

Generic Function: terminals-in-grammar GRAMMAR-OR-HASHTABLE

Find non constant terminal symbols in GRAMMAR.

Package

naive-parser-generator

Source

parser.lisp (file)

Methods
Method: terminals-in-grammar (GRAMMAR grammar)
Method: terminals-in-grammar (GRAMMAR hash-table)

Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.4 Structures

Structure: production ()
Package

naive-parser-generator

Source

common.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

print-object (method)

Direct slots
Slot: tokens
Readers

prod-tokens (function)

Writers

(setf prod-tokens) (function)

Slot: tokens-length
Type

fixnum

Initform

0

Readers

prod-tokens-length (function)

Writers

(setf prod-tokens-length) (function)

Slot: action
Readers

prod-action (function)

Writers

(setf prod-action) (function)

Structure: rule ()
Package

naive-parser-generator

Source

common.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

print-object (method)

Direct slots
Slot: name
Readers

rule-name (function)

Writers

(setf rule-name) (function)

Slot: productions
Readers

rule-productions (function)

Writers

(setf rule-productions) (function)

Structure: token ()
Package

naive-parser-generator

Source

common.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

print-object (method)

Direct slots
Slot: type
Readers

token-type (function)

Writers

(setf token-type) (function)

Slot: value
Readers

token-value (function)

Writers

(setf token-value) (function)

Slot: position
Readers

token-position (function)

Writers

(setf token-position) (function)


Previous: , Up: Internal definitions   [Contents][Index]

6.2.5 Classes

Class: sample-file ()
Package

npg-system

Source

npg.asd

Direct superclasses

doc-file (class)

Direct methods

source-file-type (method)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   D   F   L   M   N  
Index Entry  Section

D
Doc File, npg/.project: The npg/<dot>project file
Doc File, npg/COPYING: The npg/copying file
Doc File, npg/examples/python: The npg/examples/python file
Doc File, npg/examples/vs-cobol-ii: The npg/examples/vs-cobol-ii file
Doc File, npg/README: The npg/readme file

F
File, doc, npg/.project: The npg/<dot>project file
File, doc, npg/COPYING: The npg/copying file
File, doc, npg/examples/python: The npg/examples/python file
File, doc, npg/examples/vs-cobol-ii: The npg/examples/vs-cobol-ii file
File, doc, npg/README: The npg/readme file
File, Lisp, npg.asd: The npg<dot>asd file
File, Lisp, npg/src/common.lisp: The npg/src/common<dot>lisp file
File, Lisp, npg/src/define.lisp: The npg/src/define<dot>lisp file
File, Lisp, npg/src/package.lisp: The npg/src/package<dot>lisp file
File, Lisp, npg/src/parser.lisp: The npg/src/parser<dot>lisp file

L
Lisp File, npg.asd: The npg<dot>asd file
Lisp File, npg/src/common.lisp: The npg/src/common<dot>lisp file
Lisp File, npg/src/define.lisp: The npg/src/define<dot>lisp file
Lisp File, npg/src/package.lisp: The npg/src/package<dot>lisp file
Lisp File, npg/src/parser.lisp: The npg/src/parser<dot>lisp file

M
Module, npg/examples: The npg/examples module
Module, npg/src: The npg/src module

N
npg.asd: The npg<dot>asd file
npg/.project: The npg/<dot>project file
npg/COPYING: The npg/copying file
npg/examples: The npg/examples module
npg/examples/python: The npg/examples/python file
npg/examples/vs-cobol-ii: The npg/examples/vs-cobol-ii file
npg/README: The npg/readme file
npg/src: The npg/src module
npg/src/common.lisp: The npg/src/common<dot>lisp file
npg/src/define.lisp: The npg/src/define<dot>lisp file
npg/src/package.lisp: The npg/src/package<dot>lisp file
npg/src/parser.lisp: The npg/src/parser<dot>lisp file

Jump to:   D   F   L   M   N  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
A   C   D   E   F   G   I   L   M   P   R   S   T  
Index Entry  Section

(
(setf grammar-equal-p): Internal functions
(setf grammar-keywords): Internal functions
(setf grammar-rules): Internal functions
(setf prod-action): Internal functions
(setf prod-tokens): Internal functions
(setf prod-tokens-length): Internal functions
(setf rule-name): Internal functions
(setf rule-productions): Internal functions
(setf token-position): Exported functions
(setf token-type): Exported functions
(setf token-value): Exported functions

A
add-grammar: Internal functions
add-keyword: Internal functions
add-rule: Internal functions

C
const-terminal-p: Internal functions
copy-grammar: Internal functions
copy-production: Internal functions
copy-rule: Internal functions
copy-token: Internal functions
create-rule: Internal functions

D
define-rule: Internal functions
defrule: Exported macros
delete-grammar: Internal functions

E
ebnf-to-sebnf: Internal functions
expand-production-token: Internal functions

F
find-grammar: Internal functions
find-keyword: Internal functions
find-rule: Internal functions
Function, (setf grammar-equal-p): Internal functions
Function, (setf grammar-keywords): Internal functions
Function, (setf grammar-rules): Internal functions
Function, (setf prod-action): Internal functions
Function, (setf prod-tokens): Internal functions
Function, (setf prod-tokens-length): Internal functions
Function, (setf rule-name): Internal functions
Function, (setf rule-productions): Internal functions
Function, (setf token-position): Exported functions
Function, (setf token-type): Exported functions
Function, (setf token-value): Exported functions
Function, add-grammar: Internal functions
Function, add-keyword: Internal functions
Function, add-rule: Internal functions
Function, const-terminal-p: Internal functions
Function, copy-grammar: Internal functions
Function, copy-production: Internal functions
Function, copy-rule: Internal functions
Function, copy-token: Internal functions
Function, create-rule: Internal functions
Function, define-rule: Internal functions
Function, delete-grammar: Internal functions
Function, ebnf-to-sebnf: Internal functions
Function, expand-production-token: Internal functions
Function, find-grammar: Internal functions
Function, find-keyword: Internal functions
Function, find-rule: Internal functions
Function, generate-grammar: Exported functions
Function, grammar-equal-p: Internal functions
Function, grammar-keyword-p: Exported functions
Function, grammar-keywords: Internal functions
Function, grammar-p: Internal functions
Function, grammar-rules: Internal functions
Function, insert-rule-in-current-grammar: Internal functions
Function, make-action-arguments: Internal functions
Function, make-action-function: Internal functions
Function, make-alternative-rule: Internal functions
Function, make-default-action-function: Internal functions
Function, make-grammar: Internal functions
Function, make-keywords-table: Internal functions
Function, make-list-rule: Internal functions
Function, make-nonempty-list-rule: Internal functions
Function, make-optional-rule: Internal functions
Function, make-production: Internal functions
Function, make-production-from-descr: Internal functions
Function, make-rule: Internal functions
Function, make-rule-productions: Internal functions
Function, make-rules-table: Internal functions
Function, make-token: Exported functions
Function, parse: Exported functions
Function, print-grammar-figures: Exported functions
Function, prod-action: Internal functions
Function, prod-tokens: Internal functions
Function, prod-tokens-length: Internal functions
Function, production-p: Internal functions
Function, reduce-production: Internal functions
Function, remove-immediate-left-recursivity: Internal functions
Function, remove-left-recursivity-from-rules: Internal functions
Function, reset-grammar: Exported functions
Function, resolve-all-nonterminals: Internal functions
Function, resolve-nonterminals: Internal functions
Function, rule-name: Internal functions
Function, rule-p: Internal functions
Function, rule-productions: Internal functions
Function, sebnf-to-bnf: Internal functions
Function, token-p: Internal functions
Function, token-position: Exported functions
Function, token-type: Exported functions
Function, token-value: Exported functions

G
generate-grammar: Exported functions
Generic Function, later-position: Exported generic functions
Generic Function, read-next-tokens: Exported generic functions
Generic Function, terminals-in-grammar: Internal generic functions
grammar-equal-p: Internal functions
grammar-keyword-p: Exported functions
grammar-keywords: Internal functions
grammar-p: Internal functions
grammar-rules: Internal functions

I
insert-rule-in-current-grammar: Internal functions

L
later-position: Exported generic functions
later-position: Exported generic functions
later-position: Exported generic functions

M
Macro, defrule: Exported macros
make-action-arguments: Internal functions
make-action-function: Internal functions
make-alternative-rule: Internal functions
make-default-action-function: Internal functions
make-grammar: Internal functions
make-keywords-table: Internal functions
make-list-rule: Internal functions
make-nonempty-list-rule: Internal functions
make-optional-rule: Internal functions
make-production: Internal functions
make-production-from-descr: Internal functions
make-rule: Internal functions
make-rule-productions: Internal functions
make-rules-table: Internal functions
make-token: Exported functions
Method, later-position: Exported generic functions
Method, later-position: Exported generic functions
Method, terminals-in-grammar: Internal generic functions
Method, terminals-in-grammar: Internal generic functions

P
parse: Exported functions
print-grammar-figures: Exported functions
prod-action: Internal functions
prod-tokens: Internal functions
prod-tokens-length: Internal functions
production-p: Internal functions

R
read-next-tokens: Exported generic functions
reduce-production: Internal functions
remove-immediate-left-recursivity: Internal functions
remove-left-recursivity-from-rules: Internal functions
reset-grammar: Exported functions
resolve-all-nonterminals: Internal functions
resolve-nonterminals: Internal functions
rule-name: Internal functions
rule-p: Internal functions
rule-productions: Internal functions

S
sebnf-to-bnf: Internal functions

T
terminals-in-grammar: Internal generic functions
terminals-in-grammar: Internal generic functions
terminals-in-grammar: Internal generic functions
token-p: Internal functions
token-position: Exported functions
token-type: Exported functions
token-value: Exported functions

Jump to:   (  
A   C   D   E   F   G   I   L   M   P   R   S   T  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
A   E   K   N   P   R   S   T   V  
Index Entry  Section

*
*debug*: Internal special variables
*grammars*: Internal special variables
*keywords*: Internal special variables
*rules*: Internal special variables
*smart-default-reduction*: Internal special variables

A
action: Internal structures

E
equal-p: Exported structures

K
keywords: Exported structures

N
name: Internal structures

P
position: Internal structures
productions: Internal structures

R
rules: Exported structures

S
Slot, action: Internal structures
Slot, equal-p: Exported structures
Slot, keywords: Exported structures
Slot, name: Internal structures
Slot, position: Internal structures
Slot, productions: Internal structures
Slot, rules: Exported structures
Slot, tokens: Internal structures
Slot, tokens-length: Internal structures
Slot, type: Internal structures
Slot, value: Internal structures
Special Variable, *debug*: Internal special variables
Special Variable, *grammars*: Internal special variables
Special Variable, *keywords*: Internal special variables
Special Variable, *rules*: Internal special variables
Special Variable, *smart-default-reduction*: Internal special variables

T
tokens: Internal structures
tokens-length: Internal structures
type: Internal structures

V
value: Internal structures

Jump to:   *  
A   E   K   N   P   R   S   T   V  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   G   N   P   R   S   T  
Index Entry  Section

C
Class, sample-file: Internal classes

G
grammar: Exported structures

N
naive-parser-generator: The naive-parser-generator package
npg: The npg system
npg-system: The npg-system package

P
Package, naive-parser-generator: The naive-parser-generator package
Package, npg-system: The npg-system package
production: Internal structures

R
rule: Internal structures

S
sample-file: Internal classes
Structure, grammar: Exported structures
Structure, production: Internal structures
Structure, rule: Internal structures
Structure, token: Internal structures
System, npg: The npg system

T
token: Internal structures

Jump to:   C   G   N   P   R   S   T