How to use the railroad-diagrams.Sequence function in railroad-diagrams

To help you get started, we’ve selected a few railroad-diagrams examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dbis-uibk / relax / calc2 / views / help.tsx View on Github external
Sequence('AS', NonTerminal('output_name'))
																					)
																			),
																			','
																	),
															),

															Terminal('FROM', '#sql-from'),
															OneOrMore(
																	Choice(
																			0,
																			Sequence(
																					NonTerminal('table_name'),
																					Optional(Sequence('AS', NonTerminal('alias')))
																			),
																			Sequence(
																					'(', NonTerminal('select'), ')',
																					Sequence('AS', NonTerminal('alias'))
																			)
																	),
																	',',
															),
													),

													OneOrMore(
															Choice(
																	0,
																	Skip(),
																	Sequence(
																			Choice(
																					0,
																					Sequence(',', Comment('old syntax for cross join')),
github dbis-uibk / relax / calc2 / views / help.tsx View on Github external
<strong>from_item</strong>
				<strong>from_item</strong> {'{'} LEFT | RIGHT | FULL } [ OUTER ] JOIN ON join_condition
				<strong>from_item</strong>
				<strong>from_item</strong> {'{'} LEFT | RIGHT | FULL } [ OUTER ] JOIN NATURAL <strong>from_item</strong>
				<strong>from_item</strong> {'{'} LEFT | RIGHT | FULL } [ OUTER ] JOIN USING ( join_column [, ...] ) <strong>from_item</strong>

				and <strong>with_query</strong> is:

				<strong>with_query_name</strong> AS ( <strong>select</strong> )

							<div>
								</div>
github dbis-uibk / relax / calc2 / views / help.tsx View on Github external
<div>
										'),
																							NonTerminal('new name')
																					),
																					','
																			)
																	)
															),
															NonTerminal('RA-expression', '#relalg-relalgexpr')
													)
											)} /&gt;
									</div>
github kach / nearley / bin / nearley-railroad.js View on Github external
break;
                case ":*":
                    return new rr.ZeroOrMore(renderTok(tok.ebnf));
                    break;
                case ":?":
                    return new rr.Optional(renderTok(tok.ebnf));
                    break;
                }
            } else if (tok.literal) {
                return new rr.Terminal(JSON.stringify(tok.literal));
            } else if (tok.mixin) {
                return new rr.Comment("Pas implementé.");
            } else if (tok.macrocall) {
                return new rr.Comment("Pas implementé.");
            } else if (tok.tokens) {
                return new rr.Sequence(tok.tokens.map(renderTok));
            } else if (typeof(tok) === 'string') {
                return new rr.NonTerminal(tok);
            } else if (tok.constructor === RegExp) {
                return new rr.Terminal(tok.toString());
            } else if (tok.token) {
                return new rr.Terminal(tok.token);
            } else {
                return new rr.Comment("[Unimplemented]");
            }
        }
github dbis-uibk / relax / calc2 / views / help.tsx View on Github external
<div>no argument

									<div>
										<code>( pi firstname ( Customer ) ) - ( rho test{'&lt;'}-lastname (
					pi lastname ( Customer )
				) )</code>
									</div>
									the schemas must be unifiable

									<div>
										
									</div>
								</div>
							
							<div>
								<h4 id="relalg-operations-crossjoin">cross product</h4>
								<table>
									<tbody>
										<tr>
											<th>symbol</th>
											<td></td>
										</tr>
										<tr></tr></tbody></table></div>
github dbis-uibk / relax / calc2 / views / help.tsx View on Github external
NonTerminal('expression', '#sql-valueexpr')
																	),
																	'skip',
															),
															Optional(
																	Sequence(
																			Terminal('HAVING', '#sql-having'),
																			NonTerminal('condition')
																	),
																	'skip',
															),
													),

													Sequence(
															Optional(
																	Sequence(
																			Choice(
																					0,
																					'UNION',
																					'INTERSECT',
																					'EXCEPT'
																			),
																			Choice(
																					0,
																					Skip(),
																					'DISTINCT',
																					'ALL'
																			),
																			NonTerminal('select')
																	),
																	'skip',
															),
github dbis-uibk / relax / calc2 / views / help.tsx View on Github external
0,
																									Sequence('ON', NonTerminal('condition')),
																									Sequence('USING', '(', OneOrMore(NonTerminal('join_column'), ','), ')'),
																									Sequence('NATURAL')
																							)
																					)
																			),
																			Choice(
																					0,
																					Sequence(
																							NonTerminal('table_name'),
																							Optional(Sequence('AS', NonTerminal('alias')))
																					),
																					Sequence(
																							'(', NonTerminal('select'), ')',
																							Sequence('AS', NonTerminal('alias'))
																					)
																			)
																	),
															),
													),

													Sequence(
															Optional(
																	Sequence(
																			Terminal('WHERE', '#sql-where'),
																			NonTerminal('condition')
																	),
																	'skip',
															),
															Optional(
																	Sequence(
github dbis-uibk / relax / calc2 / views / help.tsx View on Github external
<div>
									<p>A valid relational algebra expression is built by connecting <i>relation-name</i> or <i>inline-relation</i>
										as atoms with the defined unary and binary operators.</p>

									So a relational algebra expression is recursively defined as follows:

									<div>
										</div></div>
github dbis-uibk / relax / calc2 / views / help.tsx View on Github external
Choice(
																					0,
																					Sequence(
																							NonTerminal('table_name'),
																							Optional(Sequence('AS', NonTerminal('alias')))
																					),
																					Sequence(
																							'(', NonTerminal('select'), ')',
																							Sequence('AS', NonTerminal('alias'))
																					)
																			)
																	),
															),
													),

													Sequence(
															Optional(
																	Sequence(
																			Terminal('WHERE', '#sql-where'),
																			NonTerminal('condition')
																	),
																	'skip',
															),
															Optional(
																	Sequence(
																			Terminal('GROUP BY', '#sql-groupby'),
																			NonTerminal('expression', '#sql-valueexpr')
																	),
																	'skip',
															),
															Optional(
																	Sequence(