Class: Set

EBNF~ Set

Class representing a set of unique, non-empty names.


new Set(names)

Create a set containing some unique names.

Parameters:
Name Type Argument Description
names Array.<string> <repeatable>

to be in the set, implied to be unique.

Properties:
Name Type Description
set Object.<string, boolean>

maps names to true.

length number

the number of names in the set.

Source:

Methods


import(other)

Import another set.

Parameters:
Name Type Description
other module:EBNF~Set

to import.

Source:
Returns:

this set, changed.

Type
module:EBNF~Set

includes(other)

Check if this set includes another set.

Parameters:
Name Type Description
other module:EBNF~Set

the other set.

Source:
Returns:

true if the other set is a subset of this set.

Type
boolean

match(tuple)

Check if next input matches.

Parameters:
Name Type Argument Description
tuple module:Base~Tuple <nullable>

next available input symbol.

Source:
Returns:

true if matched, false otherwise.

Type
boolean

overlap(other)

Check if two sets overlap.

Parameters:
Name Type Description
other module:EBNF~Set

the other set.

Source:
Returns:

the overlap, a new set, may be empty.

Type
module:EBNF~Set

toString()

Displays the elements.

Source: