Author Topic: BUG ? FoxPro Clipper syntax file  (Read 3274 times)

Offline Alain

  • Registered User
  • Jr. Member
  • *
  • Posts: 50
  • Karma: +1/-0
BUG ? FoxPro Clipper syntax file
« on: November 01, 2009, 12:07:56 PM »
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

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2206
  • Karma: +37/-3
    • HippoEDIT
Re: BUG ? FoxPro Clipper syntax file
« Reply #1 on: November 02, 2009, 01:24:35 AM »
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
Quote
GO TOP   && this is a comment
this works
Quote
        * again a comment  (white space before)
this also works
Code: [Select]
a = 2 *2        "*2" become a commentthis is processed correctly

Quote
** this is a comment
this is not recognized
Quote
a= 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:
Code: [Select]
        <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:
Code: [Select]
        <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.

Offline Alain

  • Registered User
  • Jr. Member
  • *
  • Posts: 50
  • Karma: +1/-0
Re: BUG ? FoxPro Clipper syntax file
« Reply #2 on: November 02, 2009, 11:36:59 AM »
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

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2206
  • Karma: +37/-3
    • HippoEDIT
Re: BUG ? FoxPro Clipper syntax file
« Reply #3 on: November 02, 2009, 02:32:29 PM »
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...

Offline Alain

  • Registered User
  • Jr. Member
  • *
  • Posts: 50
  • Karma: +1/-0
Re: BUG ? FoxPro Clipper syntax file
« Reply #4 on: November 02, 2009, 08:58:21 PM »

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

Alain

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2206
  • Karma: +37/-3
    • HippoEDIT
Re: BUG ? FoxPro Clipper syntax file
« Reply #5 on: November 02, 2009, 10:42:29 PM »
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.