本文整理汇总了C#中StringLiteral.SetOutputTerminal方法的典型用法代码示例。如果您正苦于以下问题:C# StringLiteral.SetOutputTerminal方法的具体用法?C# StringLiteral.SetOutputTerminal怎么用?C# StringLiteral.SetOutputTerminal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringLiteral
的用法示例。
在下文中一共展示了StringLiteral.SetOutputTerminal方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateSqlExtIdentifier
//Covers simple identifiers like abcd, and also quoted versions: [abc d], "abc d".
public static IdentifierTerminal CreateSqlExtIdentifier(Grammar grammar, string name) {
var id = new IdentifierTerminal(name);
StringLiteral term = new StringLiteral(name + "_qouted");
term.AddStartEnd("[", "]", StringOptions.NoEscapes);
term.AddStartEnd("\"", StringOptions.NoEscapes);
term.SetOutputTerminal(grammar, id); //term will be added to NonGrammarTerminals automatically
return id;
}
示例2: CreateIdentifier
IdentifierTerminal CreateIdentifier()
{
var identifier = new IdentifierTerminal("identifier");
var quotedIdentifier = new StringLiteral("identifier_quoted");
quotedIdentifier.AddStartEnd("`", StringOptions.NoEscapes);
quotedIdentifier.SetOutputTerminal(this, identifier);
return identifier;
}
示例3: MakeSimpleId
private void MakeSimpleId()
{
Identifier = new IdentifierTerminal("simple_id");
var idStringLiteral = new StringLiteral("simple_id_quoted");
idStringLiteral.AddStartEnd("\"", StringOptions.NoEscapes);
idStringLiteral.AstConfig.NodeType = typeof(IdentifierNode);
idStringLiteral.SetOutputTerminal(this, Identifier);
}
示例4: CreateSqlExtIdentifier
private BnfTerm CreateSqlExtIdentifier(string name)
{
IdentifierTerminal identifierTerminal = new IdentifierTerminal(name, null, "@");
StringLiteral stringLiteral = new StringLiteral(name + "_quoted");
stringLiteral.AddStartEnd("[", "]", StringOptions.NoEscapes);
stringLiteral.AddStartEnd("\"", StringOptions.NoEscapes);
stringLiteral.SetOutputTerminal(this, (Terminal)identifierTerminal);
return identifierTerminal;
}