#compdef tom tom.src
#

_arguments -C -s \
    '-X[Defines an alternate XML configuration file]:include path:_files -/' \
    {-h,--help}'[Print help]' \
    {-V,--version}'[Print version]' \
    {-v,--verbose}'[Set verbose mode on]' \
    {-i,--intermediate}'[Generate intermediate files]' \
    {-j,--jCode}'[Generate Java code]' \
    {-c,--cCode}'[Generate C code]' \
    '--camlCode[Generate Caml code]' \
    {-e,--encoding}'[Specify the character encoding]:encoding' \
    {-d,--destdir}'[Set output directory]:include path:_dirs -/' \
    {-o,--output}'[Set output file name]:include path:_files -/' \
    {-D,--noDeclaration}'[Do not generate code for declarations]' \
    {-W,--wall}'[Print all warnings]' \
    {-l,--lazyType}'[Use universal type]' \
    {-I,--import}'[Path for %include]:include path:_files -/' \
    '--protected[Generate protected functions]' \
    '--noStatic[Generate non static functions]' \
    {-O,--optimize}'[Optimized generated code]' \
    {-O2,--optimize2}'[Optimized generated code]' \
    '--debug[Generate debug primitives]' \
    '--memory[Add memory management while debugging]' \
    {-p,--pretty}'[Pretty print code, losing file numbers]' \
    '--verify[Generates correctness proof obligations]' \
    '*:tom_files:_files -g \*.\(t\|tom\)'

return 0
