Posted 17 years ago
by BLANC Stéphane
-
Staubli Robotics Suite Product Manager,
STAUBLI
Version: 4.0.0271
Hi
I'm having trouble to use the "Match" method in a RecursiveDescentSemanticParser class.
(it's always returning FALSE...)
I defined the followings token :
<ExplicitPatternGroup PatternValue="if" Key="IfPatternGroup" TokenKey="IfReservedWordToken" EndBracket="EndIfPatternGroup" Style="ReservedWordStyle" CaseSensitivity="Sensitive" />
<ExplicitPatternGroup PatternValue="endIf" Key="EndIfPatternGroup" TokenKey="EndIfReservedWordToken" StartBracket="IfPatternGroup" Style="ReservedWordStyle" CaseSensitivity="Sensitive" />
and in the semantic parser I call :
bool l_matchResult = this.Match(this.LookAheadToken.LexicalPatternGroup.EndBracket.TokenID)
What's wrong with this code ?
Also I don't really understand the goal of the MultiMatchSets property...
What's the goal of it and how to fill the array ?
At the moment I copy hte property of the SimpleSemanticParser...
private static bool[,] multiMatchSets = {
// 0: Identifier SemiColon Var Return OpenCurlyBrace
{n,n,n,n,n,n,n,n,n,Y,n,n,Y,Y,n,n,Y,n,n,n,n,Y,n,n,n,n,n,n,n,n,n},
// 1: Identifier SemiColon Var Return OpenCurlyBrace
{n,n,n,n,n,n,n,n,n,Y,n,n,Y,Y,n,n,Y,n,n,n,n,Y,n,n,n,n,n,n,n,n,n}
};
Thanks for your help
Stéphane
I'm having trouble to use the "Match" method in a RecursiveDescentSemanticParser class.
(it's always returning FALSE...)
I defined the followings token :
<ExplicitPatternGroup PatternValue="if" Key="IfPatternGroup" TokenKey="IfReservedWordToken" EndBracket="EndIfPatternGroup" Style="ReservedWordStyle" CaseSensitivity="Sensitive" />
<ExplicitPatternGroup PatternValue="endIf" Key="EndIfPatternGroup" TokenKey="EndIfReservedWordToken" StartBracket="IfPatternGroup" Style="ReservedWordStyle" CaseSensitivity="Sensitive" />
and in the semantic parser I call :
bool l_matchResult = this.Match(this.LookAheadToken.LexicalPatternGroup.EndBracket.TokenID)
What's wrong with this code ?
Also I don't really understand the goal of the MultiMatchSets property...
What's the goal of it and how to fill the array ?
At the moment I copy hte property of the SimpleSemanticParser...
private static bool[,] multiMatchSets = {
// 0: Identifier SemiColon Var Return OpenCurlyBrace
{n,n,n,n,n,n,n,n,n,Y,n,n,Y,Y,n,n,Y,n,n,n,n,Y,n,n,n,n,n,n,n,n,n},
// 1: Identifier SemiColon Var Return OpenCurlyBrace
{n,n,n,n,n,n,n,n,n,Y,n,n,Y,Y,n,n,Y,n,n,n,n,Y,n,n,n,n,n,n,n,n,n}
};
Thanks for your help
Stéphane