BCGSoft Forums
BCGSoft Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 BCGSoft Professional Editor Forums
 BCGPEdit Library-related topics
 The syntax definition file
 New Topic  Reply to Topic
Author  Topic Next Topic  

bookshelf

2 Posts

Posted - 08/15/2007 :  6:32:17 PM  Show Profile  Reply with Quote
Now in your sample code you only provide support for cpp and asp.

Do you have the xml syntax definition file for other files such as javascript, html, php, style sheet(css) and so on? I'm evaluating your product and it's very important for me to make the decision.

Thanks

denis.flotat

14 Posts

Posted - 08/16/2007 :  3:55:57 PM  Show Profile  Reply with Quote
As far as i understood, you cannot. You have to create your own-derived class and process the syntax !
I have never succeeded in doing this :(
I bought that control because there was no equivalency elsewhere but was quickly "disapointed"; everything is possible if you take the time to code it by yourself; that's the point !

Edited by - denis.flotat on 08/16/2007 7:17:18 PM
Go to Top of Page

jack.czl

42 Posts

Posted - 10/23/2007 :  06:48:51 AM  Show Profile  Reply with Quote
Hi I can simply manage to write my own language by modifing the XML file of CPP. But part of them still doesn't work. for example.
I replaced:
<BLOCK>
<Start>{</Start>
<End>}</End>
<ReplaceString>...</ReplaceString>
</BLOCK>
into
<BLOCK>
<Start>\begin</Start>
<End>\end</End>
<ReplaceString>...</ReplaceString>
</BLOCK>

It is not working with outlining. but only one symble like "["and"]" will work. What's the problem?
Thanks

Jack
Go to Top of Page

xinhu88

3 Posts

Posted - 09/07/2010 :  12:31:04 AM  Show Profile  Reply with Quote
I met the same issue. How to support lua syntax?

I do it as the simple, but it doesn't work.
Go to Top of Page

MartinLemburg

2 Posts

Posted - 02/23/2012 :  07:35:56 AM  Show Profile  Visit MartinLemburg's Homepage  Reply with Quote
quote:
Originally posted by xinhu88

I met the same issue. How to support lua syntax?

I do it as the simple, but it doesn't work.




I tried too, to write my own XML file containing syntax highlighting and outlining defintions.
It partly works.

I modifed the BCGPVisualStudioGUIDemo project to contain my example file and my settings XML file.
I can reproduce misbehavior in our application and within the demo application.
As example:

if condition then
        while condition
            action;
        end;
    else
        action;
    end;


While the if-end is outlined, the while is not outline, even if AllowNestedBlocks == true.
And the else block is not outlined, too.
And worse ... the end belonging to while causes the if-end outline block to end to early at the end of the hypothetical while-end outline block.

Using this BCGPVisualStudioGUIDemo, I saw, that the Basic outlining syntax defines ElseIf and Else outlining blocks, too, while those are not outlined, like in our example.

In our application even a for-next loop ends, even if WholeWords==true, with a SetNextAction string within the loop:

for a to b loop
        while condition
            SetNextAction;
        end;
    next;


This for-next behavior does not occur within the BCGPVisualStudioGUIDemo!

So - how to do it right?

A bit disappointed,

Martin Lemburg

Martin Lemburg
Siemens Industry Software
Plant Simulation
Software Engineer

martin.lemburg@siemens.com
Go to Top of Page

MartinLemburg

2 Posts

Posted - 02/23/2012 :  09:47:21 AM  Show Profile  Visit MartinLemburg's Homepage  Reply with Quote
Another thing I realized reading the help and reading the source code ... some described XML tokens are not used, do not have consequences:
  • IgnoreOneLineBlocks

  • IncludeSpaceLines

  • EndBefore (used in the examples)

Even the description of the EscapeSequences is not really understandable - especially if reading the sources:
quote:
<EscapeSequences> tag defines a list of escape sequences. For each escape sequence the XML parser will call CBCGPOutlineParser::AddBlockType.
<EscapeSequence> tag represents a single escape sequence.

Reading the sources, the escape sequences are not responsible for calls to CBCGPOutlineParser::AddBlockType, right?

So what are they really good for?

It seems that CBCGPOutlineParser::IsEscapeSequence in CBCGPOutlineParser::GetNext is responsible to prevent a check, if a string, beginning at a specific offset, is tested for being a block start or block end.
If so ... why not using the configured delimiter characters?

Now - what should the escape sequences really be good for?

Could someone please answer or clarify those "questions"?

Best regards,

Martin
P.S.: BTW I use v17 of the BCGControlBar library.

Martin Lemburg
Siemens Industry Software
Plant Simulation
Software Engineer

martin.lemburg@siemens.com
Go to Top of Page

Support

2992 Posts

Posted - 02/24/2012 :  06:45:53 AM  Show Profile  Visit Support's Homepage  Reply with Quote
Hi,

Please open a new support ticket for all these questions. Accoring our policy, we don't discuss any source code issues here.

Best regards,

BCGSoft Technical Support
Go to Top of Page
   Topic Next Topic  
 New Topic  Reply to Topic
Jump To:
BCGSoft Forums © Copyright (c) 1998-2013 BCGSoft Co Ltd Go To Top Of Page
Snitz Forums 2000