Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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')),
<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>
<div>
'),
NonTerminal('new name')
),
','
)
)
),
NonTerminal('RA-expression', '#relalg-relalgexpr')
)
)} />
</div>
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]");
}
}
<div>no argument
<div>
<code>( pi firstname ( Customer ) ) - ( rho test{'<'}-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>
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',
),
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(
<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>
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(