/// <summary> /// Create the term that represents an Entity identifier. /// </summary> public IdentifierTerminal CreateIdentifierTerm(string name) { var id = new IdentifierTerminal(name, IdOptions.IsNotKeyword); var term = new StringLiteral(name + "_quoted"); term.AddStartEnd("[", "]", StringOptions.AllowsDoubledQuote); term.SetOutputTerminal(this, id); return(id); }
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); }
private BnfTerm CreateSqlExtIdentifier(string name) { var identifierTerminal = new IdentifierTerminal(name, null, "@"); var stringLiteral = new StringLiteral(name + "_quoted"); stringLiteral.AddStartEnd("[", "]", StringOptions.NoEscapes); stringLiteral.AddStartEnd("\"", StringOptions.NoEscapes); stringLiteral.SetOutputTerminal(this, identifierTerminal); return(identifierTerminal); }
//Covers simple identifiers like abcd, and also quoted versions: [abc d], "abc d". public static IdentifierTerminal CreateSqlExtIdentifier(Grammar grammar, string name) { var id = CreateTerm(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); }
//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; }
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); }
IdentifierTerminal CreateIdentifier() { var identifier = new IdentifierTerminal("identifier"); var quotedIdentifier = new StringLiteral("identifier_quoted"); quotedIdentifier.AddStartEnd("`", StringOptions.NoEscapes); quotedIdentifier.SetOutputTerminal(this, identifier); return identifier; }
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; }