Please review any and all PUBLIC repositories, groups and associate files. These allow anyone on the Internet to access without authentication. Repository and group owners are responsible for their content and permission settings. Go to your project(s), click on Settings > General and expand the "Visibility, project features, permissions" to change this setting.

Add comments to which have the same numbered steps as the documentation.

parent 4bd13696
# $1 - schema name, $2 - scope
# Show the help text
if [[ "$1" == "-h" ]] || [[ -z "$*" ]]; then
echo "Usage: `basename $0 $1` [mp_filepath] [scope]"
exit 0
# Setup the /build folder
if [ ! -d "build" ]; then
mkdir build
......@@ -15,20 +17,31 @@ if [ ! -f build/Include.h ]; then
cp Code/includes/* build/
cp Code/*.rig build/
# Copy the mp file into the build folder
cp $1 build/
# Switch to build folder and run build scripts
cd build
mp_filename=$(basename $1)
# 1. Compile parser
$rig/rc MP2-parser
# 2. Run parser to create tree
$rig/ic MP2-parser $mp_basename tree $2 > temp.txt
# 3. Compile generator
$rig/rc MP2-generator
# 4. Run generator to create C++ code
$rig/ic MP2-generator tree > temp2.txt
rm tree *.rsc
echo "C++ compiler: g++ $mp_basename.cpp -o $mp_basename -fast"
#time /Developer/usr/bin/g++ "$mp_basename.cpp" -o $mp_basename -fast
# 5. Compile the C++ code
time g++ "${mp_basename}.cpp" -o $mp_basename -Ofast
echo "$mp_basename run: $mp_basename>$mp_basename.txt"
# 6. Run the compiled C++ program
time ./$mp_basename>"${mp_basename}.txt"
echo "Completed $mp_basename for scope $2"
mv $mp_basename.json ../output/
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment