-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
I've just added jscc grammar to https://mingodad.github.io/parsertl-playground/playground/ an Yacc/Lex compatible browser based interpreter/editor (select Jscc parser from Examples then click Parse to see a parse tree for the content in Input source) and also generated an EBNF undertood by https://github.com/GuntherRademacher/rr to generate a nice navigable railroad diagram (see bellow with instructions at the top).
//
// EBNF to be viewd at
// (IPV6) https://www.bottlecaps.de/rr/ui
// (IPV4) https://rr.red-dove.com/ui
//
// Copy and paste this at one of the urls shown above in the 'Edit Grammar' tab
// then click the 'View Diagram' tab.
//
def::=
header_code token_assocs "##" grammar_defs footer_code
header_code::=
code_opt
footer_code::=
code_opt
token_assocs::=
token_assocs token_assoc
| token_assoc
token_assoc::=
PREC_LEFT token_defs ';'
| PREC_RIGHT token_defs ';'
| PREC_NONASSOC token_defs ';'
| token_defs ';'
| WS_IGNORE string opt_semicolon
token_defs::=
token_defs token_def
| token_def
token_def::=
string identifier code_opt
| string code_opt
grammar_defs::=
grammar_defs grammar_def
| grammar_def
grammar_def::=
identifier ':' productions ';'
productions::=
productions '|' rhs
| rhs
rhs::=
sequence_opt rhs_prec code_opt
rhs_prec::=
'&' identifier
| '&' string
| /*%empty*/
sequence_opt::=
sequence
| /*%empty*/
sequence::=
sequence symbol
| symbol
symbol::=
identifier
| string
| ON_ERROR
code_opt::=
code
| "=>" identifier
| "=>" CODE
| /*%empty*/
code::=
code CODE
| CODE
string::=
STRING_SINGLE
| STRING_DOUBLE
identifier::=
IDENT
opt_semicolon::=
';'
| /*%empty*/
//Tokens
PREC_LEFT ::= "<"
PREC_RIGHT::= ">"
PREC_NONASSOC ::= "^"
WS_IGNORE ::= "!"
ON_ERROR ::= "~"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels