# This file defines translations into \TeX\ code for reserved words, and keywords of Icon.
# It also defines translations for special tokens, such as <=.


# Initialize the translation table to contain nulls.
translation := table()


# Reserved words.
translation["by"] := "{\\ttb{}by}"
translation["break"] := "{\\ttb{}break}"
translation["case"] := "{\\ttb{}case}"
translation["create"] := "{\\ttb{}create}"
translation["default"] := "{\\ttb{}default}"
translation["do"] := "{\\ttb{}do}"
translation["else"] := "{\\ttb{}else}"
translation["end"] := "{\\ttb{}end}"
translation["every"] := "{\\ttb{}every}"
translation["global"] := "{\\ttb{}global}"
translation["fail"] := "{\\ttb{}fail}"
translation["if"] := "{\\ttb{}if}"
translation["initial"] := "{\\ttb{}initial}"
translation["link"] := "{\\ttb{}link}"
translation["local"] := "{\\ttb{}local}"
translation["next"] := "{\\ttb{}next}"
translation["not"] := "{\\ttb{}not}"
translation["of"] := "{\\ttb{}of}"
translation["procedure"] := "{\\ttb{}procedure}"
translation["record"] := "{\\ttb{}record}"
translation["repeat"] := "{\\ttb{}repeat}"
translation["return"] := "{\\ttb{}return}"
translation["static"] := "{\\ttb{}static}"
translation["suspend"] := "{\\ttb{}suspend}"
translation["to"] := "{\\ttb{}to}"
translation["then"] := "{\\ttb{}then}"
translation["while"] := "{\\ttb{}while}"
translation["until"] := "{\\ttb{}until}"

# Icon keywords.
translation["&ascii"] := "{\\ttb{}&ascii}"
translation["&clock"] := "{\\ttb{}\&clock}"
translation["&collections"] := "{\\ttb{}\&collections}"
translation["&cset"] := "{\\ttb{}\&cset}"
translation["&current"] := "{\\ttb{}\&current}"
translation["&date"] := "{\\ttb{}\&date}"
translation["&dateline"] := "{\\ttb{}\&dateline}"
translation["&digits"] := "{\\ttb{}\&digits}"
translation["&error"] := "{\\ttb{}\&error}"
translation["&errornumber"] := "{\\ttb{}\&errornumber}"
translation["&errortext"] := "{\\ttb{}\&errortext}"
translation["&errorvalue"] := "{\\ttb{}\&errorvalue}"
translation["&errout"] := "{\\ttb{}\&errout}"
translation["&fail"] := "{\\ttb{}\&fail}"
translation["&features"] := "{\\ttb{}\&features}"
translation["&file"] := "{\\ttb{}\&file}"
translation["&host"] := "{\\ttb{}\&host}"
translation["&input"] := "{\\ttb{}\&input}"
translation["&lcase"] := "{\\ttb{}\&lcase}"
translation["&letters"] := "{\\ttb{}\&letters}"
translation["&level"] := "{\\ttb{}\&level}"
translation["&line"] := "{\\ttb{}\&line}"
translation["&main"] := "{\\ttb{}\&main}"
translation["&null"] := "{\\ttb{}\&null}"
translation["&output"] := "{\\ttb{}\&output}"
translation["&pos"] := "{\\ttb{}\&pos}"
translation["&random"] := "{\\ttb{}\&random}"
translation["&regions"] := "{\\ttb{}\&regions}"
translation["&source"] := "{\\ttb{}\&source}"
translation["&storage"] := "{\\ttb{}\&storage}"
translation["&subject"] := "{\\ttb{}\&subject}"
translation["&time"] := "{\\ttb{}\&time}"
translation["&trace"] := "{\\ttb{}\&trace}"
translation["&ucase"] := "{\\ttb{}\&ucase}"
translation["&version"] := "{\\ttb{}\&version}"

# Added in Version 8.10.
translation["&allocated"] := "{\\ttb{}\&allocated}"
translation["&e"] := "{\\ttb{}\&e}"
translation["&phi"] := "{\\ttb{}\&phi}"
translation["&pi"] := "{\\ttb{}\&pi}"
translation["&progname"] := "{\\ttb{}\&progname}"

# Added by the X interface.
#translation["&col"] := "{\\ttb{}\&col}"
#translation["&control"] := "{\\ttb{}\&control}"
#translation["&interval"] := "{\\ttb{}\&interval}"
#translation["&ldrag"] := "{\\ttb{}\&ldrag}"
#translation["&lpress"] := "{\\ttb{}\&lpress}"
#translation["&lrelease"] := "{\\ttb{}\&lrelease}"
#translation["&mdrag"] := "{\\ttb{}\&mdrag}"
#translation["&meta"] := "{\\ttb{}\&meta}"
#translation["&mpress"] := "{\\ttb{}\&mpress}"
#translation["&mrelease"] := "{\\ttb{}\&mrelease}"
#translation["&resize"] := "{\\ttb{}\&resize}"
#translation["&rdrag"] := "{\\ttb{}\&rdrag}"
#translation["&row"] := "{\\ttb{}\&row}"
#translation["&rpress"] := "{\\ttb{}\&rpress}"
#translation["&rrelease"] := "{\\ttb{}\&rrelease}"
#translation["&shift"] := "{\\ttb{}\&shift}"
#translation["&window"] := "{\\ttb{}\&window}"
#translation["&x"] := "{\\ttb{}\&x}"
#translation["&y"] := "{\\ttb{}\&y}"


# Translator directives (V8.10).
translation["$include"] := "{\\ttb{}\\$include}"
translation["$line"] := "{\\ttb\\$line}"
translation["$define"] := "{\\ttb\\$define}"
translation["$undef"] := "{\\ttb\\$undef}"
translation["$ifdef"] := "{\\ttb\\$ifdef}"
translation["$ifndef"] := "{\\ttb\\$ifndef}"
translation["$else"] := "{\\ttb\\$else}"
translation["$endif"] := "{\\ttb\\$endif}"


# Translations for operators, and other good stuff.
translation["{"] := "\\{"
translation["}"] := "\\}"
translation["\\"] := "\\verb|\\|"
translation["<"] := "\\(<\\)"
translation[">"] := "\\(>\\)"
translation["<="] := "\\(\\le\\)"
translation[">="] := "\\(\\ge\\)"
translation["~="] := "\\(\\neq\\)"
translation["++"] := "\\(\\cup\\)"
translation["**"] := "\\(\\cap\\)"
translation["--"] := "\\(\\setminus\\)"
translation["&"] := "\\(\\land\\)"  # Conjunction
translation["|"] := "\\(\\lor\\)"   # Alternation
translation[">>"] := "\\(\\succ\\)"
translation["<<"] := "\\(\\prec\\)"
translation["||"] := "\\(\\Vert\\)"
translation[">>="] := "\\(\\succeq\\)"
translation["<<="] := "\\(\\preceq\\)"
#translation["=="] := ?
#translation["~=="] := ?
translation["==="] := "\\(\\equiv\\)"
translation["~==="] := "\\(\\not\\equiv\\)"
translation[":=:"] := "\\(\\leftrightarrow\\)"
translation["<->"] := "\\(\\leftrightarrow\\)"
