From cfc397dda4352a51141fcf2bcf794f1baf91fcdb Mon Sep 17 00:00:00 2001 From: heck Date: Fri, 4 Aug 2023 12:23:08 +0200 Subject: [PATCH] switch computers --- Makefile | 13 +++++++++++++ Makefile.conf | 7 +++++++ README.md | 7 +++++-- .../RecipeLangToMakrdown.ysl2 | 0 {grammar => language}/RecipeLang.yml2 | 3 ++- src/Makefile | 9 +-------- 6 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 Makefile create mode 100644 Makefile.conf rename compiler/RecipeLang.ysl2 => compilers/RecipeLangToMakrdown.ysl2 (100%) rename {grammar => language}/RecipeLang.yml2 (65%) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f9f6473 --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +.PHONY: all test src clean + +all: src + +src: + $(MAKE) -C src + +#test: +# $(MAKE) -C test + +clean: + $(MAKE) -C src clean +# $(MAKE) -C test clean diff --git a/Makefile.conf b/Makefile.conf new file mode 100644 index 0000000..41e3224 --- /dev/null +++ b/Makefile.conf @@ -0,0 +1,7 @@ +DSLNAME=RecipeLang + +YML_PATH+=:$(realpath ../grammar) +COMPILER=$(realpath compiler/$(DSLNAME).ysl2) +BUILD_DIR=./build + + diff --git a/README.md b/README.md index d07ea92..b1f9018 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,13 @@ Hello world style template-project to create a DSL in yml2 project template featuring: -* dir structure +* project organisation * build system -* incremental builds +* incremental builds* +* TODO: tests +We create a new language `RecipeLang` to describe cooking recipes. +The language consists of diff --git a/compiler/RecipeLang.ysl2 b/compilers/RecipeLangToMakrdown.ysl2 similarity index 100% rename from compiler/RecipeLang.ysl2 rename to compilers/RecipeLangToMakrdown.ysl2 diff --git a/grammar/RecipeLang.yml2 b/language/RecipeLang.yml2 similarity index 65% rename from grammar/RecipeLang.yml2 rename to language/RecipeLang.yml2 index a8bd01c..225ecd7 100644 --- a/grammar/RecipeLang.yml2 +++ b/language/RecipeLang.yml2 @@ -1,4 +1,5 @@ -// Example language grammar +// Language grammar +// for example language RecipeLang DSLName { dls_data { diff --git a/src/Makefile b/src/Makefile index 85b963b..9f704fa 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,11 +1,4 @@ -# TODO: -# Incremental compilation impossible without redundantly specifying -# files that will be generated in the makefile - -DSLNAME=RecipeLang -YML_PATH+=:../grammar -COMPILER=../compiler/$(DSLNAME).ysl2 -BUILD_DIR=./build +include ../Makefile.conf SRC=$(wildcard *.$(DSLNAME)) SRC_XML=$(addsuffix .xml, $(basename $(SRC)))