959 lines
12 KiB
HTML
959 lines
12 KiB
HTML
<!doctype html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||
<meta name="description" content="">
|
||
<meta name="author" content="Eelco Visser">
|
||
<meta name="generator" content="Jekyll v3.8.5">
|
||
<title>Lab 1(a): Setting up Spoofax</title>
|
||
<!-- <base href="/2021"> -->
|
||
|
||
<!--link rel="canonical" href="https://getbootstrap.com/docs/4.3/examples/starter-template/"-->
|
||
|
||
<link rel="icon" href="../img/logo/pl_ico2_2B3_icon.ico" type="image/x-icon">
|
||
|
||
<!-- Bootstrap core CSS -->
|
||
<!--link href="https://getbootstrap.com/docs/4.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"-->
|
||
|
||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
|
||
|
||
|
||
|
||
<style>
|
||
.bd-placeholder-img {
|
||
font-size: 1.125rem;
|
||
text-anchor: middle;
|
||
-webkit-user-select: none;
|
||
-moz-user-select: none;
|
||
-ms-user-select: none;
|
||
user-select: none;
|
||
}
|
||
|
||
@media (min-width: 768px) {
|
||
.bd-placeholder-img-lg {
|
||
font-size: 3.5rem;
|
||
}
|
||
}
|
||
</style>
|
||
<!-- Custom styles for this template -->
|
||
<link href="../css/main.css" rel="stylesheet">
|
||
<link href="../css/borders-responsive.css" rel="stylesheet">
|
||
|
||
<link rel="stylesheet" href="../css/pl.css">
|
||
</head>
|
||
<body>
|
||
|
||
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
|
||
|
||
<a class="navbar-brand" href="../index.html">
|
||
TU Delft | CS4200
|
||
</a>
|
||
|
||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
|
||
<span class="navbar-toggler-icon"></span>
|
||
</button>
|
||
|
||
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
|
||
<ul class="navbar-nav mr-auto">
|
||
|
||
|
||
|
||
|
||
|
||
<li class="nav-item active">
|
||
<a class="nav-link" href="../lectures/index.html" tabindex="-1" aria-disabled="true">Lectures</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="nav-item active">
|
||
<a class="nav-link" href="../homework/index.html" tabindex="-1" aria-disabled="true">Homework</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="nav-item active">
|
||
<a class="nav-link" href="../project/index.html" tabindex="-1" aria-disabled="true">Project</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="nav-item active">
|
||
<a class="nav-link" href="../news/index.html" tabindex="-1" aria-disabled="true">News</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="nav-item active">
|
||
<a class="nav-link" href="../blog/index.html" tabindex="-1" aria-disabled="true">Blog</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
</ul>
|
||
|
||
</div>
|
||
</nav>
|
||
|
||
|
||
<div class="container">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="row">
|
||
<div class="col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||
|
||
<a href="https://tudelft-cs4200.github.io/2021">
|
||
<img class="border border-dark" width="100%" src="../project/2021/00-lab1a/spoofax.png"/>
|
||
</a>
|
||
|
||
|
||
<div class="mt-3 mb-3 pt-3 pb-3 text-dark border-top border-bottom border-grey">
|
||
<div class="text-dark font-weight-bold">
|
||
<h1>
|
||
|
||
Lab 1(a): Setting up Spoofax
|
||
|
||
</h1>
|
||
</div>
|
||
<div>
|
||
|
||
|
||
</div>
|
||
<div>
|
||
|
||
|
||
Project Set-up
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
<div>
|
||
September 07, 2021
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row">
|
||
<div class="col-sm-12 col-md-12 col-lg-9 border-lg-right border-grey">
|
||
<p>For the course project and for some of the homework assignments we will use the <a href="https://www.spoofax.dev/spoofax-pie/develop">Spoofax Language Workbench</a> version <a href="https://www.spoofax.dev/spoofax-pie/develop/">Spoofax 3</a>.</p>
|
||
|
||
<h3 id="installing-spoofax">Installing Spoofax</h3>
|
||
|
||
<p>Follow the <a href="https://www.spoofax.dev/spoofax-pie/develop/tutorial/install/">tutorial</a> on installing Spoofax3.</p>
|
||
|
||
<h3 id="language-projects">Language Projects</h3>
|
||
|
||
<p>In Spoofax you develop a programming language in a ‘language project’.</p>
|
||
|
||
<p>Follow the tutorial on <a href="https://www.spoofax.dev/spoofax-pie/develop/tutorial/create_language_project/">Creating a language project</a> to create a project with syntax and syntax tests.</p>
|
||
|
||
<h3 id="chocopy-project">ChocoPy Project</h3>
|
||
|
||
<p>Create a Spoofax project for the ChocoPy language. Configure your project to use the Chocopy name and <code class="language-plaintext highlighter-rouge">cpy</code> identifier, and place it in the <em>root of your repository</em>. See the image below for an example.</p>
|
||
|
||
<p><img src="https://i.imgur.com/wFAbX9K.png" alt="" /></p>
|
||
|
||
<p>Your project can be located in either <code class="language-plaintext highlighter-rouge">student-<yournetid>/chocopy.syntax</code> or <code class="language-plaintext highlighter-rouge">student-<yournetid>/chocopy</code>. If you place your project in a nested folder, or in a differently named folder, the grader will automatically reject your submission.</p>
|
||
|
||
<h3 id="updating-spoofax">Updating Spoofax</h3>
|
||
|
||
<p>During the course of the project, bugfixes and new features may be added to Spoofax 3. The grader will always test your project using the most recent version of Spoofax 3 that is backwards compatible with the initial project version (0.11.6).</p>
|
||
|
||
<p>To update your local installation to the newest version of Spoofax 3, launch Eclipse and select <code class="language-plaintext highlighter-rouge">Help</code> from the top menu, followed by <code class="language-plaintext highlighter-rouge">Install new software</code>.</p>
|
||
|
||
<p><img src="https://i.imgur.com/P8v2gj9.png" alt="" /></p>
|
||
|
||
<p>In the dialog that opens, enter the release URL of the latest Spoofax 3 release in the <code class="language-plaintext highlighter-rouge">Work with:</code> field. This URL starts with <code class="language-plaintext highlighter-rouge">https://artifacts.metaborg.org</code> and can be found on the <a href="https://www.spoofax.dev/spoofax-pie/develop/release/download/">Spoofax 3 releases page</a>. After entering the URL, hit enter to load all available packages for that release, then select the Spoofax package.</p>
|
||
|
||
<p><img src="https://i.imgur.com/j0Q91n8.png" alt="" /></p>
|
||
|
||
<p>Finally, hit next, accept the license if needed, and confirm the install. During installation, Eclipse may prompt that the package is unsigned. When this happens, select <code class="language-plaintext highlighter-rouge">Install anyway</code>.</p>
|
||
|
||
<p><img src="https://i.imgur.com/sKLxdGp.png" alt="" /></p>
|
||
|
||
<p>Then, restart Eclipse.
|
||
After Eclipse has restarted, clean your ChocoPy language project by selecting it in the Package Explorer, choosing Project -> Clean from the main menu, and by pressing Clean.
|
||
After the project is cleaned, build it once and continue.</p>
|
||
|
||
<h3 id="references">References</h3>
|
||
|
||
|
||
|
||
|
||
<ul class="list-group list-group-flush pb-3">
|
||
|
||
|
||
<li class="list-group-item pl-lg-0 border-0 pb-0">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="bd-callout border-success pl-3">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div>
|
||
<a name="Spoofax3"></a>
|
||
|
||
<a class="font-weight-bold text-dark" target="_blank" href="https://www.spoofax.dev/spoofax-pie/develop/">Spoofax 3 (Documentation) </a>
|
||
|
||
</div>
|
||
|
||
<div class="font-weight-light" style="font-size:90%;">
|
||
|
||
(editor).
|
||
</div>
|
||
|
||
<div class="font-weight-light text-secondary" style="font-size:90%;">
|
||
|
||
|
||
|
||
|
||
https://www.spoofax.dev/spoofax-pie/develop/ 2021
|
||
|
||
|
||
|
||
[<a class="text-secondary" target="_blank" href="https://researchr.org/publication/Spoofax3/bibtex">bib</a>, <a href="https://researchr.org/publication/Spoofax3" class="text-secondary" target="_blank">researchr</a>]
|
||
|
||
<!-- Spoofax3 -->
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
<li class="list-group-item pl-lg-0 border-0 pb-0">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="bd-callout border-success pl-3">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div>
|
||
<a name="Spoofax2021"></a>
|
||
|
||
<a class="font-weight-bold text-dark" target="_blank" href="https://www.spoofax.dev/">Spoofax: The Language Designer's Workbench</a>
|
||
|
||
</div>
|
||
|
||
<div class="font-weight-light" style="font-size:90%;">
|
||
|
||
(editor).
|
||
</div>
|
||
|
||
<div class="font-weight-light text-secondary" style="font-size:90%;">
|
||
|
||
|
||
|
||
|
||
https://www.spoofax.dev/ 2021
|
||
|
||
|
||
|
||
[<a class="text-secondary" target="_blank" href="https://researchr.org/publication/Spoofax2021/bibtex">bib</a>, <a href="https://researchr.org/publication/Spoofax2021" class="text-secondary" target="_blank">researchr</a>]
|
||
|
||
<!-- Spoofax2021 -->
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</ul>
|
||
|
||
|
||
</div>
|
||
<div class="col-sm-12 col-md-12 col-lg-3 col-xl-3 " >
|
||
<div class="sticky-top top70 d-none d-lg-block d-xl-block">
|
||
<div class="pb4 mb3 border-bottom border-grey ">
|
||
<nav>
|
||
<ul class="pagination justify-content-left">
|
||
|
||
<li class="page-item">
|
||
<a class="page-link" href="0b.html">
|
||
«
|
||
</a>
|
||
</li>
|
||
|
||
<li class="page-item">
|
||
<a class="page-link" href="../project/index.html">
|
||
^
|
||
</a>
|
||
</li>
|
||
|
||
<li class="page-item">
|
||
<a class="page-link" href="1b.html">»</a>
|
||
</li>
|
||
|
||
</ul>
|
||
</nav>
|
||
</div>
|
||
<ul id="my_toc" class="toc list-group list-group-flush d-none d-lg-block d-xl-block p-0 ml-0 mt-3">
|
||
<li class="list-group-item pl-0 ml-0 border-0 pl-0 pt-0 pb-1 pr-0 m-0 mr-3"><a href="1a.html#installing-spoofax">Installing Spoofax</a></li>
|
||
<li class="list-group-item pl-0 ml-0 border-0 pl-0 pt-0 pb-1 pr-0 m-0 mr-3"><a href="1a.html#language-projects">Language Projects</a></li>
|
||
<li class="list-group-item pl-0 ml-0 border-0 pl-0 pt-0 pb-1 pr-0 m-0 mr-3"><a href="1a.html#chocopy-project">ChocoPy Project</a></li>
|
||
<li class="list-group-item pl-0 ml-0 border-0 pl-0 pt-0 pb-1 pr-0 m-0 mr-3"><a href="1a.html#updating-spoofax">Updating Spoofax</a></li>
|
||
<li class="list-group-item pl-0 ml-0 border-0 pl-0 pt-0 pb-1 pr-0 m-0 mr-3"><a href="1a.html#references">References</a></li>
|
||
</ul>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row">
|
||
<div class="col-12">
|
||
<div class="border-top border-bottom border-grey mt-3 pt-3">
|
||
<nav>
|
||
<ul class="pagination justify-content-center">
|
||
|
||
<li class="page-item">
|
||
<a class="page-link" href="0b.html">
|
||
Previous
|
||
</a>
|
||
</li>
|
||
|
||
|
||
<li class="page-item">
|
||
<a class="page-link" href="1b.html">Next</a>
|
||
</li>
|
||
|
||
<li class="page-item">
|
||
<a class="page-link" href="../project/index.html">
|
||
Index
|
||
</a>
|
||
</li>
|
||
</ul>
|
||
</nav>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
<!-- Optional JavaScript -->
|
||
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
|
||
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
|
||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
|
||
|
||
</body>
|
||
</html>
|