nyacc/lang/README

Copyright (C) 2017,2019 Matthew R. Wette

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.  This file is offered as-is,
without any warranty.

To run the demos in this directory please navigate up do the examples/
directory and source the file env.sh.

# Manifest

calc.scm		interactive parser, quick and dirty
			  $ guile calc.scm
			  > 1 + 2
			  3
			  >

mach.scm		spec for parser; tables in mach.d/ created via
			  $ guile Umach.scm
			Umach.scm will also generate ,file.txt and ,expr.txt

parser.scm		parse-calc (for full language) and
			read-calc for expressions

compiler.scm		compiles output of read-calc to Tree-IL
			see spec.scm
  
../../../language/spec.scm
			spec file for Guile's language support; see below
 			depends on parser.scm and compiler.scm

# Using calc as Guile extension language.

Currently, debug is defined in compiler.scm and parser.scm so that you
can see the parser and compiler at work.

  scheme@(guile-user)> ,L calc
  calc@(guile-user)> 1 + 1
  ...
  $1 = 2
  calc@(guile-user)> a = 4 + 4
  ...
  $2 = 8
  calc@(guile-user> ,L scheme
  scheme@(guile-user)> a
  $3 = 8


Enjoy!
