The jwacs Reference Manual

This is the jwacs Reference Manual, version 0.3, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 06:32:38 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 jwacs

Javascript With Advanced Continuation Support

Author

James Wright <>

License

MIT License <http://www.opensource.org/licenses/mit-license.php>

Version

0.3

Dependency

cl-ppcre (system).

Source

jwacs.asd.

Child Components

3 Modules

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


3.1 jwacs/external

Source

jwacs.asd.

Parent Component

jwacs (system).

Child Component

yacc.lisp (file).


4 Files

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


4.1 Lisp


4.1.1 jwacs/jwacs.asd

Source

jwacs.asd.

Parent Component

jwacs (system).

ASDF Systems

jwacs.

Packages

jwacs-system.

Internals

4.1.2 jwacs/external/yacc.lisp

Source

jwacs.asd.

Parent Component

external (module).

Packages

yacc.

Public Interface
Internals

4.1.3 jwacs/package.lisp

Dependency

default-iframe.html (file).

Source

jwacs.asd.

Parent Component

jwacs (system).

Packages

jwacs.


4.1.4 jwacs/general-utilities.lisp

Dependency

package.lisp (file).

Source

jwacs.asd.

Parent Component

jwacs (system).

Internals

4.1.5 jwacs/conditions.lisp

Dependency

general-utilities.lisp (file).

Source

jwacs.asd.

Parent Component

jwacs (system).

Public Interface
Internals

4.1.6 jwacs/lexer-macros.lisp

Dependency

conditions.lisp (file).

Source

jwacs.asd.

Parent Component

jwacs (system).

Internals

4.1.7 jwacs/lex-javascript.lisp

Dependency

lexer-macros.lisp (file).

Source

jwacs.asd.

Parent Component

jwacs (system).

Public Interface

make-load-form (method).

Internals

4.1.8 jwacs/js-source-model.lisp

Dependency

lex-javascript.lisp (file).

Source

jwacs.asd.

Parent Component

jwacs (system).

Public Interface
Internals

4.1.9 jwacs/parse-javascript-yacc.lisp

Dependency

js-source-model.lisp (file).

Source

jwacs.asd.

Parent Component

jwacs (system).

Internals

4.1.10 jwacs/parse-javascript.lisp

Dependency

parse-javascript-yacc.lisp (file).

Source

jwacs.asd.

Parent Component

jwacs (system).

Public Interface

parse (function).

Internals

4.1.11 jwacs/pretty-print.lisp

Dependency

parse-javascript.lisp (file).

Source

jwacs.asd.

Parent Component

jwacs (system).

Internals

4.1.12 jwacs/source-transformations.lisp

Dependency

pretty-print.lisp (file).

Source

jwacs.asd.

Parent Component

jwacs (system).

Internals

4.1.13 jwacs/shift-decls-transformation.lisp

Dependency

source-transformations.lisp (file).

Source

jwacs.asd.

Parent Component

jwacs (system).

Internals

4.1.14 jwacs/ugly-print.lisp

Dependency

shift-decls-transformation.lisp (file).

Source

jwacs.asd.

Parent Component

jwacs (system).

Internals

4.1.15 jwacs/static-analysis.lisp

Dependency

ugly-print.lisp (file).

Source

jwacs.asd.

Parent Component

jwacs (system).

Internals

4.1.16 jwacs/type-analysis.lisp

Dependency

static-analysis.lisp (file).

Source

jwacs.asd.

Parent Component

jwacs (system).

Internals

4.1.17 jwacs/explicitize-transformation.lisp

Dependency

type-analysis.lisp (file).

Source

jwacs.asd.

Parent Component

jwacs (system).

Internals

4.1.18 jwacs/shadow-values-transformation.lisp

Dependency

explicitize-transformation.lisp (file).

Source

jwacs.asd.

Parent Component

jwacs (system).

Internals

4.1.19 jwacs/cps-transformation.lisp

Dependency

shadow-values-transformation.lisp (file).

Source

jwacs.asd.

Parent Component

jwacs (system).

Internals

4.1.20 jwacs/loop-transformation.lisp

Dependency

cps-transformation.lisp (file).

Source

jwacs.asd.

Parent Component

jwacs (system).

Internals

4.1.21 jwacs/trampoline-transformation.lisp

Dependency

loop-transformation.lisp (file).

Source

jwacs.asd.

Parent Component

jwacs (system).

Internals

4.1.22 jwacs/runtime-transformation.lisp

Dependency

trampoline-transformation.lisp (file).

Source

jwacs.asd.

Parent Component

jwacs (system).

Internals

4.1.23 jwacs/compiler.lisp

Dependency

runtime-transformation.lisp (file).

Source

jwacs.asd.

Parent Component

jwacs (system).

Public Interface
Internals

4.1.24 jwacs/main.lisp

Dependency

compiler.lisp (file).

Source

jwacs.asd.

Parent Component

jwacs (system).

Public Interface

main (function).

Internals

4.2 HTML


4.2.1 jwacs/default-template.html

Dependency

jw-debug-runtime.js (file).

Source

jwacs.asd.

Parent Component

jwacs (system).


4.2.2 jwacs/default-iframe.html

Dependency

default-template.html (file).

Source

jwacs.asd.

Parent Component

jwacs (system).


4.3 Static


4.3.1 jwacs/jw-runtime.js

Dependency

external (module).

Source

jwacs.asd.

Parent Component

jwacs (system).


4.3.2 jwacs/jw-debug-runtime.js

Dependency

jw-runtime.js (file).

Source

jwacs.asd.

Parent Component

jwacs (system).


5 Packages

Packages are listed by definition order.


5.1 jwacs-system

Source

jwacs.asd.

Nickname

jw-system

Use List
  • asdf/interface.
  • common-lisp.
Internals

5.2 yacc

Source

yacc.lisp.

Use List

common-lisp.

Public Interface
Internals

5.3 jwacs

Source

package.lisp.

Nickname

jw

Use List
  • cl-ppcre.
  • common-lisp.
Public Interface
Internals

6 Definitions

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


6.1 Public Interface


6.1.1 Macros

Macro: define-grammar (name &body body)

DEFINE-GRAMMAR NAME OPTION... PRODUCTION...
PRODUCTION ::= (SYMBOL RHS...)
RHS ::= SYMBOL | (SYMBOL... [ACTION])
Defines the special variable NAME to be a grammar. Options are as in MAKE-GRAMMAR.

Package

yacc.

Source

yacc.lisp.

Macro: define-parser (name &body body)

DEFINE-GRAMMAR NAME OPTION... PRODUCTION...
PRODUCTION ::= (SYMBOL RHS...)
RHS ::= SYMBOL | (SYMBOL... [ACTION])
Defines the special variable NAME to be a parser. Options are as in MAKE-GRAMMAR and MAKE-PARSER.

Package

yacc.

Source

yacc.lisp.


6.1.2 Ordinary functions

Function: build-app (main-module-path &key debug-mode compress-mode combine-mode template-uripath output-uripath prefix-lookup runtime-uripath inline-output-stream inline-main-text)

Build a wrapper html file for a jwacs application. COMBINE-MODE is forced to T if an INLINE-OUTPUT-STREAM is provided.

Package

jwacs.

Source

compiler.lisp.

Function: main ()

This is the main entry-point for the jwacs binary.

Package

jwacs.

Source

main.lisp.

Function: make-grammar (&key name start-symbol terminals precedence productions)
Package

yacc.

Source

yacc.lisp.

Function: make-parser (grammar &key discard-memos muffle-conflicts print-derives-epsilon print-first-terminals print-states print-goto-graph print-lookaheads)

Combines COMPUTE-ALL-LOOKAHEADS and COMPUTE-PARSING-TABLES. MUFFLE-WARNINGS is one of NIL, T, :SOME or a list of the form (sr rr).

Package

yacc.

Source

yacc.lisp.

Function: make-production (symbol derives &key action action-form)
Package

yacc.

Source

yacc.lisp.

Function: parse (str)

Parse STR as a Javascript script, returning a list of statements. Semicolon insertion is performed according to the ECMA-262 standard.

Package

jwacs.

Source

parse-javascript.lisp.

Function: parse-with-lexer (lexer parser)

Parse the stream of symbols provided by LEXER using PARSER.
LEXER is a function of no arguments returning a symbol and a semantic value, and should return (VALUES NIL NIL) when the end of input is reached. Handle YACC-PARSE-ERROR to provide custom error reporting.

Package

yacc.

Source

yacc.lisp.

Function: process (in-path)
Package

jwacs.

Source

compiler.lisp.


6.1.3 Generic functions

Generic Reader: yacc-parse-error-expected-terminals (condition)
Package

yacc.

Methods
Reader Method: yacc-parse-error-expected-terminals ((condition yacc-parse-error))
Source

yacc.lisp.

Target Slot

expected-terminals.

Generic Reader: yacc-parse-error-terminal (condition)
Package

yacc.

Methods
Reader Method: yacc-parse-error-terminal ((condition yacc-parse-error))
Source

yacc.lisp.

Target Slot

terminal.

Generic Reader: yacc-parse-error-value (condition)
Package

yacc.

Methods
Reader Method: yacc-parse-error-value ((condition yacc-parse-error))
Source

yacc.lisp.

Target Slot

value.


6.1.4 Standalone methods

Method: make-load-form ((p production) &optional env)
Source

yacc.lisp.

Method: make-load-form ((p parser) &optional env)
Source

yacc.lisp.

Method: make-load-form ((a error-action) &optional env)
Source

yacc.lisp.

Method: make-load-form ((a accept-action) &optional env)
Source

yacc.lisp.

Method: make-load-form ((a reduce-action) &optional env)
Source

yacc.lisp.

Method: make-load-form ((a shift-action) &optional env)
Source

yacc.lisp.

Method: make-load-form ((g grammar) &optional env)
Source

yacc.lisp.

Method: make-load-form ((self binary-operator) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self var-decl-statement) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self source-element) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self resume-statement) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self thunk-function) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self identifier) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self for) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self comma-expr) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self return-statement) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self unary-operator) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self statement-block) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self add-handler) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self re-literal) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self fn-call) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self while) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self continuation-function) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self function-decl) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self finally-clause) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self catch-clause) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self var-decl) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self switch) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self string-literal) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self expression) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self suspend-statement) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self for-in) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self token) &optional environment)
Source

lex-javascript.lisp.

Method: make-load-form ((self remove-handler) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self if-statement) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self try) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self default-clause) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self special-value) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self break-statement) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self numeric-literal) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self do-statement) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self continuation-call) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self import-decl) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self object-literal) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self continue-statement) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self new-expr) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self throw-statement) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self with) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self property-access) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self function-expression) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self case-clause) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self array-literal) &optional environment)
Source

js-source-model.lisp.

Method: make-load-form ((self conditional) &optional environment)
Source

js-source-model.lisp.

Method: print-object ((object kernel) stream)
Source

yacc.lisp.

Method: print-object ((object item) stream)
Source

yacc.lisp.

Method: print-object ((object production) stream)
Source

yacc.lisp.

Method: print-object ((object action) stream)
Source

yacc.lisp.

Method: print-object ((e missing-import) s)
Source

conditions.lisp.

Method: print-object ((e syntax-error) s)
Source

conditions.lisp.


6.1.5 Conditions

Condition: missing-import

Indicates that an import could not be located

Package

jwacs.

Source

conditions.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: parent-uripath
Initargs

:parent-uripath

Readers

parent-uripath.

Writers

This slot is read-only.

Slot: import-uripath
Initargs

:import-uripath

Readers

import-uripath.

Writers

This slot is read-only.

Condition: syntax-error

Indicates that an error occured during parsing

Package

jwacs.

Source

conditions.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: token
Initargs

:token

Readers

token.

Writers

This slot is read-only.

Slot: expected-terminals
Initargs

:expected-terminals

Readers

expected-terminals.

Writers

This slot is read-only.

Condition: yacc-parse-error
Package

yacc.

Source

yacc.lisp.

Direct superclasses

error.

Direct methods
Direct slots
Slot: terminal
Initargs

:terminal

Readers

yacc-parse-error-terminal.

Writers

This slot is read-only.

Slot: value
Initargs

:value

Readers

yacc-parse-error-value.

Writers

This slot is read-only.

Slot: expected-terminals
Initargs

:expected-terminals

Readers

yacc-parse-error-expected-terminals.

Writers

This slot is read-only.


6.2 Internals


6.2.1 Special variables

Special Variable: *add-handler-prop*

property name for the ’add exception handler to stack’ operation field of a boxed result object

Package

jwacs.

Source

trampoline-transformation.lisp.

Special Variable: *addhandler-fn*

Runtime function that adds a new exception handler to the global handler stack

Package

jwacs.

Source

runtime-transformation.lisp.

Special Variable: *arguments-name*

Name of the ‘arguments‘ identifier

Package

jwacs.

Source

shadow-values-transformation.lisp.

Special Variable: *cached-runtimes*

A lookup table for generating the appropriate runtime depending upon the specified name

Package

jwacs.

Source

compiler.lisp.

Special Variable: *call-fn*

Runtime function that we use to make indirect calls with large numbers of arguments to targets that may not be transformed

Package

jwacs.

Source

runtime-transformation.lisp.

Special Variable: *call0-fn*

Runtime function that we use to make indirect calls with a small number of arguments to targets that may not be transformed

Package

jwacs.

Source

runtime-transformation.lisp.

Special Variable: *callfromdirect-fn*

Runtime function which will call a transformed function with a trampoline loop and identity continuation

Package

jwacs.

Source

runtime-transformation.lisp.

Special Variable: *compiler-pipeline*

The list of transformations (in order) that are performed to convert jwacs source into Javascript source.

Package

jwacs.

Source

compiler.lisp.

Special Variable: *constructor-cache*

Map from structure-type symbol to copy-function symbol

Package

jwacs.

Source

source-transformations.lisp.

Special Variable: *cont-id*

An identifier whose name is *cont-name*

Package

jwacs.

Source

cps-transformation.lisp.

Special Variable: *cont-name*

The name of the standard continuation parameter

Package

jwacs.

Source

cps-transformation.lisp.

Special Variable: *continuation-property*

The name of the property that we set on each continuation function

Package

jwacs.

Source

runtime-transformation.lisp.

Special Variable: *current-filename*

The name of the file currently being parsed

Package

jwacs.

Source

parse-javascript.lisp.

Special Variable: *current-handler-stack-reference*

Element that refers to the current handler stack. This should be one of *TOPLEVEL-HANDLER-STACK-REFERENCE*, *IN-FUNCTION-HANDLER-STACK-REFERENCE*, or *IN-THUNK-HANDLER-STACK-REFERENCE*.

Package

jwacs.

Source

runtime-transformation.lisp.

Special Variable: *cycle-free-collapse-pass*

T if no cycles were encountered on this pass of COLLAPSE-NODES

Package

jwacs.

Source

type-analysis.lisp.

Special Variable: *debug-eval-boilerplate*

Boilerplate code for debug-mode local evaluation

Package

jwacs.

Source

trampoline-transformation.lisp.

Special Variable: *debug-eval-var-name*

Name of the parameter containing an expression to be evaluated locally for debug-mode thunks

Package

jwacs.

Source

trampoline-transformation.lisp.

Special Variable: *debug-mode*

When true, we pack more information into each boxed thunk

Package

jwacs.

Source

trampoline-transformation.lisp.

Special Variable: *debug-runtime-text*

The text of the debug-mode jwacs runtime

Package

jwacs.

Source

compiler.lisp.

Special Variable: *default-iframe*

The text of the hidden iframe for bookmark handling

Package

jwacs.

Source

compiler.lisp.

Special Variable: *default-template*

The text of the default application template

Package

jwacs.

Source

compiler.lisp.

Special Variable: *done-prop*

property name for the done field of a boxed result object

Package

jwacs.

Source

trampoline-transformation.lisp.

Special Variable: *end-pos-prop*

property name for the end-position debug property on boxed thunks

Package

jwacs.

Source

trampoline-transformation.lisp.

Special Variable: *environment*

list of assoc lists representing the current lexical environment

Package

jwacs.

Source

ugly-print.lisp.

Special Variable: *escape-script-end-tags*

When non-NIL, escape script end tags (for supporting inline scripts

Package

jwacs.

Source

pretty-print.lisp.

Special Variable: *escaping-references*

List of variable names that are referenced in a statement tail that is going to be reordered into a labelled continuation. We use this to determine when it is safe to convert a variable declaration directly into a continuation parameter, vs when we need to retain the variable declaration and assign it at the beginning of a continuation.

Package

jwacs.

Source

cps-transformation.lisp.

Special Variable: *function-decls-in-scope*

A list of names of currently-visible function-decls. We use this to determine which calls need to be indirected through $call, and which can be ’inlined’ as unchecked CPS calls. We don’t do any handling for duplicate identifiers, since we currently assume that variable names will all have been uglified by this point.

Package

jwacs.

Source

runtime-transformation.lisp.

Special Variable: *genvar-counter*
Package

jwacs.

Source

ugly-print.lisp.

Special Variable: *handler-stack-k-prop*

Name of the property on continuations that contains the handler stack to use

Package

jwacs.

Source

trampoline-transformation.lisp.

Special Variable: *handler-stack-var-name*

standard variable name for storing the current handler stack

Package

jwacs.

Source

trampoline-transformation.lisp.

Special Variable: *in-function-handler-stack-reference*

Inside a function but outside of a thunk, the current handler stack is the handler stack property of the function’s continuation.

Package

jwacs.

Source

runtime-transformation.lisp.

Special Variable: *in-local-scope*

T when the lexical scope is currently inside a function decl, NIL when the lexical scope is currently the global scope

Package

jwacs.

Source

source-transformations.lisp.

Special Variable: *in-thunk-handler-stack-reference*

Inside a thunk, the current handler stack is passed in as a parameter named ‘$e‘.

Package

jwacs.

Source

runtime-transformation.lisp.

Special Variable: *indent*

Current indentation level, in spaces (not steps)

Package

jwacs.

Source

pretty-print.lisp.

Special Variable: *indent-step*

Number of spaces per indentation step

Package

jwacs.

Source

pretty-print.lisp.

Special Variable: *innermost-function-node*

The value-node of the innermost function decl, if any

Package

jwacs.

Source

type-analysis.lisp.

Special Variable: *items-closure-hash-threshold*

The number of elements when items-closure switches to using a hashtable.

Package

yacc.

Source

yacc.lisp.

Special Variable: *keyword-symbols*

A list of the keyword symbols.

Package

jwacs.

Source

lex-javascript.lisp.

Special Variable: *lexically-active-handlers*

List of handlers that are active in the current lexical scope. These are the handlers that need to be removed just before a value return, or at the beginning of the continuation of a tail call.

Package

jwacs.

Source

cps-transformation.lisp.

Special Variable: *makearguments-fn*

Runtime function that constructs a shadowing ‘arguments‘ object that omits the continuation argument from the numbered arguments (but which includes it as the ’continuation’ field)

Package

jwacs.

Source

runtime-transformation.lisp.

Special Variable: *makek-fn*

Runtime function called to flag a function expression as a continuation

Package

jwacs.

Source

runtime-transformation.lisp.

Special Variable: *makelambda-fn*

Runtime function called to flag a function expression as a transformed jwacs function expression

Package

jwacs.

Source

runtime-transformation.lisp.

Special Variable: *max-call0-args*

Maximum number of arguments that can be passed to a function using $call0

Package

jwacs.

Source

runtime-transformation.lisp.

Special Variable: *max-new0-args*

Maximum number of arguments that can be passed to a constructor using $new0

Package

jwacs.

Source

runtime-transformation.lisp.

Special Variable: *muffle-conflicts*

When T, yacc warnings about Shift/Reduce and Reduce/Reduce conflicts will be muffled. When NIL, all such conflicts will be reported.
When non-NIL, non-T, a single summary warning will be reported when conflicts exist.

This value should be set to NIL or non-T during grammar
development/debugging (so that we find out about the conflicts), but T
at all other times (so that SBCL won’t drop into the debugger when
we’re trying to load parse-javascript.lisp).

Package

jwacs-system.

Source

jwacs.asd.

Special Variable: *nearest-break*

Name of the break continuation function for the nearest enclosing loop

Package

jwacs.

Source

cps-transformation.lisp.

Special Variable: *nearest-continue*

Name of the continue continuation function for the nearest enclosing loop

Package

jwacs.

Source

cps-transformation.lisp.

Special Variable: *nested-context*

T when processing nested subexpressions

Package

jwacs.

Source

explicitize-transformation.lisp.

Special Variable: *new-fn*

Runtime function that we use to make indirect constructions with a large number of arguments to constructors that may have been transformed

Package

jwacs.

Source

runtime-transformation.lisp.

Special Variable: *new0-fn*

Runtime function that we use to make indirect constructions with a small number of arguments to constructors that may have been transformed

Package

jwacs.

Source

runtime-transformation.lisp.

Special Variable: *non-escaping-break-labels*

Non-escaping label names that are valid targets for a ‘break‘ statement

Package

jwacs.

Source

static-analysis.lisp.

Special Variable: *non-escaping-continue-labels*

Non-escaping label names that are valid targets for a ‘continue‘ statement

Package

jwacs.

Source

static-analysis.lisp.

Special Variable: *operator-tokens*

These are operators (as distinct from general tokens) that will be built into a special regular expression.

We can’t just use the keys from *symbols-to-tokens*, because the
order that the tokens appear in this list is significant. Specifically, each ’long’ operator must occur before any operator that it is a supersequence of. Eg, ’<<<’ must occur before ’<<’, which must occur before ’<’. ’!=’ must occur before both ’!’ and ’=’.

Package

jwacs.

Source

lex-javascript.lisp.

Special Variable: *opt-space*
Package

jwacs.

Source

pretty-print.lisp.

Special Variable: *pogo-function*

Runtime function that drives trampoline-style programs; We have to add explicit calls to this function for toplevel calls to trampolined functions.

Package

jwacs.

Source

runtime-transformation.lisp.

Special Variable: *pretty-mode*

When non-NIL, print nicely (ie, with indentation and newlines). When NIL, print compactly (ie, with no unnecessary whitespace).

Package

jwacs.

Source

pretty-print.lisp.

Special Variable: *remove-handler-prop*

property name for the ’remove exception handler from stack’ operation field of a boxed result object

Package

jwacs.

Source

trampoline-transformation.lisp.

Special Variable: *removehandler-fn*

Runtime function that removes the top exception handler from the global handler stack

Package

jwacs.

Source

runtime-transformation.lisp.

Special Variable: *replace-handler-stack-prop*

property name for the ’replace exception handler stack’ operation field of a boxed result object

Package

jwacs.

Source

trampoline-transformation.lisp.

Special Variable: *restricted-tokens*

Tokens that participate in ’restricted productions’. Value should be either :PRE or :POST. For each of these tokens, the lexer will emit either a :NO-LINE-TERMINATOR or a :LINE-TERMINATOR token depending upon whether the token was preceded/followed by a line-break.

Package

jwacs.

Source

lex-javascript.lisp.

Special Variable: *result-prop*

property name for the result field of a boxed result object

Package

jwacs.

Source

trampoline-transformation.lisp.

Special Variable: *runtime-text*

The text of the jwacs runtime

Package

jwacs.

Source

compiler.lisp.

Special Variable: *shadowed-arguments-name*

Name of the variable that currently shadows ‘arguments‘

Package

jwacs.

Source

shadow-values-transformation.lisp.

Special Variable: *shadowed-this-name*

Name of the variable that currently shadows ‘this‘

Package

jwacs.

Source

shadow-values-transformation.lisp.

Special Variable: *start-pos-prop*

property name for the start-position debug property on boxed thunks

Package

jwacs.

Source

trampoline-transformation.lisp.

Special Variable: *symbols-to-tokens*

Map from token symbol to token string. This contains an entry for every token in *tokens-to-symbols*, plus additional entries for the ’operation’ symbols.

Package

jwacs.

Source

lex-javascript.lisp.

Special Variable: *thunk-prop*

property name for the thunk field of a boxed result object

Package

jwacs.

Source

trampoline-transformation.lisp.

Special Variable: *tokens-to-symbols*

Map from string to token symbol.
Every symbol that the tokenizer will return is in this map.

Package

jwacs.

Source

lex-javascript.lisp.

Special Variable: *toplevel-handler-stack-reference*

At the toplevel and outside of a thunk, there is no handler stack yet.

Package

jwacs.

Source

runtime-transformation.lisp.

Special Variable: *transformed-property*

The name of the property that we set on each transformed function

Package

jwacs.

Source

runtime-transformation.lisp.

Special Variable: *version*
Package

jwacs.

Source

main.lisp.

Special Variable: floating-re

Regular expression for recognizing floating-point literals

Package

jwacs.

Source

lex-javascript.lisp.

Special Variable: integer-re

Regular expression for recognizing integer literals

Package

jwacs.

Source

lex-javascript.lisp.

Special Variable: javascript-script
Package

jwacs.

Source

parse-javascript.lisp.

Special Variable: operator-re

Regular expression for recognizing operators

Package

jwacs.

Source

lex-javascript.lisp.

Special Variable: regexp-re

(Lisp) regular expression for recognizing (Javascript) regular expression literals

Package

jwacs.

Source

lex-javascript.lisp.

Special Variable: string-re

Regular expression for recognizing string literals

Package

jwacs.

Source

lex-javascript.lisp.

Special Variable: undefined-id

Contains the ‘undefined‘ identifier

Package

jwacs.

Source

parse-javascript.lisp.

Special Variable: whitespace-and-comments-re

Regular expression for consuming (and thereby skipping) whitespace and comments

Package

jwacs.

Source

lex-javascript.lisp.


6.2.2 Macros

Macro: aif (test-form then-form &optional else-form)

Anaphoric IF expression; binds IT.

Package

jwacs.

Source

general-utilities.lisp.

Macro: awhen (test-form &body body)

Anaphoric WHEN expression; binds IT.

Package

jwacs.

Source

general-utilities.lisp.

Macro: bind-with-backchannels ((&rest bindings) form &body body)
Package

jwacs.

Source

general-utilities.lisp.

Macro: defelement (name &rest slots)
Package

jwacs.

Source

js-source-model.lisp.

Macro: defparser (parser-name starting-production &body productions)

This macro emulates the Lispworks parsergenerator’s defparser macro, but instead creates output for CL-YACC

Package

jwacs.

Source

parse-javascript-yacc.lisp.

Macro: deftoken (symbol &optional key token-type)

Add a token’s symbol and possibly string to the appropriate lookups.

Different actions will be taken depending upon the TOKEN-TYPE: OPERATOR-TOKENs are infix operators, which are recognized as atomic tokens regardless of whether they are surrounded by whitespace (unlike identifier tokens, for example).
KEYWORDs are reserved strings that can never be used as an identifier. OPERATIONs will never be returned by the lexer, but they are used in the source model in the same place as tokens (ie, in :op-symbol slots), so they are treated as tokens for now.

Package

jwacs.

Source

lex-javascript.lisp.

Macro: forbid-transformation-elements (xform elm-type-list)

Generate DEFMETHOD forms that throw an error if the transformation specified in XFORM is applied to any of the element types in ELM-TYPE-LIST

Package

jwacs.

Source

source-transformations.lisp.

Macro: in-local-scope (&body body)

Execute BODY with *IN-LOCAL-SCOPE* bound to T

Package

jwacs.

Source

source-transformations.lisp.

Macro: re-cond ((string &key start) &rest clauses)

(re-cond (STRING :start START) (REGEXP FORMS*)*
If REGEXP matches STRING, then %S, %E, %SUB-S, and %SUB-E will be bound during execution of FORMS

Package

jwacs.

Source

lexer-macros.lisp.

Macro: when-let ((bind-var test-form) &body body)

Anaphoric WHEN expression that allows the caller to specify the name of the bound variable

Package

jwacs.

Source

general-utilities.lisp.

Macro: with-added-environment (&body body)

Executes BODY with a new environment added to the environment stack

Package

jwacs.

Source

ugly-print.lisp.

Macro: with-indent (&body body)

Execute the contained forms with *indent* set one step deeper.

Package

jwacs.

Source

pretty-print.lisp.

Macro: with-module-output ((stream-name module &key append) &body body)

Outputs to a module, optionally appending

Package

jwacs.

Source

compiler.lisp.

Macro: with-nesting (&body body)

Execute the forms of BODY with *NESTED-CONTEXT* bound to T.

Package

jwacs.

Source

explicitize-transformation.lisp.

Macro: with-non-escaping-break-target ((elm) &body body)
Package

jwacs.

Source

static-analysis.lisp.

Macro: with-non-escaping-continue-target ((elm) &body body)
Package

jwacs.

Source

static-analysis.lisp.


6.2.3 Ordinary functions

Function: %copy-item (instance)
Package

yacc.

Source

yacc.lisp.

Function: %make-grammar (&key name terminals precedence productions %symbols derives-epsilon derives-first derives-first-terminal)
Package

yacc.

Source

yacc.lisp.

Function: %make-kernel (items)
Package

yacc.

Source

yacc.lisp.

Function: %make-parser (states goto action)
Package

yacc.

Source

yacc.lisp.

Function: absolute-uripath-p (uripath)

Predicate for checking if a URIPATH is specified from the root rather than relative to the current tree position.

Package

jwacs.

Source

compiler.lisp.

Function: accept-action-p (object)
Package

yacc.

Source

yacc.lisp.

Function: action-equal-p (a1 a2)
Package

yacc.

Source

yacc.lisp.

Function: action-p (object)
Package

yacc.

Source

yacc.lisp.

Function: add-assignment-edge (left-node right-node &optional queue)

Add an assignment edge from LEFT-NODE to RIGHT-NODE if no such edge already exists. If QUEUE is non-NIL, queues LEFT-NODE for further processing.

Package

jwacs.

Source

type-analysis.lisp.

Function: add-binding (var-name var-newname)

Add a binding to the environment. In our case, name and new name

Package

jwacs.

Source

ugly-print.lisp.

Function: add-handler-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf add-handler-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Reader: add-handler-handler (instance)
Writer: (setf add-handler-handler) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

handler.

Function: add-handler-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf add-handler-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: add-handler-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Function: add-handler-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf add-handler-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Reader: add-handler-thunk-body (instance)
Writer: (setf add-handler-thunk-body) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

thunk-body.

Function: anonymous-node-p (node)

Return T if NODE is an ’anonymous’ node (ie, one whose name is an uninterned symbol).

Package

jwacs.

Source

type-analysis.lisp.

Function: append-module (src-module target-module)

Appends the contents of SRC-MODULE to the end of TARGET-MODULE, creating TARGET-MODULE if necessary. If TARGET-MODULE is compressed and SRC-MODULE is not, then SRC-MODULE’s text will be compressed before being added to TARGET-MODULE.

Package

jwacs.

Source

compiler.lisp.

Reader: array-literal-elements (instance)
Writer: (setf array-literal-elements) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

elements.

Function: array-literal-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf array-literal-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: array-literal-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf array-literal-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: array-literal-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Function: array-literal-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf array-literal-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: assignment-operator-p (elm)

Returns non-NIL if ELM represents an operation with an assignment side-effect

Package

jwacs.

Source

cps-transformation.lisp.

Function: backchannel-signal (channel value)

Signals VALUE on backchannel CHANNEL. Returns T if the message was received.

Package

jwacs.

Source

general-utilities.lisp.

Function: binary-operator-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf binary-operator-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: binary-operator-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf binary-operator-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Reader: binary-operator-left-arg (instance)
Writer: (setf binary-operator-left-arg) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

left-arg.

Reader: binary-operator-op-symbol (instance)
Writer: (setf binary-operator-op-symbol) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

op-symbol.

Function: binary-operator-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Reader: binary-operator-right-arg (instance)
Writer: (setf binary-operator-right-arg) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

right-arg.

Function: binary-operator-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf binary-operator-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: boolean-arg (name val)

Converts an argument to a boolean option to a boolean value

Package

jwacs.

Source

main.lisp.

Function: break-statement-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf break-statement-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: break-statement-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf break-statement-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: break-statement-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Function: break-statement-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf break-statement-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Reader: break-statement-target-label (instance)
Writer: (setf break-statement-target-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

target-label.

Function: call-expression-p (elm)

Return non-NIL if ELM is a CallExpression, or NIL otherwise.

Package

jwacs.

Source

js-source-model.lisp.

Reader: case-clause-body (instance)
Writer: (setf case-clause-body) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

body.

Function: case-clause-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf case-clause-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: case-clause-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf case-clause-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: case-clause-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Function: case-clause-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf case-clause-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Reader: case-clause-value (instance)
Writer: (setf case-clause-value) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

value.

Reader: catch-clause-binding (instance)
Writer: (setf catch-clause-binding) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

binding.

Reader: catch-clause-body (instance)
Writer: (setf catch-clause-body) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

body.

Function: catch-clause-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf catch-clause-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: catch-clause-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf catch-clause-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: catch-clause-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Function: catch-clause-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf catch-clause-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: change-uripath-extension (uripath new-extension)

Converts URIPATH to a URIPATH that points to a different type of file. Eg, (CHANGE-URIPATH-EXTENSION "/common/lib.jw" "js") ==> "/common/lib.js"

Package

jwacs.

Source

compiler.lisp.

Function: clear-lr1-collection (collection)
Package

yacc.

Source

yacc.lisp.

Function: coerce-token (lexer terminal)

Force LEXER to interpret the next token as TERMINAL. An error will be raised if that’s not actually possible.

Package

jwacs.

Source

lex-javascript.lisp.

Function: collapse-type-graph (graph)

Adds an edge from each location-node in GRAPH to each value-node that it has a path to, and removes all other assignment edges. Removes all ’dotted’ edges (ie, args, ret, and props) from location-nodes; only value-nodes will have dotted edges after this processing is done.

Package

jwacs.

Source

type-analysis.lisp.

Function: combine-first (f1 s grammar)

FIRST(s1.s) where f1=FIRST(s1).

Package

yacc.

Source

yacc.lisp.

Function: combine-statements (&rest elm-arguments)

Combine ELM-ARGUMENTS into a single list, stripping out statement-blocks if necessary

Package

jwacs.

Source

js-source-model.lisp.

Function: comma-expr-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf comma-expr-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Reader: comma-expr-exprs (instance)
Writer: (setf comma-expr-exprs) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

exprs.

Function: comma-expr-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf comma-expr-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: comma-expr-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Function: comma-expr-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf comma-expr-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: compute-all-lookaheads (kernels grammar)

Compute the LR(1) lookaheads for all the collections in KERNELS.

Package

yacc.

Source

yacc.lisp.

Function: compute-field-name (field-elm)

Return the name of a property. For properties specified by literals, this is the
name of the property; for all other field names (ie, for identifiers or other expressions) this will be the special field-name ’ANY.

Package

jwacs.

Source

type-analysis.lisp.

Function: compute-goto (kernel symbol grammar)

Compute the kernel of goto(KERNEL, SYMBOL)

Package

yacc.

Source

yacc.lisp.

Function: compute-kernels (grammar)

Compute the set collections of LR(0) items for GRAMMAR.

Package

yacc.

Source

yacc.lisp.

Function: compute-lookaheads (kernel grammar &optional propagate-only)

Compute the LR(1) lookaheads for all items in KERNEL. If PROPAGATE-ONLY is true, ignore spontaneous generation.

Package

yacc.

Source

yacc.lisp.

Function: compute-parsing-tables (kernels grammar &key muffle-conflicts)

Compute the parsing tables for grammar GRAMMAR and transitions KERNELS. PRECEDENCE is as in FIND-PRECEDENCE. MUFFLE-WARNINGS is one of NIL, T, :SOME or a list of the form (sr rr).

Package

yacc.

Source

yacc.lisp.

Function: compute-terminated-clauses (clause-list)

Takes a list of switch clauses that may or may not be terminated (eg, by a break statement),
and returns a list of clauses with equivalent effects that are more suitable for cps translation. Specifically:
1) Terminated clauses are returned unchanged. A terminated clause is one which is terminated
in all its control paths.
2) ’Null clauses’ (ie, clauses with no body) are also returned unchanged so long as they aren’t the final clause. If they are the final clause, their body is set to a single break statement. 3) Unterminated clauses have the body of each following clause appended to them (up to and including the first terminated clause).
4) If the final clause is unterminated, it will have a break statement appended to it
5) If there is no default clause, a default clause will be added to the end of the list with a body containing a single break statement.

eg:

case 10:
doSomething();
case 20:
case 30:
doSomethingElse();
break;
default:

===>

case 10:
doSomething();
doSomethingElse();
break;
case 20:
case 30:
doSomethingElse();
break;
default:
break;

Package

jwacs.

Source

cps-transformation.lisp.

Reader: conditional-condition (instance)
Writer: (setf conditional-condition) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

condition.

Function: conditional-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf conditional-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Reader: conditional-false-arg (instance)
Writer: (setf conditional-false-arg) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

false-arg.

Function: conditional-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf conditional-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: conditional-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Function: conditional-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf conditional-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Reader: conditional-true-arg (instance)
Writer: (setf conditional-true-arg) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

true-arg.

Function: connect-type-graph (graph)
Package

jwacs.

Source

type-analysis.lisp.

Function: consume-token (lexer)

Reads the next token from LEXER’s source text (where ’next’ is determined by
the value of LEXER’s cursor). The cursor is assumed to point to a non-whitespace character on entry; on exit points to the first character after the consumed token. Returns a token structure. The token’s terminal will be NIL on end of input

Package

jwacs.

Source

lex-javascript.lisp.

Function: consume-whitespace (lexer)

Consumes whitespace and comments. Lexer’s cursor is updated to the next non-whitespace character, and its ENCOUNTERED-LINE-TERMINATOR slot is set based upon whether or not the skipped whitespace included a newline. Returns non-NIL if line-terminators were encountered.

Package

jwacs.

Source

lex-javascript.lisp.

Function: continuation-call-args (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf continuation-call-args) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: continuation-call-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf continuation-call-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: continuation-call-fn (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf continuation-call-fn) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: continuation-call-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf continuation-call-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: continuation-call-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Function: continuation-call-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf continuation-call-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: continuation-function-body (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf continuation-function-body) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: continuation-function-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf continuation-function-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: continuation-function-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf continuation-function-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: continuation-function-name (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf continuation-function-name) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: continuation-function-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Function: continuation-function-parameters (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf continuation-function-parameters) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: continuation-function-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf continuation-function-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: continue-statement-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf continue-statement-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: continue-statement-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf continue-statement-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: continue-statement-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Function: continue-statement-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf continue-statement-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Reader: continue-statement-target-label (instance)
Writer: (setf continue-statement-target-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

target-label.

Function: copy-accept-action (instance)
Package

yacc.

Source

yacc.lisp.

Function: copy-action (instance)
Package

yacc.

Source

yacc.lisp.

Function: copy-add-handler (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-array-literal (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-binary-operator (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-break-statement (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-case-clause (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-catch-clause (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-comma-expr (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-conditional (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-continuation-call (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-continuation-function (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-continue-statement (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-default-clause (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-do-statement (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-error-action (instance)
Package

yacc.

Source

yacc.lisp.

Function: copy-expression (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-finally-clause (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-fn-call (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-for (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-for-in (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-function-decl (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-function-expression (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-goto (instance)
Package

yacc.

Source

yacc.lisp.

Function: copy-grammar (instance)
Package

yacc.

Source

yacc.lisp.

Function: copy-identifier (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-if-statement (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-import-decl (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-kernel (instance)
Package

yacc.

Source

yacc.lisp.

Function: copy-location-node (instance)
Package

jwacs.

Source

type-analysis.lisp.

Function: copy-lr0-item (instance)
Package

yacc.

Source

yacc.lisp.

Function: copy-lr1-item (instance)
Package

yacc.

Source

yacc.lisp.

Function: copy-module (instance)
Package

jwacs.

Source

compiler.lisp.

Function: copy-new-expr (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-node-queue-container (instance)
Package

jwacs.

Source

type-analysis.lisp.

Function: copy-node-queue-entry (instance)
Package

jwacs.

Source

type-analysis.lisp.

Function: copy-numeric-literal (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-object-literal (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-parser (instance)
Package

yacc.

Source

yacc.lisp.

Function: copy-production (instance)
Package

yacc.

Source

yacc.lisp.

Function: copy-property-access (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-re-literal (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-reduce-action (instance)
Package

yacc.

Source

yacc.lisp.

Function: copy-remove-handler (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-resume-statement (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-return-statement (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-shift-action (instance)
Package

yacc.

Source

yacc.lisp.

Function: copy-source-element (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-special-value (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-statement-block (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-string-literal (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-suspend-statement (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-switch (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-throw-statement (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-thunk-function (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-token (instance)
Package

jwacs.

Source

lex-javascript.lisp.

Function: copy-try (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-type-graph (graph)

Returns a newly-created equivalent GRAPH

Package

jwacs.

Source

type-analysis.lisp.

Function: copy-type-graph-node (instance)
Package

jwacs.

Source

type-analysis.lisp.

Function: copy-unary-operator (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-value-node (instance)
Package

jwacs.

Source

type-analysis.lisp.

Function: copy-var-decl (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-var-decl-statement (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-while (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: copy-with (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: decode-arguments ()

Decode the command-line arguments and return the resulting option values

Package

jwacs.

Source

main.lisp.

Reader: default-clause-body (instance)
Writer: (setf default-clause-body) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

body.

Function: default-clause-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf default-clause-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: default-clause-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf default-clause-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: default-clause-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Function: default-clause-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf default-clause-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: dequeue-node (queue)

Remove and return a node from the front of QUEUE

Package

jwacs.

Source

type-analysis.lisp.

Function: derives-epsilon (symbol grammar &optional seen)

True if symbol derives epsilon.

Package

yacc.

Source

yacc.lisp.

Function: derives-epsilon* (symbol grammar &optional seen)

Unmemoised version of DERIVES-EPSILON.

Package

yacc.

Source

yacc.lisp.

Function: derives-first (c grammar &optional seen)

The list of symbols A such that C rm->* A.eta for some eta.

Package

yacc.

Source

yacc.lisp.

Function: derives-first-terminal (c grammar &optional seen)

The list of terminals a such that C rm->* a.eta, last non-epsilon.

Package

yacc.

Source

yacc.lisp.

Function: determine-imported-modules (main-module prefix-lookup &optional already-imported)

Determines the modules imported by MAIN-MODULE. Modules whose pathnames are elements of ALREADY-IMPORTED will not be included. Nonexistent files return an empty list of modules.

Package

jwacs.

Source

compiler.lisp.

Function: determine-modules (main-module prefix-lookup)

Using MAIN-MODULE as the main module, determine a list of modules that need to be processed to generate an app.

Package

jwacs.

Source

compiler.lisp.

Reader: do-statement-body (instance)
Writer: (setf do-statement-body) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

body.

Reader: do-statement-condition (instance)
Writer: (setf do-statement-condition) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

condition.

Function: do-statement-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf do-statement-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: do-statement-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf do-statement-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: do-statement-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Function: do-statement-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf do-statement-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: effective-fn-call-p (elm)

Both function calls and new expressions are ’effective’ function calls, because they will both wind up as function calls after the compiler pipeline gets through with them.

Package

jwacs.

Source

static-analysis.lisp.

Function: element-end (element)

Returns the end position of source-element or token ELEMENT.

Package

jwacs.

Source

parse-javascript.lisp.

Function: element-start (element)

Returns the start position of source-element or token ELEMENT.

Package

jwacs.

Source

parse-javascript.lisp.

Function: emit-elms (elms out-stream &key pretty-output)

Prints ELMS to OUT-STREAM. If PRETTY-OUTPUT is NIL, the elements will be printed compactly

Package

jwacs.

Source

compiler.lisp.

Function: enqueue-ancestors (queue node path)

Adds NODE and all of the assignment-ancestors of NODE to QUEUE.
PATH contains a list of nodes processed so far (used for cycle-detection).

Package

jwacs.

Source

type-analysis.lisp.

Function: enqueue-node (queue node)

Add NODE to the end of QUEUE

Package

jwacs.

Source

type-analysis.lisp.

Function: ensure-unique-binding (var-name)

Adds a unique name for VAR-NAME to the environment, and returns the unique name. The unique name will be uglified or otherwise ’uniquified’ for non-toplevel identifiers; toplevel identifiers will be left as-is.

Package

jwacs.

Source

ugly-print.lisp.

Function: error-action-p (object)
Package

yacc.

Source

yacc.lisp.

Function: escape-regexp (re-string)
Package

jwacs.

Source

lex-javascript.lisp.

Function: expand-hashtable-to-values (hashtable)

Returns a list of all the values stored in a hashtable.

Package

jwacs.

Source

parse-javascript-yacc.lisp.

Function: explicit-return-p (elm)

Convenience function for the common case where we’re concerned about function termination (rather than loop or clause termination)

Package

jwacs.

Source

static-analysis.lisp.

Function: explicitize-short-circuit-operator (elm)

Transforms ELM (should be a BINARY-OPERATOR) in a way that preserves the short-circuit semantics

Package

jwacs.

Source

explicitize-transformation.lisp.

Function: expression-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf expression-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: expression-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf expression-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: expression-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Function: expression-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf expression-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Reader: finally-clause-body (instance)
Writer: (setf finally-clause-body) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

body.

Function: finally-clause-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf finally-clause-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: finally-clause-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf finally-clause-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: finally-clause-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Function: finally-clause-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf finally-clause-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: find-binding (var-name)

Looks through the set of environments and finds the most recently bound variable, returns its bound value

Package

jwacs.

Source

ugly-print.lisp.

Function: find-free-variables-in-scope (elm)

This is basically TRANSFORM-IN-SCOPE. It adds bindings for each variable and function declaration that it encounters.

Package

jwacs.

Source

static-analysis.lisp.

Function: find-goto (kernel symbol)
Package

yacc.

Source

yacc.lisp.

Function: find-location-node (graph name)

Return the location node named NAME from GRAPH if one already exists, or NIL otherwise

Package

jwacs.

Source

type-analysis.lisp.

Function: find-node-property (node name)

Return the location node pointed to by NODE’s NAME property if one already exists, or NIL otherwise

Package

jwacs.

Source

type-analysis.lisp.

Function: find-precedence (op precedence)

Return the tail of PRECEDENCE starting with the element containing OP. PRECEDENCE is a list of elements of the form (KEYWORD . (op...)).

Package

yacc.

Source

yacc.lisp.

Function: find-single-terminal (s grammar)

Return the only terminal in S, or NIL if none or multiple.

Package

yacc.

Source

yacc.lisp.

Function: find-value-node (graph name)

Return the value named NAME from GRAPH

Package

jwacs.

Source

type-analysis.lisp.

Function: find-value-node-named (name node-list)

If NODE-LIST contains a value-node named NAME, returns it.

Package

jwacs.

Source

type-analysis.lisp.

Function: first-terminals (s grammar)

FIRST(s) without epsilon.

Package

yacc.

Source

yacc.lisp.

Reader: fn-call-args (instance)
Writer: (setf fn-call-args) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

args.

Function: fn-call-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf fn-call-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Reader: fn-call-fn (instance)
Writer: (setf fn-call-fn) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

fn.

Function: fn-call-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf fn-call-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: fn-call-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Function: fn-call-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf fn-call-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Reader: for-body (instance)
Writer: (setf for-body) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

body.

Reader: for-condition (instance)
Writer: (setf for-condition) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

condition.

Function: for-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf for-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Reader: for-in-binding (instance)
Writer: (setf for-in-binding) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

binding.

Reader: for-in-body (instance)
Writer: (setf for-in-body) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

body.

Reader: for-in-collection (instance)
Writer: (setf for-in-collection) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

collection.

Function: for-in-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf for-in-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: for-in-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf for-in-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: for-in-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Function: for-in-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf for-in-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Reader: for-initializer (instance)
Writer: (setf for-initializer) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

initializer.

Function: for-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf for-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: for-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Function: for-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf for-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Reader: for-step (instance)
Writer: (setf for-step) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

step.

Function: force-space (s)

Prints a space to S in ugly mode to ensure that two elements will be separated

Package

jwacs.

Source

pretty-print.lisp.

Function: fresh-line-indented (s)

Start a new, indented line.

Package

jwacs.

Source

pretty-print.lisp.

Reader: function-decl-body (instance)
Writer: (setf function-decl-body) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

body.

Function: function-decl-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf function-decl-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: function-decl-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf function-decl-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Reader: function-decl-name (instance)
Writer: (setf function-decl-name) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

name.

Function: function-decl-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Reader: function-decl-parameters (instance)
Writer: (setf function-decl-parameters) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

parameters.

Function: function-decl-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf function-decl-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Reader: function-expression-body (instance)
Writer: (setf function-expression-body) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

body.

Function: function-expression-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf function-expression-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: function-expression-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf function-expression-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Reader: function-expression-name (instance)
Writer: (setf function-expression-name) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

name.

Function: function-expression-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Reader: function-expression-parameters (instance)
Writer: (setf function-expression-parameters) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

parameters.

Function: function-expression-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf function-expression-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: function-in-scope-p (target-name)

Return non-NIL if a function-decl with name NAME is currently visible in scope

Package

jwacs.

Source

runtime-transformation.lisp.

Function: generate-productions (productions)

Used by defparser macro. Take the lispworks list of productions and convert them into CL-YACC versions

Package

jwacs.

Source

parse-javascript-yacc.lisp.

Function: generate-rules-with-optional (rule-spec &optional mask)

Accepts a PARSERGEN rulespec and transforms it by treating each symbol that begins with a #\? character as being optional. The output is a list of one or more rules that exhaust all the present/absent possibilities. This is an internal utility for generating rules for the different grammar rules that are specified with wildcards.

Package

jwacs.

Source

parse-javascript.lisp.

Function: generate-runtime (runtime-module compress-mode combine-mode)

Generate a runtime at the location pointed to by RUNTIME-MODULE. Only specially-named runtimes will be generated. If COMBINE-MODE is non-NIL, an inline module will be generated; otherwise a module will be emitted to disk.

Package

jwacs.

Source

compiler.lisp.

Function: genvar (&optional orig-name)

Generates a unique string that will be our ugly name for variables. When *PRETTY-MODE* is non-NIL and ORIG-NAME is provided, the name will be unique but not all that ugly.

Package

jwacs.

Source

ugly-print.lisp.

Function: get-constructor (struct-object)

Accept a structure object and return the (likely) name of its constructor. CAVEAT: Assumes that the structure was defined in the same package as its name.

Package

jwacs.

Source

source-transformations.lisp.

Function: get-continuation-node (graph node &optional queue)

Returns the continuation value-node for value-node NODE, creating it if necessary. Creating a continuation node may cause a return-node to be created and queued as a side-effect.

Package

jwacs.

Source

type-analysis.lisp.

Function: get-exemplar-value-nodes (graph constructor-name)

Returns a list containing a value-node for an exemplar value of a type created by constructor CONSTRUCTOR-NAME (which will usually be the name of a built-in type such as Number)

Package

jwacs.

Source

type-analysis.lisp.

Function: get-instance-node (graph constructor &optional queue)

Returns a node representing an instance of the type(s) constructed by CONSTRUCTOR. CONSTRUCTOR is either the name of a location-node to retrieve from GRAPH, or a node in GRAPH representing the constructor.

For Object and Array types, a new instance node is
created. For all other types, the same ’exemplar node’ is used for all instances.

If QUEUE is non-NIL and the constructor node had to be created, then the new node will be queued for processing.

Package

jwacs.

Source

type-analysis.lisp.

Function: get-location-node (graph name &optional queue)

Return the location node named NAME from GRAPH, creating it if necessary. If the node is created and QUEUE is non-NIL, then the new node will be queued for processing.

Package

jwacs.

Source

type-analysis.lisp.

Function: get-module-text (module)

Reads the entire text of a module.

Package

jwacs.

Source

compiler.lisp.

Function: get-node-argument (graph node index)

Return the location node pointed to by NODE’s INDEXth argument, creating it in GRAPH if necessary

Package

jwacs.

Source

type-analysis.lisp.

Function: get-node-property (graph node name &optional queue)

Return the location node pointed to by NODE’s NAME property, creating it in GRAPH if necessary. If the property node is created, then it will be queued for processing if QUEUE is non-NIL.

Package

jwacs.

Source

type-analysis.lisp.

Function: get-return-node (graph node &optional queue)

Returns the return-node of type-graph-node NODE, creating it in GRAPH if necessary. If NODE is created then it will be added to QUEUE if QUEUE is non-NIL.

Package

jwacs.

Source

type-analysis.lisp.

Function: get-this-context-node (graph node &optional queue)

Returns the this-context-node of value-node NODE, creating it if necessary. If a new node is created then it will be added to QUEUE if QUEUE is non-NIL.

Package

jwacs.

Source

type-analysis.lisp.

Function: goto-equal-p (g1 g2)
Package

yacc.

Source

yacc.lisp.

Function: goto-p (object)
Package

yacc.

Source

yacc.lisp.

Reader: goto-symbol (instance)
Writer: (setf goto-symbol) (instance)
Package

yacc.

Source

yacc.lisp.

Target Slot

symbol.

Reader: goto-target (instance)
Writer: (setf goto-target) (instance)
Package

yacc.

Source

yacc.lisp.

Target Slot

target.

Reader: grammar-%symbols (instance)
Writer: (setf grammar-%symbols) (instance)
Package

yacc.

Source

yacc.lisp.

Target Slot

%symbols.

Reader: grammar-derives-epsilon (instance)
Writer: (setf grammar-derives-epsilon) (instance)
Package

yacc.

Source

yacc.lisp.

Target Slot

derives-epsilon.

Reader: grammar-derives-first (instance)
Writer: (setf grammar-derives-first) (instance)
Package

yacc.

Source

yacc.lisp.

Target Slot

derives-first.

Reader: grammar-derives-first-terminal (instance)
Writer: (setf grammar-derives-first-terminal) (instance)
Package

yacc.

Source

yacc.lisp.

Target Slot

derives-first-terminal.

Function: grammar-discard-memos (grammar)
Package

yacc.

Source

yacc.lisp.

Function: grammar-epsilon-productions (grammar)
Package

yacc.

Source

yacc.lisp.

Reader: grammar-name (instance)
Writer: (setf grammar-name) (instance)
Package

yacc.

Source

yacc.lisp.

Target Slot

name.

Function: grammar-p (object)
Package

yacc.

Source

yacc.lisp.

Reader: grammar-precedence (instance)
Writer: (setf grammar-precedence) (instance)
Package

yacc.

Source

yacc.lisp.

Target Slot

precedence.

Reader: grammar-productions (instance)
Writer: (setf grammar-productions) (instance)
Package

yacc.

Source

yacc.lisp.

Target Slot

productions.

Function: grammar-symbols (grammar)

The set of symbols (both terminal and nonterminal) of GRAMMAR.

Package

yacc.

Source

yacc.lisp.

Reader: grammar-terminals (instance)
Writer: (setf grammar-terminals) (instance)
Package

yacc.

Source

yacc.lisp.

Target Slot

terminals.

Function: handle-conflict (a1 a2 grammar action-productions id s &optional muffle-conflicts)

Decide what to do with a conflict between A1 and A2 in state ID on symbol S. Returns three actions: the chosen action, the number of new sr and rr.

Package

yacc.

Source

yacc.lisp.

Function: idempotent-expression-p (elm)

Return true if ELM is an ’idempotent expression’, ie one which it is safe to add repetitions of

Package

jwacs.

Source

js-source-model.lisp.

Function: identifier-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf identifier-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: identifier-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf identifier-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Reader: identifier-name (instance)
Writer: (setf identifier-name) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

name.

Function: identifier-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Function: identifier-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf identifier-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Reader: if-statement-condition (instance)
Writer: (setf if-statement-condition) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

condition.

Reader: if-statement-else-statement (instance)
Writer: (setf if-statement-else-statement) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

else-statement.

Function: if-statement-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf if-statement-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: if-statement-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf if-statement-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: if-statement-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Function: if-statement-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf if-statement-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Reader: if-statement-then-statement (instance)
Writer: (setf if-statement-then-statement) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

then-statement.

Function: import-decl-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf import-decl-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: import-decl-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf import-decl-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: import-decl-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Function: import-decl-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf import-decl-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Reader: import-decl-type-symbol (instance)
Writer: (setf import-decl-type-symbol) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

type-symbol.

Reader: import-decl-uripath (instance)
Writer: (setf import-decl-uripath) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

uripath.

Function: inlineable-call-target (fn-elm)

Return non-NIL if it is definitely safe to use FN-ELM as the target of an inlined call (rather than one that has been indirected through $call)

Package

jwacs.

Source

runtime-transformation.lisp.

Function: item-action (item)
Package

yacc.

Source

yacc.lisp.

Function: item-action-form (item)
Package

yacc.

Source

yacc.lisp.

Function: item-derives (item)
Package

yacc.

Source

yacc.lisp.

Function: item-dot-left (item)
Package

yacc.

Source

yacc.lisp.

Function: item-dot-right (item &optional n)
Package

yacc.

Source

yacc.lisp.

Function: item-dot-right-p (item)
Package

yacc.

Source

yacc.lisp.

Function: item-dot-symbol (item)
Package

yacc.

Source

yacc.lisp.

Function: item-equal-p (i1 i2)

Equality predicate for LR(0) items.

Package

yacc.

Source

yacc.lisp.

Reader: item-lookahead (instance)
Writer: (setf item-lookahead) (instance)
Package

yacc.

Source

yacc.lisp.

Target Slot

lookahead.

Reader: item-lookaheads (instance)
Writer: (setf item-lookaheads) (instance)
Package

yacc.

Source

yacc.lisp.

Target Slot

lookaheads.

Function: item-lr1-equal-p (i1 i2)

Equality predicate for LR(1) items.

Package

yacc.

Source

yacc.lisp.

Function: item-lr1-hash-value (item)

Returns an object suitable for keying associations of LR1-items.

Package

yacc.

Source

yacc.lisp.

Function: item-p (object)
Package

yacc.

Source

yacc.lisp.

Reader: item-position (instance)
Writer: (setf item-position) (instance)
Package

yacc.

Source

yacc.lisp.

Target Slot

position.

Reader: item-production (instance)
Writer: (setf item-production) (instance)
Package

yacc.

Source

yacc.lisp.

Target Slot

production.

Function: item-set-equal-p (c1 c2)

Equality predicate for sorted sets of LR(0) items.

Package

yacc.

Source

yacc.lisp.

Function: item-shift (item &optional n)
Package

yacc.

Source

yacc.lisp.

Function: item-symbol (item)
Package

yacc.

Source

yacc.lisp.

Function: item< (i1 i2)

Total strict order on LR(0) items.

Package

yacc.

Source

yacc.lisp.

Function: items-closure (items grammar)

Compute the closure of a set of LR(1) items.

Package

yacc.

Source

yacc.lisp.

Reader: kernel-gotos (instance)
Writer: (setf kernel-gotos) (instance)
Package

yacc.

Source

yacc.lisp.

Target Slot

gotos.

Reader: kernel-id (instance)
Writer: (setf kernel-id) (instance)
Package

yacc.

Source

yacc.lisp.

Target Slot

id.

Function: kernel-item (kernel)

The item in a singleton set of items.

Package

yacc.

Source

yacc.lisp.

Reader: kernel-items (instance)
Writer: (setf kernel-items) (instance)
Package

yacc.

Source

yacc.lisp.

Target Slot

items.

Function: kernel-p (object)
Package

yacc.

Source

yacc.lisp.

Function: line-terminator-p (c)

Return non-NIL if C is a line-terminator character according to the Javascript spec

Package

jwacs.

Source

lex-javascript.lisp.

Reader: location-node-arguments (instance)
Writer: (setf location-node-arguments) (instance)
Package

jwacs.

Source

type-analysis.lisp.

Target Slot

arguments.

Package

jwacs.

Source

type-analysis.lisp.

Package

jwacs.

Source

type-analysis.lisp.

Reader: location-node-assignments (instance)
Writer: (setf location-node-assignments) (instance)
Package

jwacs.

Source

type-analysis.lisp.

Target Slot

assignments.

Reader: location-node-min-call-arity (instance)
Writer: (setf location-node-min-call-arity) (instance)
Package

jwacs.

Source

type-analysis.lisp.

Target Slot

min-call-arity.

Function: location-node-name (instance)
Package

jwacs.

Source

type-analysis.lisp.

Function: (setf location-node-name) (instance)
Package

jwacs.

Source

type-analysis.lisp.

Function: location-node-p (object)
Package

jwacs.

Source

type-analysis.lisp.

Function: location-node-properties (instance)
Package

jwacs.

Source

type-analysis.lisp.

Function: (setf location-node-properties) (instance)
Package

jwacs.

Source

type-analysis.lisp.

Function: location-node-return-node (instance)
Package

jwacs.

Source

type-analysis.lisp.

Function: (setf location-node-return-node) (instance)
Package

jwacs.

Source

type-analysis.lisp.

Reader: location-node-this-bindings (instance)
Writer: (setf location-node-this-bindings) (instance)
Package

jwacs.

Source

type-analysis.lisp.

Target Slot

this-bindings.

Function: lookup-module-type (raw-type)

Converts a ’raw’ module type into a canonical type symbol. A warning will be signalled for unrecognized raw types. RAW-TYPE should be either a string or a symbol.

The recognized types are:

Symbol | Description | Extensions ——-|————————|—————— ’JW | jwacs source | .jw, .jwa, .jwacs ’JS | Javascript source | .js

Package

jwacs.

Source

compiler.lisp.

Function: lr0-item-p (object)
Package

yacc.

Source

yacc.lisp.

Function: lr1-add (item collection)

Add ITEM to COLLECTION.

Package

yacc.

Source

yacc.lisp.

Function: lr1-add-collection (items collection)

Add all the elements of ITEMS to COLLECTION.

Package

yacc.

Source

yacc.lisp.

Function: lr1-collection-empty-p (collection)
Package

yacc.

Source

yacc.lisp.

Function: lr1-find (item collection)

Find an LR(1) item equal to ITEM in COLLECTION, or NIL.

Package

yacc.

Source

yacc.lisp.

Function: lr1-item-p (object)
Package

yacc.

Source

yacc.lisp.

Function: lr1-item-shift (item &optional n)
Package

yacc.

Source

yacc.lisp.

Function: make-accept-action (&key)
Package

yacc.

Source

yacc.lisp.

Function: make-add-handler (&key label start end handler thunk-body)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-array-literal (&key label start end elements)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-binary-operator (&key label start end op-symbol left-arg right-arg)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-boxed-result (elm)

Returns an object literal whose ‘done‘ field is ‘true‘ and whose ‘result‘ field contains ELM. If ELM is NIL, the result field will be left undefined.

Package

jwacs.

Source

trampoline-transformation.lisp.

Function: make-boxed-thunk (body-elm &optional stack-op stack-op-arg)

Returns an object literal whose ‘done‘ field is ‘false‘ and whose ‘thunk‘ field contains a thunk whose body is BODY-ELM. When STACK-OP is non-NIL, a handler stack operation property will also be added with a value of STACK-OP-ARG. When *DEBUG-MODE* is non-NIL, an ‘$evalArg‘ parameter is also provided, along with boilerplate code that evaluates the argument and then returns when it’s present.

Package

jwacs.

Source

trampoline-transformation.lisp.

Function: make-break-statement (&key label start end target-label)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-call-style-guard (fn-name)

Builds a if statement that checks whether the incoming continuation argument is actually a continuation. If it isn’t, then (on the assumption that this is an incoming direct-style call), re-calls the current function (whose name is FN-NAME) with a default continuation parameter (‘$id‘) followed by the original incoming parameters

Package

jwacs.

Source

runtime-transformation.lisp.

Function: make-case-clause (&key label start end value body)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-catch-clause (&key label start end binding body)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-comma-expr (&key label start end exprs)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-conditional (&key label start end condition true-arg false-arg)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-continuation-call (&key label start end fn args)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-continuation-function (&key label start end name parameters body)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-continue-statement (&key label start end target-label)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-default-clause (&key label start end body)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-do-statement (&key label start end condition body)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-dot-graph (type-graph &optional fname)
Package

jwacs.

Source

type-analysis.lisp.

Function: make-error-action (&key)
Package

yacc.

Source

yacc.lisp.

Function: make-expression (&key label start end)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-finally-clause (&key label start end body)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-fn-call (&key label start end fn args)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-for (&key label start end initializer condition step body)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-for-in (&key label start end binding collection body)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-forin-assign (elm new-array new-count-rec)

Creates the assignment that spoofs our iterating through the for-in collection. Just assigns the orignal iterator var from the for-in a value from our new array of values, which we are iterating through using a while loop and the variable new-count-rec

Package

jwacs.

Source

loop-transformation.lisp.

Function: make-function-decl (&key label start end name parameters body)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-function-expression (&key label start end name parameters body)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-goto (symbol target)
Package

yacc.

Source

yacc.lisp.

Function: make-hash-table-from-lr1-list (l)
Package

yacc.

Source

yacc.lisp.

Function: make-identifier (&key label start end name)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-if-statement (&key label start end condition then-statement else-statement)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-import-decl (&key label start end type-symbol uripath)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-item (production position)
Package

yacc.

Source

yacc.lisp.

Function: make-kernel (items &optional kernels)
Package

yacc.

Source

yacc.lisp.

Function: make-keyword (x)

Makes a keyword out of a symbol.

Package

jwacs.

Source

source-transformations.lisp.

Function: make-labelled-catch-continuation (name catch-clause &optional tail-resume-elm)

Returns a labelled continuation that can be used as a catch handler based on CATCH-CLAUSE. The continuation will accept an argument that represents the binding in the clause. Returns a var-init statement that assigns the catch continuation to a var named NAME.
If TAIL-RESUME-ELM is non-NIL, it will be added as the last statement of the handler function. It should be a resume statement that resumes the tail continuation for unterminated catch clauses.

Package

jwacs.

Source

cps-transformation.lisp.

Function: make-labelled-continuation (name statement-tail)

Constructs a continuation from STATEMENT-TAIL and returns a var-decl-statement that initializes a variable named NAME to the new continuation. Note that labelled continuations accept no arguments.

Package

jwacs.

Source

cps-transformation.lisp.

Function: make-lexer-function (lexer)

Returns a function of 0 arguments that calls NEXT-TOKEN on LEXER whenever it is called. This is normally the function that gets passed into a parser.

Package

jwacs.

Source

lex-javascript.lisp.

Function: make-location-node (&key name properties assignment-backlinks return-node assignments arguments this-bindings min-call-arity)
Package

jwacs.

Source

type-analysis.lisp.

Function: make-lr1-collection (&optional same-kind-as)
Package

yacc.

Source

yacc.lisp.

Function: make-lr1-item (production position lookahead)
Package

yacc.

Source

yacc.lisp.

Function: make-main-module (main-pathname inline-text)

Constructs a module for the file located at PATH, assuming that the uripath ’.’ points to MAIN-PATHNAME’s directory. If INLINE-TEXT is non-NIL, the module will be an in-memory module.

Package

jwacs.

Source

compiler.lisp.

Function: make-module (&key type path uripath import-elm parent-module compressed-p text inline-stream)
Package

jwacs.

Source

compiler.lisp.

Function: make-new-expr (&key label start end constructor args)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-node-queue (&key test)

Create an empty NODE-QUEUE

Package

jwacs.

Source

type-analysis.lisp.

Function: make-node-queue-container (&key root-entry lookup)
Package

jwacs.

Source

type-analysis.lisp.

Function: make-node-queue-entry (&key prev next item)
Package

jwacs.

Source

type-analysis.lisp.

Function: make-numeric-literal (&key label start end value)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-object-literal (&key label start end properties)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-property-access (&key label start end target field)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-re-literal (&key label start end pattern options)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-reduce-action (symbol length &key action action-form)
Package

yacc.

Source

yacc.lisp.

Function: make-remove-handler (&key label start end handler thunk-body)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-resume-statement (&key label start end target arg)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-return-statement (&key label start end arg)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-shift-action (state)
Package

yacc.

Source

yacc.lisp.

Function: make-source-element (&key label start end)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-special-value (&key label start end symbol)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-statement-block (&key label start end statements)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-string-literal (&key label start end value)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-suspend-statement (&key label start end)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-switch (&key label start end value clauses)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-tail-call-continuation (cont-id lexically-active-handlers)

If LEXICALLY-ACTIVE-HANDLERS is non-NIL, returns a continuation function that removes all of the active handlers and then calls the continuation represented by CONT-ID; otherwise returns CONT-ID.

Package

jwacs.

Source

cps-transformation.lisp.

Function: make-throw-statement (&key label start end value target)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-thunk-function (&key label start end name parameters body)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-token (&key terminal value start end)
Package

jwacs.

Source

lex-javascript.lisp.

Function: make-try (&key label start end body catch-clause finally-clause)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-type-graph-node (&key name properties assignment-backlinks return-node)
Package

jwacs.

Source

type-analysis.lisp.

Function: make-unary-operator (&key label start end op-symbol arg)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-value-node (&key name properties assignment-backlinks return-node constructor-name parameters this-context-node prototype-node continuation-node)
Package

jwacs.

Source

type-analysis.lisp.

Function: make-var-decl (&key label start end name initializer)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-var-decl-statement (&key label start end var-decls)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-var-init (var-name init-value)

Create a VAR-DECL-STATEMENT that initializes a variable named VAR-NAME to INIT-VALUE

Package

jwacs.

Source

js-source-model.lisp.

Function: make-void-continuation (current-cont)

Returns a function expression that calls CURRENT-CONT with no arguments. This allows us to preserve the behaviour of functions that return no value.

Package

jwacs.

Source

cps-transformation.lisp.

Function: make-while (&key label start end condition body)
Package

jwacs.

Source

js-source-model.lisp.

Function: make-with (&key label start end scope-object body)
Package

jwacs.

Source

js-source-model.lisp.

Function: map-lr1-collection (f collection)

Apply F to all elements of COLLECTION.

Package

yacc.

Source

yacc.lisp.

Function: maptree (fn tree)

MAPTREE maps a function over a tree of cons cells.
If TREE is NIL, returns NIL.
If TREE is a cons cell, recursively calls MAPTREE on the CAR and CDR and returns a new cons cell whose CAR and CDR are the results.
Otherwise, returns the result of applying FN to TREE.

Package

jwacs.

Source

general-utilities.lisp.

Function: maybe-terminate-toplevel (elm-list)

When *IN-LOCAL-SCOPE* is NIL, returns a list of source elements that is guaranteed to be correctly terminated for the toplevel. When *IN-LOCAL-SCOPE* is non-NIL, ELM-LIST is returned unchanged.
’Correctly terminated for the toplevel’ means that if there are any effective function calls, then all control paths are terminated by either a suspend, resume, or throw statement.

Package

jwacs.

Source

cps-transformation.lisp.

Function: memq (item list)

MEMBER :TEST #’EQ

Package

yacc.

Source

yacc.lisp.

Function: min* (left right)

Returns the minimum of LEFT and RIGHT. Either or both arguments may be NIL. NIL is treated as being larger than any other value.

Package

jwacs.

Source

type-analysis.lisp.

Reader: module-compressed-p (instance)
Writer: (setf module-compressed-p) (instance)
Package

jwacs.

Source

compiler.lisp.

Target Slot

compressed-p.

Reader: module-import-elm (instance)
Writer: (setf module-import-elm) (instance)
Package

jwacs.

Source

compiler.lisp.

Target Slot

import-elm.

Reader: module-inline-stream (instance)
Writer: (setf module-inline-stream) (instance)
Package

jwacs.

Source

compiler.lisp.

Target Slot

inline-stream.

Function: module-p (object)
Package

jwacs.

Source

compiler.lisp.

Reader: module-parent-module (instance)
Writer: (setf module-parent-module) (instance)
Package

jwacs.

Source

compiler.lisp.

Target Slot

parent-module.

Reader: module-path (instance)
Writer: (setf module-path) (instance)
Package

jwacs.

Source

compiler.lisp.

Target Slot

path.

Reader: module-text (instance)
Writer: (setf module-text) (instance)
Package

jwacs.

Source

compiler.lisp.

Target Slot

text.

Reader: module-type (instance)
Writer: (setf module-type) (instance)
Package

jwacs.

Source

compiler.lisp.

Target Slot

type.

Reader: module-uripath (instance)
Writer: (setf module-uripath) (instance)
Package

jwacs.

Source

compiler.lisp.

Target Slot

uripath.

Function: nested-explicitize (elm)

Call TX-EXPLICITIZE on ELM in a nested context (ie, with *NESTED-CONTEXT* bound to T)

Package

jwacs.

Source

explicitize-transformation.lisp.

Reader: new-expr-args (instance)
Writer: (setf new-expr-args) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

args.

Reader: new-expr-constructor (instance)
Writer: (setf new-expr-constructor) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

constructor.

Function: new-expr-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf new-expr-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: new-expr-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf new-expr-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: new-expr-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Function: new-expr-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf new-expr-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: next-token (lexer)

Returns a token structure containing the next token in the lexing operation represented by LEXER. This token will have a terminal of NIL at end of stream. The next token will be fetched from the unget-stack if that stack is non-empty.

Package

jwacs.

Source

lex-javascript.lisp.

Reader: node-queue-container-lookup (instance)
Writer: (setf node-queue-container-lookup) (instance)
Package

jwacs.

Source

type-analysis.lisp.

Target Slot

lookup.

Function: node-queue-container-p (object)
Package

jwacs.

Source

type-analysis.lisp.

Reader: node-queue-container-root-entry (instance)
Writer: (setf node-queue-container-root-entry) (instance)
Package

jwacs.

Source

type-analysis.lisp.

Target Slot

root-entry.

Reader: node-queue-entry-item (instance)
Writer: (setf node-queue-entry-item) (instance)
Package

jwacs.

Source

type-analysis.lisp.

Target Slot

item.

Reader: node-queue-entry-next (instance)
Writer: (setf node-queue-entry-next) (instance)
Package

jwacs.

Source

type-analysis.lisp.

Target Slot

next.

Function: node-queue-entry-p (object)
Package

jwacs.

Source

type-analysis.lisp.

Reader: node-queue-entry-prev (instance)
Writer: (setf node-queue-entry-prev) (instance)
Package

jwacs.

Source

type-analysis.lisp.

Target Slot

prev.

Function: node-queue-size (queue)

Return the number of nodes stored in QUEUE

Package

jwacs.

Source

type-analysis.lisp.

Function: number-kernels (kernels)

Set a unique ID for all kernels in KERNELS.

Package

yacc.

Source

yacc.lisp.

Function: numeric-literal-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf numeric-literal-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: numeric-literal-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf numeric-literal-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: numeric-literal-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Function: numeric-literal-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf numeric-literal-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Reader: numeric-literal-value (instance)
Writer: (setf numeric-literal-value) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

value.

Function: object-literal-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf object-literal-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: object-literal-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf object-literal-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: object-literal-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Reader: object-literal-properties (instance)
Writer: (setf object-literal-properties) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

properties.

Function: object-literal-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf object-literal-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: parse-file (path)

Load the file at PATH and parse it into a js/jw source model

Package

jwacs.

Source

parse-javascript.lisp.

Function: parse-grammar (forms)
Package

yacc.

Source

yacc.lisp.

Function: parse-javascript-integer (integer-str &key start end)

Parse integer literals, taking account of 0x and 0 radix-specifiers

Package

jwacs.

Source

lex-javascript.lisp.

Function: parse-module (module)

Parse the source text contained in MODULE and return a js/jw source-model

Package

jwacs.

Source

compiler.lisp.

Function: parse-prefix-lookup (raw-str)

Takes the argument to the prefix lookup command line option and parses it into a prefix-lookup table.

Package

jwacs.

Source

main.lisp.

Function: parse-production (form)
Package

yacc.

Source

yacc.lisp.

Reader: parser-action (instance)
Writer: (setf parser-action) (instance)
Package

yacc.

Source

yacc.lisp.

Target Slot

action.

Reader: parser-goto (instance)
Writer: (setf parser-goto) (instance)
Package

yacc.

Source

yacc.lisp.

Target Slot

goto.

Function: parser-p (object)
Package

yacc.

Source

yacc.lisp.

Reader: parser-states (instance)
Writer: (setf parser-states) (instance)
Package

yacc.

Source

yacc.lisp.

Target Slot

states.

Function: pathnames-equal (path1 path2)

Return non-NIL if PATH1 and PATH2 are equivalent. This function avoids some of the
complexity that pathnames can entail by comparing the namestrings of the two paths
rather than the paths themselves. That way we don’t have to worry about spurious distinctions between :UNSPECIFIED and NIL, :NEWEST and NIL and some actual version number, etc.

Package

jwacs.

Source

general-utilities.lisp.

Function: pipeline-compile (elm &optional pipeline)

Applies the transformations specified in PIPELINE to ELM in order. ELM may be either a source-element or a list of source-elements.

Package

jwacs.

Source

compiler.lisp.

Function: populate-type-graph (elm)

Populate a type-graph with nodes and initial edges based on source-element ELM

Package

jwacs.

Source

type-analysis.lisp.

Function: position-to-line/column (text index)

Returns a cons cell containing the 1-based row and column for the character at INDEX in TEXT.

Package

jwacs.

Source

lex-javascript.lisp.

Function: postpend (list-arg atom-arg)

Appends a list containing ATOM-ARG to LIST-ARG. eg: (POSTPEND ’(1 2) 3) ===> ’(1 2 3)

Package

jwacs.

Source

general-utilities.lisp.

Function: prefix-p (string prefix)

return: whether prefix is a prefix of the string.

Package

jwacs.

Source

general-utilities.lisp.

Function: pretty-print-arg (arg-elm parent-elm s &optional associativity)

Pretty print an argument subexpression, parenthesizing if:
1. The sub-expression has a lower precedence than the parent expression, or 2. The sub-expression and the parent expression have the same precedence and this arg is on the non-associative branch.

Package

jwacs.

Source

pretty-print.lisp.

Function: pretty-print-separated-list (elm-list s &optional sep-string)

Pretty print the elements of ELM-LIST to S separated by SEP-STRING.

Package

jwacs.

Source

pretty-print.lisp.

Function: print-action (a s d)
Package

yacc.

Source

yacc.lisp.

Function: print-derives-epsilon (grammar &optional stream)
Package

yacc.

Source

yacc.lisp.

Function: print-first-terminals (grammar &optional stream)

Print FIRST (without epsilon) for all symbols of GRAMMAR.

Package

yacc.

Source

yacc.lisp.

Function: print-goto-graph (kernels &optional stream)

Print the goto graph defined by KERNELS.

Package

yacc.

Source

yacc.lisp.

Function: print-item (i s d)
Package

yacc.

Source

yacc.lisp.

Function: print-kernel (k s d)
Package

yacc.

Source

yacc.lisp.

Function: print-production (p s d)
Package

yacc.

Source

yacc.lisp.

Function: print-states (kernels lookaheads &optional stream)
Package

yacc.

Source

yacc.lisp.

Reader: production-action (instance)
Writer: (setf production-action) (instance)
Package

yacc.

Source

yacc.lisp.

Target Slot

action.

Reader: production-action-form (instance)
Writer: (setf production-action-form) (instance)
Package

yacc.

Source

yacc.lisp.

Target Slot

action-form.

Reader: production-derives (instance)
Writer: (setf production-derives) (instance)
Package

yacc.

Source

yacc.lisp.

Target Slot

derives.

Function: production-equal-p (p1 p2)

Equality predicate for productions within a single grammar

Package

yacc.

Source

yacc.lisp.

Reader: production-id (instance)
Writer: (setf production-id) (instance)
Package

yacc.

Source

yacc.lisp.

Target Slot

id.

Function: production-p (object)
Package

yacc.

Source

yacc.lisp.

Reader: production-symbol (instance)
Writer: (setf production-symbol) (instance)
Package

yacc.

Source

yacc.lisp.

Target Slot

symbol.

Function: production< (p1 p2)

Total order on productions within a single grammar

Package

yacc.

Source

yacc.lisp.

Function: property-access-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf property-access-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Reader: property-access-field (instance)
Writer: (setf property-access-field) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

field.

Function: property-access-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf property-access-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: property-access-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Function: property-access-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf property-access-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Reader: property-access-target (instance)
Writer: (setf property-access-target) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

target.

Function: push-token (lexer token &optional encountered-line-terminator)

Push a token onto the top of LEXER’s unget stack. The next token fetched by NEXT-TOKEN will be the pushed token. The state of the ENCOUNTERED-LINE-TERMINATOR flag is also saved and will be restored by the next NEXT-TOKEN call.

Package

jwacs.

Source

lex-javascript.lisp.

Function: re-cond-clause (string start block-name clause)
Package

jwacs.

Source

lexer-macros.lisp.

Function: re-literal-end (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf re-literal-end) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: re-literal-label (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf re-literal-label) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Reader: re-literal-options (instance)
Writer: (setf re-literal-options) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

options.

Function: re-literal-p (object)
Package

jwacs.

Source

js-source-model.lisp.

Reader: re-literal-pattern (instance)
Writer: (setf re-literal-pattern) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Target Slot

pattern.

Function: re-literal-start (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: (setf re-literal-start) (instance)
Package

jwacs.

Source

js-source-model.lisp.

Function: read-asdf-component-text (component-path)

Returns the contents of a file that is a component of a currently-loaded asdf system. COMPONENT-PATH is a path describing the location of the component to read. It should have at least 2 elements.
The first element is a symbol naming a system.
The last element is a string naming a component.
There may be intermediate strings naming intermediate modules. Eg:

(:JWACS-TESTS "tests" "test-cps-transformation")

names the test-cps-transformation component, which is part of the tests module, which is part of the :JWACS-TESTS system.

Package

jwacs.

Source

general-utilities.lisp.

Function: read-entire-file (path)

Reads the entire contents of the file located at PATH and returns it as a string

Package

jwacs.

Source

general-utilities.lisp.

Reader: reduce-action-action (instance)
Writer: (setf reduce-action-action) (instance)
Package

yacc.

Source

yacc.lisp.

Target Slot

action.

Reader: reduce-action-action-form (instance)
Writer: (setf reduce-action-action-form) (instance)