Terminal Macro.xml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?xml version="1.0"?>
  2. <!--
  3. Archivode definición de sintaxis para el lenguaje de macros de Tito's terminal.
  4. Este archivo se usa solamente para el resaltado de sinyaxis y autocompletado.
  5. Debe ser consistente con la definición del lexer de Tito's Terminal
  6. -->
  7. <Language name="Terminal Macro" ext="ttm" >
  8. <Completion>
  9. <List Name="ListSintax">
  10. "IF \_expresion THEN &#xD; &#xD;ENDIF"
  11. "IF \_expresion THEN &#xD; &#xD;ELSE &#xD; &#xD;ENDIF"
  12. "WHILE expresion &#xD; &#xD;ENDWHILE"
  13. "timeout := 20"
  14. "CONNECT ""192.168.1.1"""
  15. "CONNECTSSH ""192.168.1.1"""
  16. "MESSAGEBOX ""\_"""
  17. "SENDLN ""text to send"""
  18. "WAIT ""text to wait"""
  19. "PAUSE \_1"
  20. "curIP := ""192.168.1.1"""
  21. "curTYPE := ""telnet"""
  22. "curTYPE := ""SSH"""
  23. "curTYPE := ""Other"""
  24. "curPORT := 23"
  25. "curENDLINE := ""LF"""
  26. "curENDLINE := ""CRLF"""
  27. "curAPP := ""cmd"""
  28. "promptDETECT := true"
  29. "promptSTART := ""$"""
  30. "promptEND := ""]"""
  31. "log \_1"
  32. "FILEOPEN n,"file.txt",0"
  33. "FILEWRITE n, ""hola"""
  34. "FILECLOSE n "
  35. IFA
  36. </List>
  37. <OpenOn AfterPattern='identifier'>
  38. <Include list="ListSintax"/>
  39. <Include Attribute="Keyword"/>
  40. <Include Attribute="Types"/>
  41. <Include Attribute="Vars"/>
  42. </OpenOn>
  43. fulano "el
  44. mengano"
  45. </Completion>
  46. <Attribute Name="Keyword" ForeCol="blue" Style="b"> </Attribute>
  47. <Attribute Name="String" ForeCol="black" BackCol="#FFFF80" > </Attribute>
  48. <Attribute Name="Types" ForeCol="blue"> </Attribute>
  49. <Attribute Name="Vars"> </Attribute>
  50. <!--Esta definicón sigue la definición de sintaxis del lexer. Revisar antes de hacer cambios-->
  51. <Identifiers CharsStart= "A..Za..z_" Content = "A..Za..z0..9_">
  52. <!-- Delimitadores -->
  53. <token attribute="Keyword"> ENDIF ELSE ELSEIF </token>
  54. <!-- Boolean -->
  55. <token attribute="Keyword"> true false </token>
  56. <!-- Funciones del sistema -->
  57. <token attribute="Keyword">
  58. CLEAR CONNECT CONNECTSSH DISCONNECT SENDLN WAIT PAUSE STOP
  59. LOGOPEN LOGWRITE LOGCLOSE LOGPAUSE LOGSTART
  60. FILEOPEN FILECLOSE FILEWRITE
  61. MESSAGEBOX CAPTURE ENDCAPTURE EDIT DETECT_PROMPT
  62. </token>
  63. <!-- Estructuras -->
  64. <token attribute="Keyword"> IF </token>
  65. <!-- Otros -->
  66. <token attribute="Keyword"> THEN </token>
  67. <!-- Variables -->
  68. <token attribute="Vars">
  69. timeout
  70. curIP curTYPE curPORT curENDLINE curAPP
  71. promptDETECT promptSTART promptEND
  72. </token>
  73. </Identifiers>
  74. <Token CharsStart="0..9" Content = '0..9.' Attribute='NUMBER'> </Token>
  75. <Token CharsStart="$" Content = '0..9ABCDEFabcdef' Attribute='NUMBER'> </Token>
  76. <String Start="'" End="'" Multiline="true"></String>
  77. <String Start='"' End='"' Multiline="true"></String>
  78. <Token CharsStart="#" Content = '0..9' Attribute='STRING'> </Token>
  79. <Comment Start="//" ></Comment>
  80. <Comment Start="/*" End="*/" Multiline="true"></Comment>
  81. <Section Name="unit" Start="unit"></Section>
  82. </Language>