C/AL grammar

xoxo Member Posts: 34
Does anyone have a grammar file for the C/AL object export file format (text)?

Comments

  • DenSterDenSter Member Posts: 8,304
    What do you mean by "C/AL object export file format"?

    The C/SIDE Reference Guide under the Help menu contains all syntax rules, and you might want to check out the Application Designer Guide, which is in the Doc folder on the product disc.
  • girish.joshigirish.joshi Member Posts: 407
    I don't think that's what he means Denster.

    I believe he means the grammar that a parser would use to understand C/AL objects that are exported as text. The grammar itself can be defined in a file and plugged into an off the shelf parser that will then build a language tree.

    I have never seen it around, but I'm sure a few folks have cooked something up.

    There is someone (can't remember the name, sorry - BlackTiger? ) who posted a Compare and Merge/Development enviornment tool, and I'm fairly certain he would have had to reverse engineer the grammar to some extent.

    By inspection, I think you'll find that the grammar is not terribly complex.

    If you figure it out, it would make one heck of a mibuso post.
  • xoxo Member Posts: 34
    Thanks girish.joshi, that's exactly what I mean and that's exactly what I plan to do. I'm also considering an XML Infoset representation, but one step at a time.
  • DenSterDenSter Member Posts: 8,304
    Of course, now "C/AL object export file format" makes perfect sense :mrgreen:
  • jlandeenjlandeen Member Posts: 524
    I definately agree that having something like the grammar file to use with some of the other high quality code editors would be excellent.

    As it is a pascal like language it may make sense to start with an existing pascal based grammar rather then trying to build one from scratch.
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
  • PhilThomePhilThome Member Posts: 5
    Hi,

    did you find a grammar, xo?
  • girish.joshigirish.joshi Member Posts: 407
    This is much easier to do now. In NAV2009 the C# code that the objects compile into is stored in plain text. If you do an executable upgrade, you can transate all of your current C/AL code into C#. Now granted, this still isn't the C/AL grammar, but I would argue that the next step would be to take each language component and see how it affects the C# file. Of course --- I'm sure this isn't supported by MS.
Sign In or Register to comment.