Skip to content

A small language project to help me learn more about compilers (Formal language theory)

License

Notifications You must be signed in to change notification settings

hpedrorodrigues/PingLang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ping Lang

A very small language project to help me to learn more about Abstract Syntax Tree.

This compiler is WIP.

A example of this language specification can be found here.

Supported keywords

List of commands supported and planning to implement:

  • show: Just prints a message in your stdout
  • #: Add a comment to your code
  • def: Add a variable

Usage

Node

var Ping = require('ping')
var code = 'show "just a message" # Just a comment';

console.log(Ping.compile(code));

Browser

<script src="path/to/ping.js"></script>
var code = 'show "just a message"';
var result = Ping.compile(code);

document.body.innerHTML = result;

Build

Type npm run build in your tty and be happy. :D

Sample

Type npm run sample in your tty and see dist/result/result.js file.

About

A small language project to help me learn more about compilers (Formal language theory)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published