
Hi
Currently I'm working on SQL semantic parser and I've got the problem with StringState matching.
In dynamic language XML definition the following State is defined:What is the right way to parse string in my semantic parser?
I'm doing this withmatch in grammar file. But it doesn't work as needed. For example, in line
"select col as 'alias' from [...]"
when matching 'StringStartToken', this.TokenText has value "'", and this.LookAheadTokenText has value "from". And there is no way to get the value "alias". What am I doing wrong?
Currently I'm working on SQL semantic parser and I've got the problem with StringState matching.
In dynamic language XML definition the following State is defined:
<State Key="SquareStringState" TokenKey="SquareStringDefaultToken" Style="StringDefaultStyle">
<Scopes>
<Scope BracketHighlight="True">
<ExplicitPatternGroup Type="StartScope" TokenKey="SquareStringStartToken" Style="StringDelimiterStyle" PatternValue="[" />
<ExplicitPatternGroup Type="EndScope" TokenKey="SquareStringEndToken" Style="StringDelimiterStyle" PatternValue="]" />
</Scope>
</Scopes>
<PatternGroups>
<RegexPatternGroup TokenKey="SquareStringDefaultToken" PatternValue="[^\]]+" />
</PatternGroups>
</State>
I'm doing this with
'StringStartToken<+ selectListColumn.Alias = this.TokenText; +>'
"select col as 'alias' from [...]"
when matching 'StringStartToken', this.TokenText has value "'", and this.LookAheadTokenText has value "from". And there is no way to get the value "alias". What am I doing wrong?