Menu

#41 Move support for embedded languages into dedicated grammars

v1.0 (example)
closed-fixed
nobody
None
5
2016-11-29
2013-09-04
KrisDS
No

Cfr. discussion on ticket [#39].

The idea for is to set up separate grammars/parsers for the embedded languages such as CICS and SQL, using whichever technology is most appropriate, and then link to those from within the Cobol grammar. Syntactically it could look something like this:

EXEC SQL (--SQLGrammar.sqlStatement--> END-EXEC) END-EXEC

So, skip up to the END-EXEC token, and then try parsing the skipped tokens as an sqlStatement defined by an SQLGrammar.

Possibly a nice bonus feature is that you can choose whether or not you want a given embedded language to get parsed. If not we can just fall back to the existing semantics of skipping.

Related

Issues: #39

Discussion

  • KrisDS

    KrisDS - 2013-09-05
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -5,3 +5,5 @@
         EXEC SQL (--SQLGrammar.sqlStatement--> END-EXEC) END-EXEC
    
     So, skip up to the END-EXEC token, and then try parsing the skipped tokens as an sqlStatement defined by an SQLGrammar.
    +
    +Possibly a nice bonus feature is that you can choose whether or not you want a given embedded language to get parsed. If not we can just fall back to the existing semantics of skipping.
    
     
  • KrisDS

    KrisDS - 2015-02-09

    This has been started, but is missing some syntactic sugar to make it nicer.

     
  • Simon Sobisch

    Simon Sobisch - 2016-11-28

    All missing syntactic sugar was added, wasn't it?

     
    • KrisDS

      KrisDS - 2016-11-28

      No, there are some hand-written forwarding methods in CobolBaseGrammar to make up for the missing syntax.

       
  • KrisDS

    KrisDS - 2016-11-29

    Added syntax in [r384]. E.g.

    sql::statement
    
     

    Related

    Commit: [r384]

  • KrisDS

    KrisDS - 2016-11-29
    • status: open --> closed-fixed
     

Log in to post a comment.