Jump to content

SystemC grammar


Recommended Posts

SystemC(/TLM) is not a first-class language on its own. Instead, it is a C++ class library. Therefore, you can find the language definition in the C++ standard itself, see http://isocpp.org/std/the-standard).

That said, you should probably not try to write a C++ parser from scratch. Instead, you may want to look at existing (open-source) parsers, like Clang/LLVM or GCC. There are several projects working on reconstructing the SystemC elements from a C++/SystemC model (SystemC frontends). There has been an overview paper at FDL'2010 about this (Maguet et.al, A Theoretical and Experimental Review of SystemC Front-ends").

Greetings from Oldenburg,

Philipp

Link to comment
Share on other sites

Thanks Philipp for your reply. However, working with the whole grammar takes lots of time and I don't want to write a parser for the whole language. I want to parse just a SystemC/TLM program. I've seen several tools that work with gcc to parse a SystemC/TLM program, but I could not find the grammar that they use (maybe they are using a C++ grammar). Do you know any reference or resource for just the SystemC/TLM part?

Thank you,

Reza

Link to comment
Share on other sites

Hmm, how would the grammar of "just a SystemC/TLM program" be simpler than parsing plain C++? I'd say that if you indeed would want to define a specific grammar for SystemC/TLM programs, this would be way more complex instead. IMHO, any (decent) SystemC/TLM language frontend needs to contain (or be based on) a plain C++ frontend.

For detailed references to existing projects, you should check the references in the survey paper I mentioned.

Greetings from Oldenburg,

Philipp

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...