Class Index | File Index

Classes


Class EBNFParser

Represents EBNF Parser Generator Object
Defined in: generator03.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
EBNFParser(syntax, gapFree, name, ver, ignoreCase)
EBNF Parser Generator Object
Field Summary
Field Attributes Field Name and Description
 
buf
syntax buffer
 
array of gap free id
 
true if ignore case
 
name of the parser
 
ptr
syntax buffer pointer
 
ver
version of the parser
Method Summary
Method Attributes Method Name and Description
 
alternative = sequence, {'|', sequence}.
 
character = symbol | letter | digit.
 
group = '(', alternative, ')'.
 
id()
id = letter, {letter | digit}.
 
idl()
idl = letter, {letter | digit}.
 
letter = lower | upper.
 
option = '[', alternative, ']'.
 
primary = terminal | id | repeat | option | group.
 
repeat = '{', alternative, '}'.
 
rule()
rule = idl, '=', alternative, '.
 
run(n, match, parser)
Parser Runner (Generator) for EBNF Syntax
 
sequence = term, {',', term}.
 
symbol = '=' | ',' | '.
 
syntax = rule, {rule}.
 
term()
term = primary.
 
terminal = sq, character, {character}, sq.
Class Detail
EBNFParser(syntax, gapFree, name, ver, ignoreCase)
EBNF Parser Generator Object
Parameters:
{String} syntax
syntax object for generate parser
{Object} gapFree
array of gap free id
{String} name
name of the parser
{String} ver
version of the parser
{Boolean} ignoreCase
true if ignore case (optional)
Since:
0.2
Field Detail
{String} buf
syntax buffer

{Object} gapFree
array of gap free id

{Boolean} ignoreCase
true if ignore case

{String} name
name of the parser

{Integer} ptr
syntax buffer pointer

{String} ver
version of the parser
Method Detail
{String} alternative()
alternative = sequence, {'|', sequence}.
Since:
0.2
Returns:
{String} code generated if matched, null if not matched

{String} character()
character = symbol | letter | digit.
Since:
0.2
Returns:
{String} code generated if matched, null if not matched

{String} group()
group = '(', alternative, ')'.
Since:
0.2
Returns:
{String} code generated if matched, null if not matched

{String} id()
id = letter, {letter | digit}.
Since:
0.2
Returns:
{String} code generated if matched, null if not matched

{String} idl()
idl = letter, {letter | digit}.
Since:
0.2
Returns:
{String} code generated if matched, null if not matched

{String} letter()
letter = lower | upper.
Since:
0.2
Returns:
{String} code generated if matched, null if not matched

{String} option()
option = '[', alternative, ']'.
Since:
0.2
Returns:
{String} code generated if matched, null if not matched

{String} primary()
primary = terminal | id | repeat | option | group.
Since:
0.2
Returns:
{String} code generated if matched, null if not matched

{String} repeat()
repeat = '{', alternative, '}'.
Since:
0.2
Returns:
{String} code generated if matched, null if not matched

{String} rule()
rule = idl, '=', alternative, '.'.
Since:
0.2
Returns:
{String} code generated if matched, null if not matched

{String} run(n, match, parser)
Parser Runner (Generator) for EBNF Syntax
Parameters:
{String} n
number of match
{Object} match
array of parsed result
{String} parser
caller method name
Since:
0.2
Returns:
{String} generated code

{String} sequence()
sequence = term, {',', term}.
Since:
0.2
Returns:
{String} code generated if matched, null if not matched

{String} symbol()
symbol = '=' | ',' | '.' | '|' | '+' | '-' | '*' | '/' | '[' | ']' | '{' | '}' | '(' | ')'.
Since:
0.3
Returns:
{String} code generated if matched, null if not matched

{String} syntax()
syntax = rule, {rule}.
Since:
0.2
Returns:
{String} code generated if matched, null if not matched

{String} term()
term = primary.
Since:
0.2
Returns:
{String} code generated if matched, null if not matched

{String} terminal()
terminal = sq, character, {character}, sq.
Since:
0.2
Returns:
{String} code generated if matched, null if not matched

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 21 2014 23:48:48 GMT+0900 (JST)