Author Topic: Simple syntax  (Read 4031 times)

Offline jay_m

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Simple syntax
« on: June 13, 2011, 12:20:47 AM »
I am trying to get my spec file right for a posting language for a CAM program.  It uses very simple syntax.  A procedure is defined with a name that begins with "p" (ie pnum_2) and is the first character on the line.
prdrlout        #R drill position
      if cuttype = one, refht_a = refht$ + (rotdia$ / two)
      else, refht_a = refht$
      refht_i = refht$ - initht$
      if cuttype = three, refht_a = w$
      if absinc$ = zero, refht_a, !refht_i
      else, refht_i, !refht_a

the procdure is closed with either the next procedure opening or end of file.

Can anybody help create the <scope> syntax to open and close these procedures.  I am adapting the bash_spec.xml file for my language.


Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2224
  • Karma: +37/-3
    • HippoEDIT
Re: Simple syntax
« Reply #1 on: June 13, 2011, 12:57:03 AM »
Hi jay,

welcome on forum. Do not try: there is no way currently. Scopes need to have close tag always. It is planned to have indent based outlining, maybe this will help in your case (looking on provided example).
What you can do, is to extend Labels to show such procedures in Navigation list (combo on top of editor screen: Alt+M and filter with typing).
Maybe it will not cover your needs but will add you way for fast navigation. Labels are regular expressions based, so much more flexible, and do not require end tag.

I am on vacation for next 1.5 week, so will help later, if you will have questions.

BR, Alex.