State recognition issue

SyntaxEditor for Windows Forms Forum

Posted 20 years ago by Steven Liu
Avatar
Again I am trying to define a SectionState for following constrcut:

SECTION Options
Option1=Val1
Option2=Val2
The "Section" keyword has no corresponding closing scope keyword, and this time I look ahead to the next SCETION keyword. The state definition is:

<State Key="SectionState">
  <Scopes>
    <Scope>
      <ExplicitPatternGroup Type="StartScope" Token="SectionStartToken" Style="KeywordStyle" PatternValue="SECTION" LookAhead="{NonWordMacro}" />
      <RegexPatternGroup Type="EndScope" Token="SectionEndToken" Style="DefaultStyle" PatternValue="\n" LookAhead="([ \t\n]*)(SECTION)" CaseSensitivity="Insensitive" IsContentDivider="True" />
    </Scope>
  </Scopes>
</State>
now, when I type:

SECTION Options

Option1=Val1
The SectionState should include all 3 lines, but in fact it ends at first line. It can be fixed by selecting "Reparse document". Now if I delete the third line, SectionState includes first 2 lines, which is not correct either. Again seleting "reparse document" fixes the issue.

The above issue can be shown more clearly if outlining is enabled by a semantic parser.

Steven

Comments (2)

Posted 20 years ago by Steven Liu
Avatar
In my previous posting, the last code snippet should be:

SECTION Options
<Blank Line>
Option1=Val1

Seems the web server suppresses the blank line.

Steven
Posted 20 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I'm trying your code here (without the semantic outlining of course) and it seems to behave like you wanted. But I am running newer code which hopefully will be released today or tomorrow. Once you get the new release today or tomorrow, try it again and if you still have problems, email me the semantic parser and full language definition you're using and I'll take a look.


Actipro Software Support

The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.