Skip to content
Learning some of the principles behind compilation (inspired by bit.ly/compilers-principles)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
dist
docs
grammar
lex
src
test
.babelrc
.eslintrc-production.json
.eslintrc-test.json
.eslintrc.json
.gitattributes
.gitignore
.travis.yml
LICENSE
Makefile
README.md
codecov.yml
index.html.ejs
karma.conf.js
package-lock.json
package.json
postcss.config.js
stats.json
webpack.config.js
yarn.lock

README.md

Learning how compilers work

codecov Test Coverage CircleCI Build Status Maintainability

Demo

JSON Editor made with Vue components and ANTLR4

About

A simple JSON editor implemented as an exercice to learn more about:

  • context-free grammars (BNF)
  • languages,
  • lexers and
  • parsers

Installation

Install git and clone the project repository

git clone https://github.com/thierrymarianne/project-learning-compilers.git

Install node.js, preferally with nvm

Install the project JavaScript dependencies with yarn

yarn install

or npm

npm install

Development

Run a development server with webpack

npm run webpack-serve

Distribute

npm run distribute

Test

npm run test

Possible applications of the underling concepts

  • Allow an interactive selection of packages among those available from remotes (e.g. package.json with npmjs.org or composer.json with packagist.org) to remove tedium from these tasks
  • Make a semantic diff of parsed tokens (in order to consider not only characters deletion / additions but also variations in language usage, control flow, variables and methods between refactoring sessions to identify patterns of improvement by grouping small and repeatable actions already indexed at https://refactoring.com), to provide help in reorganizing code in a reproducible way (think wayback machine / time travel for code) so that code review might also be an occasion to replay how decisions were made in context.
You can’t perform that action at this time.