Skip to content
Lionel Villard edited this page Mar 1, 2016 · 3 revisions

TransScript is self-hosted: its source code is compiled using a previous TransScript build stored in targets/java/dist/transscript-1.0.0-ALPHA.jar

Few things need to be considered when changing TransScript source code:

  • The syntax is the one from the ALPHA build
  • The embedded syntax is the one from the dev
  • The runtime is the one from the ALPHA build when generating the new compiler. However the generated compiler is compiled against the new runtime (instead of the one in the ALPHA build) so it is critical to only make backward compatible changes

For instance, take the rule translating TransScript rule construct, in which the TransScript syntax has been slightly change from 'rule' to 'newrule' :

rule NDecl(decl⟦ newrule ##constructor ##args? → ##term* ⟧) → ...

The TransScript source code still uses the old syntax, but the embedded TransScript syntax uses the new syntax.

The following steps should be followed when updating the TransScript syntax (either surface, core or text):

  • Update the TransScript grammars
  • Update all embedded TransScript syntax in the TransScript source code
  • Regenerate using gradle. Caveat: currently the gradle build system does not recompile the Java parser before recompiling TransScript. When the error occur, refresh the project in eclipse and retry.
  • Run tests
  • Upon success, update ALPHA build (for now cp on the command line)
  • Update TransScript source code
  • Regenerate/Test/update ALPHA build
Clone this wiki locally