BUG ? FoxPro Clipper syntax file

Started by Alain, November 01, 2009, 12:07:56 PM

Previous topic - Next topic

Alain

Hello
in FoxBase or DBase or Clipper you begin comment line with "*" or "**" or "&&"

ex:
*  this is a comment
** this is a comment
GO TOP   && this is a comment

Pb : when you have * (as mutiply) the end of text become a comment
a = 2 *2        "*2" become a comment
a = b *c        "*c"  become a comment

proposition for parsing "*"
If line begin by * it's a comment
if after equal it's asymbol

ex:
* this is a comment
        * again a comment  (white space before)
a= a*b       && this is a symbol

Have a good day
Alain

alex

Hi Alain,

I have checked your example (using latest clipper schema) and see only one problem, that ** is not recognized as comment, when placed after some text. Si this is a bug you are taking? (sorry was not clear from description)

Quote*  this is a comment
this works
QuoteGO TOP   && this is a comment
this works
Quote* again a comment  (white space before)
this also works
a = 2 *2        "*2" become a comment
this is processed correctly

Quote** this is a comment
this is not recognized
Quotea= a*b       ** this is a symbol
and so, this is also does not work.

But this is no problem to add ** to the schema. You can do it by yourself, and I from my side would update the default schema.
clipper_spec.xml:
this:
        <Blocks>
          <Block open="*" close="\n" first_pos="true"/>
          <Block open="//" close="\n"/>
          <Block open="/*" close="*/"/>
          <Block open="&amp;&amp;" close="\n"/>
        </Blocks>

changed to this:
        <Blocks>
          <Block open="*" close="\n" first_pos="true"/>
          <Block open="//" close="\n"/>
          <Block open="/*" close="*/"/>
          <Block open="&amp;&amp;" close="\n"/>
          <Block open="**" close="\n"/>
        </Blocks>


Best regards,
Alex.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Alain

Hello
You are right (again)

When I modified (customised)  syntax xml I forgot just

    "first_pos="true"/>"

after "Block open="*" close="\n"

and this little thing make disfunction.

Thank for you help
Alain

alex

Good :)

but if this:
Quote<Block open="**" close="\n"/>
is still relevant? Because I have already modified default schema from library and uploaded it on server...
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Alain


"**" works fine
Now I remember the  "first_pos="true"/>"....
Just a remark : Where is the documentation for the syntax of xml ?
Thanks

Alain

alex

Hi Alain,

there is no real documentation, but here is some kind of the FAQ description of language schema syntax which I plan to convert to a help some when.

Best regards,
Alex.

HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]