@supragya supragya released this Apr 26, 2017 · 6 commits to master since this release

Assets 3

HLang Prototype - 1

This is a prototype for HLang interpreter. The following information may be useful

Building HLang from source

It is advised if you want to evaluate a stable system, please download HLang-interpreter*.zip file given down below, unzip it and execute it straight. Still, if you want to build the current version from source, make sure you have the following tools:

  1. bison (GNU Bison) 3.0.4
  2. flex 2.6.0
  3. gcc 5.4.0

It is not absolutely necessary that you may need the exact version numbers of the gives tools, however this is on what the source was build initially. Check your versions using bison --version, flex --version and gcc version commands. Once you have those, download the code from the release, unzip to a local machine. Then cd to the codebase (folder HLang here) and use the following commands:

To build the system:


To build the system, clean:

make clean

To revert back to original sources:

make reset

To run the interpreter

./run <verbose-options>

Verbose options are options that you provide while executing the interpreter stating what modules should print the verbose outputs. Following are the letters corresponding to various modules:

a :  Abstract Syntax tree
l :  Lexer
p :  Parser
v :  Variable Management subsystem
e :  Executor
s :  Scope Management subsystem

For example if you want to run the interpreter with verbose output on screen from Abstract Syntax Tree, you may use: ./run a. If you want to run the interpreter with verbose output from parser, you may use ./run p. In case, verbose output from multiple modules is required, they can be stacked for that, in the following manner:

./run lpa

The above gives verbose output from all of lexer, parser and abstract syntax tree. Also it is worth noting that ./run lpa is equivalent to ./run alp. The order does not matter.


What is the directory structure? Where are the tests?

The directory structure of HLang is as provided. The tests lie in tests folder. You run the interpreter using ./run <verbose-options> from the directory where both tests and bin folders are visible. Any testing (for AAd04 atleast) can be done using modifications in tests/aux_test.hl. If however, you want to test a script which is named differently, modify the same in main function of the HLang Interpreter.