CCGlab tips

  1. Please do not change the contents of standard ccglab repository files in your CCGLAB_HOME directory, otherwise you will lose them in the next git pull. The script ccglab is accessible from anywhere.
  2. It is best to create a separate directory for every project. Many files might be created for a full project depending on your need (source grammar, translations to Lisp code, models, their translations, supervision files and their translation).
  3. Run ccglab script after changing to your project directory. That way you don't have to remember pathnames of your files.
  4. Parts of speech in .ccg grammars are entirely up to you. The manual explains why they are needed.
  5. If you are tired of writing LF constants in double quotes, like me, look no further: exclaim them. Write "life-prime" as !life-prime. It is internally converted to a string by a reader macro.
  6. If there is a syntax error in your .ccg file, you will find out about it when you try to load the grammar. It will fail. Check the .ccg.lisp file; it shows you the place at which the first error occured, as reported by the LALR parser. Fix that and run (make-and-load-grammar) to remake the .ccg.lisp file.
  7. The same is true of .supervision files. If there is an error in the file, check out the .sup file it is supposed to generate to find out the FIRST error. Re-run make-supervision after fixing the error in .supervision file.
  8. If you have installed and re-installed CCGlab many times, check your .bashrc and .bash_profile files; there will be various appends of same material at the end. The last one counts. Get rid of the earlier ones, although they are harmless and non-effective. (In fact, keep a safe copy of .bashrc and .bash_profile somewhere if you do multiple installs.)
  9. Make sure that your PATH shell variable is pointing to the correct installation of CCGlab if you've done multiple installs. A new install appends $CCGLAB_HOME/bin at the very beginning of PATH to override earlier installs. To see your PATH variable's value, do `echo $PATH'.