Hi,
In a GrammarClass using LLParserFramework I defined:
this.Root.Production = gopItem.OnError(GopItemError).ZeroOrMore().SetLabel("Definition") .OnInitialize(DefinitionInitialize).OnSuccess(GopItemSuccess).OnComplete(DefinitionComplete)
> Ast("Mengendefinition", AstChildrenFrom("Definition"));
// there are some more, but for the example they are deleted
gopItem.Production =
gopLugLg["GopItem"] > AstFrom("GopItem");
gopLugLg.Production =
@lug
+ @openSquareBracket.OnErrorContinue()
+ @quote.OnErrorContinue()
+ @number["LugNum"]
+ (@komma + @number["LugNum"] > AstFrom("LugNum")).ZeroOrMore().SetLabel("moreNum")
+ @quote.OnErrorContinue()
+ @komma
+ @number["LgNum"]
+ @closeSquareBracket.OnErrorContinue()
+ endItem.OnErrorContinue()
> Ast("GopLugMitLg", AstFrom("LugNum"), AstChildrenFrom("moreNum"));
Alternatively it can be defined as a regexp in LanguageDesigner using only BaseParsing
(LUG\\[\\\")(([0-9]{1,2},?)+)\\\",([0-9]{1,2})(\\])
This is the definition of following example-string:
LUG["01,02,03,04,05,06,07,21,22,23,24,25",08]
For both scenarios - either LLParsing or BaseBarser, this parsing works perfect. The string is tokenized and the correct AST is build.
As soon as the string's first part is increased, the parsing will last very long, even the application will no longer answering:
both testing in the LLParser Debugger and my application.
LUG["01,02,03,04,05,06,07,21,22,23,24,25,01,02,03,04,05,06,07,21,22,23,24,25,26,27,28,29,30",08]
What could be the reason for it?
Is there a number of sign - limit for one token?
Can you understand my question abd problem? Do you need further information?
Thanks for any help!!!
Cheers, Christel