<commit_before>---
layout: page
title: "Lab 1: Testing Syntax Analysis"
excerpt: "Lab 1: Testing Syntax Analysis"
tags: ["assignment"]
context: assign
subcontext: ms1
---

{% include _toc.html %}

In this lab, you develop a test suite for syntax analysis.
The test suite consists of positive and negative test cases.

## Overview

### Objectives

Develop a test suite for syntax analysis.
The test suite should provide

1.  Syntactically valid and invalid test cases for sorts
    * `Program`,
    * `MainClass`,
    * `ClassDecl`,
    * `VarDecl`,
    * `MethodDecl`,
    * `Type`,
    * `Statement`,
    * `Exp`,
    * `ID` and
    * `INT`.

    Test cases for `FieldDecl` and `ParamDecl` should be covered in the tests for `ClassDecl` and `MethodDecl`, respectively.

    For grading, it is required to comply with these sort names literally.
    {: .notice .notice-warning}


2. Disambiguation tests for associativity and precedence in expressions.
3. Test cases for mandatory and optional whitespace.

### Submission

You need to submit your test project with a pull request against branch `assignment1` on GitHub.
The [Git documentation](/documentation/git.html#submitting-an-assignment) explains how to file such a request.
We expect to find your Spoofax project `minijava` and your test project `minijava.test.syntax` next to each other in the root of the repository.
The test project should contain a `README.md` with a short paragraph explaining the organisation of your test project.
To help us to maintain your submissions, also submit this paragraph in WebLab and add a link to your final pull request there.

The deadline for submission is 21th September, 23:59.
{: .notice .notice-warning}

### Grading

You can earn up to 100 points for the effectiveness of your test cases.
Therefor, we run your test cases against 196 correct and erroneous syntax definitions of MiniJava.<commit_msg>Remove project structure requirement<commit_after>---
layout: page
title: "Lab 1: Testing Syntax Analysis"
excerpt: "Lab 1: Testing Syntax Analysis"
tags: ["assignment"]
context: assign
subcontext: ms1
---

{% include _toc.html %}

In this lab, you develop a test suite for syntax analysis.
The test suite consists of positive and negative test cases.

## Overview

### Objectives

Develop a test suite for syntax analysis.
The test suite should provide

1.  Syntactically valid and invalid test cases for sorts
    * `Program`,
    * `MainClass`,
    * `ClassDecl`,
    * `VarDecl`,
    * `MethodDecl`,
    * `Type`,
    * `Statement`,
    * `Exp`,
    * `ID` and
    * `INT`.

    Test cases for `FieldDecl` and `ParamDecl` should be covered in the tests for `ClassDecl` and `MethodDecl`, respectively.

    For grading, it is required to comply with these sort names literally.
    {: .notice .notice-warning}

<<<<<<< Updated upstream

2. Disambiguation tests for associativity and precedence in expressions.
3. Test cases for mandatory and optional whitespace.
=======
3. Disambiguation tests for associativity and precedence in expressions.
4. Test cases for mandatory and optional whitespace.
>>>>>>> Stashed changes

### Submission

You need to submit your test project with a pull request against branch `assignment1` on GitHub.
The [Git documentation](/documentation/git.html#submitting-an-assignment) explains how to file such a request.
We expect to find your Spoofax project `minijava` and your test project `minijava.test.syntax` next to each other in the root of the repository.

The deadline for submission is 21th September, 23:59.
{: .notice .notice-warning}

### Grading

You can earn up to 100 points for the effectiveness of your test cases.
Therefor, we run your test cases against 196 correct and erroneous syntax definitions of MiniJava.
{'fraction_non_alphanumeric': 0.08266879319510899, 'fraction_numerical': 0.01063264221158958, 'mean_word_length': 3.990716180371353, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1322501', 'n_tokens_mistral': 1074, 'n_tokens_neox': 994, 'n_words': 496}