#!/bin/bash

# accept tests of our SearchExpression.g4
# and ChessShellScript.g4

# to make alias work:
shopt -s expand_aliases

#source /home/ejner/.profile

alias grun='java org.antlr.v4.runtime.misc.TestRig'


echo search \( Whiteelo = \"2010\" \) | grun ChessShellScript script -tree

# file_descriptor rule confuses the parser ?????
# write all tagnames with big capital first letter, and all directories with all small letters...
# better solution - study ANTLR better!
echo search \( white = \"ejner\" \) | grun ChessShellScript script -tree

echo pwd | grun ChessShellScript script -tree

echo " cd "  | grun ChessShellScript script -tree


echo cd \"twic\" | grun ChessShellScript script -tree


# test line comment:
ch='#';
ch_2='\n';
echo -e  "search ( Whiteelo = \"2010\" ) \n$ch a comment" | grun ChessShellScript script -tree


echo close all | grun ChessShellScript script -tree

echo close | grun ChessShellScript script -tree

echo close 0 | grun ChessShellScript script -tree



echo open \"twic222.pgn\" | grun ChessShellScript script -tree



