4
I Use This!
Activity Not Available

News

Analyzed about 1 year ago. based on code collected about 1 year ago.
Posted over 8 years ago by oturkan
Thank you for replay. A.B is Not a table.columnname. a.b is custom Text. İ think textliteral works for me
Posted over 8 years ago by rivantsov
first question is why? you can parse, then convert the parse tree (using a visitor/converter) If you absolutely need it, you can use RegexTerminal. Or FreeTextLiteral
Posted over 8 years ago by rivantsov
first question is why? you can parse, then convert the parse tree (using a visitor/converter) If you absolutely need it, you can use RegexTerminal. Or FreeTextLiteral
Posted over 8 years ago by oturkan
Hi, I try to parse sql script.there is a custom keyword like "A.B". How i can get it with single token. I'm mean Token.Text = A.B
Posted over 8 years ago by oturkan
Hi, I try to parse sql script.there is a custom keyword like "A.B". How i can get it with single token. I'm mean Token.Text = A.B
Posted over 8 years ago by rivantsov
you could try using transient non-terminal(s), to end up with a single AST node that is either identifier or function. Something like: idOrFunc.Rule = identifier | functionExpression; bracedExpr = Lbrace + idOrFunc + RBrace; ... [More] MarkTransient(idOrFunc, braceExpr); You provide AST node types for identifier and functionExpr, but not idOrFunc and bracedExpr - which are transient so should not have AST. At the end in the AST tree you should end up with AST node for one of functionExpr or identifier in all places where expected bracedExpr. Try it, I did not test it, this is just from what I remember how it should work - and this is the case why transient nodes are there. [Less]
Posted over 8 years ago by rivantsov
you could try using transient non-terminal(s), to end up with a single AST node that is either identifier or function. Something like: idOrFunc.Rule = identifier | functionExpression; bracedExpr = Lbrace + idOrFunc + RBrace; ... [More] MarkTransient(idOrFunc, braceExpr); You provide AST node types for identifier and functionExpr, but not idOrFunc and bracedExpr - which are transient so should not have AST. At the end in the AST tree you should end up with AST node for one of functionExpr or identifier in all places where expected bracedExpr. Try it, I did not test it, this is just from what I remember how it should work - and this is the case why transient nodes are there. [Less]
Posted over 8 years ago by Midwestlimey
Rated 5 Stars (out of 5) - Simply and easily developed two DSLs for complex configuration scenarios. Excellent.
Posted over 8 years ago by Midwestlimey
Rated 5 Stars (out of 5) - Simply and easily developed two DSLs for complex configuration scenarios. Excellent.
Posted over 8 years ago by woopsie
Hi I have this in my grammar to enable me to set the AST builder for a terminal. Dim bracedText = NewTerminal(Function() New QuotedValueLiteral("bracedString", "{", "}", TypeCode.String), GetType(StringExpr)) Private Function NewTerminal(Of TTerm ... [More] As Terminal)(nodeCreator As Func(Of TTerm), astNodeType As Type) As TTerm Dim t = nodeCreator() t.AstConfig.NodeType = astNodeType Return t End Function However, I want to go one step further and be able to decide whether to instantiate a StringExpr or some other AST node. What would I need to event handle/override on the terminal to enable me to decide which AST node I should chose dependent upon the contents of the string between the braces. If you could point me to some sample code, even better. Many thx S [Less]