Skip to content

BrickBot/Ada-Mindstorms

Repository files navigation

These files are the source code for Ada/Mindstorms 2.0, the most important part of which is ada2nqc, an Ada to NQC translator. NQC is the "Not Quite C" language for Lego Mindstorms developed by Dave Baum (http://www.enteract.com/~dbaum/nqc).

ada2nqc.adb is the top level file in the make tree. If you have AdaGIDE, building ada2nqc will automatically construct the translator executable ada2nqc.exe. Other important files are:

  • lego.adb, lego.ads: the Ada/Mindstorms API
  • trans_model.adb: contains the code that actually performs the translation
  • A95.g: an Ada grammar
  • other files: define data types and build the parse tree of the source Ada program

If you are making changes to the translator and/or adding functionality, you should never need to change anything apart from lego.adb, lego.ads, trans_model.adb, and possibly ada2nqc.adb if you are adding new command line arguments or options.

USAGE: from a DOS prompt,

ada2nqc foo
	Translates foo.adb in the current directory to foo.nqc in the current directory

ada2nqc foo bar
	Translates foo.adb in the current directory to bar.nqc in the current directory

Other extensions can be supplied; the default is .adb for the input file (first argument) and .nqc for the output file (second argument).

Links (some might need to be looked up via archive.org)