Announcement

Collapse
No announcement yet.

grammer rules: keywords in middle of identifiers

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • grammer rules: keywords in middle of identifiers

    I'm trying to make a file format for Ruby, cribbing off of the C/C++ definition. See the attached keyword.png for my problem: keywords are recognized not as words but as substrings. This happens regardless of the order of the Grammar rules.

    As far as I can tell, this does NOT happen for the factory-defined file types - but I can't see any difference in how I'm defining my list of keywords or my identifier regex.

    I played around with making every keyword in my list a regex, but that is obviously not the intent of this list interface.

    Help?

    Also: maybe bcpkg should be added to the list of allowed file attachments.

  • #2
    Without seeing your grammar list, I'd guess you need to add an identifier definition. The regular expression [_a-z]\w* works for most languages. This item should come after your keyword item(s).
    Erik Scooter Software

    Comment


    • #3
      I of course had that.

      I started over by cloning C++ and editing from there, and it worked as expected. Diffing the two, I noticed that the IsRegExp flag was somehow turned off on my Identifier grammar item in my first attempt.

      So, not far off.

      Thanks - where should I send my Ruby bcpkg when it's finished? There's no obvious submission on your file formats page.

      Comment


      • #4
        Originally posted by jamesbaker View Post
        Thanks - where should I send my Ruby bcpkg when it's finished? There's no obvious submission on your file formats page.
        You could attach it in a response to this message, or email it to us at:
        [email protected]
        Erik Scooter Software

        Comment


        • #5
          Did you ever receive the Ruby bcpkg? Is it avalaible?
          (I found no ruby in http://www.scootersoftware.com/downl...rtid=234439106 )
          Thank you

          Comment

          Working...
          X