Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
Add model to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
enstulen committed Nov 22, 2019
1 parent 425f90d commit c121d58
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,22 @@ Nginx config DSL for NTNU course TDT4250

## Grammar

This is the xtext grammar that will be used to generate the Ecore model:

![grammar](docs/grammar.png)

## Ecore Model

This is the model generated from the xtext grammar:

![ecore-model](docs/ecore-model.png)

The model consists of the main `Nginx` consisting of any number of sites. The sites themselves contain a number of attributes, and two EClasses: `SSlCert` and `ErrorPage`.

The sites can have several `alternative names` and several `error pages`. The error pages contain a list of `error codes` that link to a specific `uri`. Each site has a `SSL Certifiate` that can be reused for other domains or subdomains.

## Conversion

## Tests

The tests are located in `no.ntnu.tdt4250.tests`. For each object in the model `Site`, `SslCert` and `ErrorPage`, there is a corresponding `.xtend` test file. In addition to this, there is a `Parsing` test and a `UnquotedStringValueConverter` test.
Expand Down
Binary file added docs/ecore-model.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c121d58

Please sign in to comment.