- Add a system environment variable
called
CYGWIN
with the valuenodosfilewarning
. - Restart eclipse.
- Create a Spoofax editor project (instructions) and a test project (instructions) in Eclipse.
- Create a new test suite in the test project.
- Select File > New > File from the menu.
- Use
.spt
as a file extension.
- Write your first test module in that file.
Each test module gets its own file. You can add directories to your project to group the test files. If you build the editor project, your test modules will be parsed.
Yes. This will save you several hours of work in the next assignment.
Yes that is possible. You can have the following directory tree for example:
syntax/
subdir/
c.sdf3
b.sdf3
MyLanguage.sdf3
MyLanguage.sdf3
should have the following imports if it depends on b
and c
:
module MyLanguage
imports
b
subdir/c
and c
should be declared as
module subdir/c
If you get errors while you think you shouldn't, open all .sdf3
files and run Generate SDF (concrete, for selection) from the Transform button. If this does not result in a corresponding .sdf
file, something is wrong in your .sdf3
file.
You probably used a constructor name together with the bracket
attribute.
This is a mistake.
There is an error in these priorities, which causes the generator to fail. You probably made a typo in a constructor name.
There is very likely an error in your rules for LAYOUT
.
Study the rules found on the slides or in the generated Common.sdf3
in a new language project.
Fixing these issues should make running your tests way faster.
This is also very likely caused by erroneous rules for LAYOUT
.
- Close Eclipse.
- Delete all files in the
include
folder in your MiniJava project. - Fix the erroneous rules.
- Build your project.
You probably do not have a snippet of code selected that can be transformed by the desugar
rule, thereby causing the editor-desugar
rule to fail.
If you select an expression and run Show desugared syntax, you will see the output of desugar
applied to that expression.
Alternatively, you could edit the editor-desugar
rule to apply the desugar-all
strategy to transform the complete AST of your MiniJava file.