KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

parigp.php 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. <?php
  2. /*************************************************************************************
  3. * parigp.php
  4. * --------
  5. * Author: Charles R Greathouse IV (charles@crg4.com)
  6. * Copyright: 2011 Charles R Greathouse IV (http://math.crg4.com/)
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2011/05/11
  9. *
  10. * PARI/GP language file for GeSHi.
  11. *
  12. * CHANGES
  13. * -------
  14. * 2011/07/09 (1.0.8.11)
  15. * - First Release
  16. *
  17. * TODO (updated 2011/07/09)
  18. * -------------------------
  19. *
  20. *
  21. *************************************************************************************
  22. *
  23. * This file is part of GeSHi.
  24. *
  25. * GeSHi is free software; you can redistribute it and/or modify
  26. * it under the terms of the GNU General Public License as published by
  27. * the Free Software Foundation; either version 2 of the License, or
  28. * (at your option) any later version.
  29. *
  30. * GeSHi is distributed in the hope that it will be useful,
  31. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  32. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  33. * GNU General Public License for more details.
  34. *
  35. * You should have received a copy of the GNU General Public License
  36. * along with GeSHi; if not, write to the Free Software
  37. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  38. *
  39. ************************************************************************************/
  40. $language_data = array(
  41. 'LANG_NAME' => 'PARI/GP',
  42. 'COMMENT_SINGLE' => array(1 => '\\\\'),
  43. 'COMMENT_MULTI' => array('/*' => '*/'),
  44. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  45. 'QUOTEMARKS' => array('"'),
  46. 'ESCAPE_CHAR' => '\\',
  47. 'NUMBERS' => array(
  48. # Integers
  49. 1 => GESHI_NUMBER_INT_BASIC,
  50. # Reals
  51. 2 => GESHI_NUMBER_FLT_SCI_ZERO
  52. ),
  53. 'KEYWORDS' => array(
  54. 1 => array(
  55. 'addprimes','bestappr','bezout','bezoutres','bigomega','binomial',
  56. 'chinese','content','contfrac','contfracpnqn','core','coredisc',
  57. 'dirdiv','direuler','dirmul','divisors','eulerphi','factor',
  58. 'factorback','factorcantor','factorff','factorial','factorint',
  59. 'factormod','ffgen','ffinit','fflog','fforder','ffprimroot',
  60. 'fibonacci','gcd','hilbert','isfundamental','ispower','isprime',
  61. 'ispseudoprime','issquare','issquarefree','kronecker','lcm',
  62. 'moebius','nextprime','numbpart','numdiv','omega','partitions',
  63. 'polrootsff','precprime','prime','primepi','primes','qfbclassno',
  64. 'qfbcompraw','qfbhclassno','qfbnucomp','qfbnupow','qfbpowraw',
  65. 'qfbprimeform','qfbred','qfbsolve','quadclassunit','quaddisc',
  66. 'quadgen','quadhilbert','quadpoly','quadray','quadregulator',
  67. 'quadunit','removeprimes','sigma','sqrtint','stirling',
  68. 'sumdedekind','zncoppersmith','znlog','znorder','znprimroot',
  69. 'znstar','Col','List','Mat','Mod','Pol','Polrev','Qfb','Ser','Set',
  70. 'Str','Strchr','Strexpand','Strtex','Vec','Vecrev','Vecsmall',
  71. 'binary','bitand','bitneg','bitnegimply','bitor','bittest','bitxor',
  72. 'ceil','centerlift','component','conj','conjvec','denominator',
  73. 'floor','frac','imag','length','lift','norm','norml2','numerator',
  74. 'numtoperm','padicprec','permtonum','precision','random','real',
  75. 'round','simplify','sizebyte','sizedigit','truncate','valuation',
  76. 'variable','ellL1','elladd','ellak','ellan','ellanalyticrank',
  77. 'ellap','ellbil','ellchangecurve','ellchangepoint','ellconvertname',
  78. 'elldivpol','elleisnum','elleta','ellgenerators','ellglobalred',
  79. 'ellgroup','ellheight','ellheightmatrix','ellidentify','ellinit',
  80. 'ellisoncurve','ellj','elllocalred','elllog','elllseries',
  81. 'ellminimalmodel','ellmodulareqn','ellorder','ellordinate',
  82. 'ellpointtoz','ellpow','ellrootno','ellsearch','ellsigma','ellsub',
  83. 'elltaniyama','elltatepairing','elltors','ellweilpairing','ellwp',
  84. 'ellzeta','ellztopoint','bnfcertify','bnfcompress',
  85. 'bnfdecodemodule','bnfinit','bnfisintnorm','bnfisnorm',
  86. 'bnfisprincipal','bnfissunit','bnfisunit','bnfnarrow','bnfsignunit',
  87. 'bnfsunit','bnrL1','bnrclassno','bnrclassnolist','bnrconductor',
  88. 'bnrconductorofchar','bnrdisc','bnrdisclist','bnrinit',
  89. 'bnrisconductor','bnrisprincipal','bnrrootnumber','bnrstark',
  90. 'dirzetak','factornf','galoisexport','galoisfixedfield',
  91. 'galoisgetpol','galoisidentify','galoisinit','galoisisabelian',
  92. 'galoisisnormal','galoispermtopol','galoissubcyclo',
  93. 'galoissubfields','galoissubgroups','idealadd','idealaddtoone',
  94. 'idealappr','idealchinese','idealcoprime','idealdiv','idealfactor',
  95. 'idealfactorback','idealfrobenius','idealhnf','idealintersect',
  96. 'idealinv','ideallist','ideallistarch','ideallog','idealmin',
  97. 'idealmul','idealnorm','idealpow','idealprimedec','idealramgroups',
  98. 'idealred','idealstar','idealtwoelt','idealval','matalgtobasis',
  99. 'matbasistoalg','modreverse','newtonpoly','nfalgtobasis','nfbasis',
  100. 'nfbasistoalg','nfdetint','nfdisc','nfeltadd','nfeltdiv',
  101. 'nfeltdiveuc','nfeltdivmodpr','nfeltdivrem','nfeltmod','nfeltmul',
  102. 'nfeltmulmodpr','nfeltnorm','nfeltpow','nfeltpowmodpr',
  103. 'nfeltreduce','nfeltreducemodpr','nfelttrace','nfeltval','nffactor',
  104. 'nffactorback','nffactormod','nfgaloisapply','nfgaloisconj',
  105. 'nfhilbert','nfhnf','nfhnfmod','nfinit','nfisideal','nfisincl',
  106. 'nfisisom','nfkermodpr','nfmodprinit','nfnewprec','nfroots',
  107. 'nfrootsof1','nfsnf','nfsolvemodpr','nfsubfields','polcompositum',
  108. 'polgalois','polred','polredabs','polredord','poltschirnhaus',
  109. 'rnfalgtobasis','rnfbasis','rnfbasistoalg','rnfcharpoly',
  110. 'rnfconductor','rnfdedekind','rnfdet','rnfdisc','rnfeltabstorel',
  111. 'rnfeltdown','rnfeltreltoabs','rnfeltup','rnfequation',
  112. 'rnfhnfbasis','rnfidealabstorel','rnfidealdown','rnfidealhnf',
  113. 'rnfidealmul','rnfidealnormabs','rnfidealnormrel',
  114. 'rnfidealreltoabs','rnfidealtwoelt','rnfidealup','rnfinit',
  115. 'rnfisabelian','rnfisfree','rnfisnorm','rnfisnorminit','rnfkummer',
  116. 'rnflllgram','rnfnormgroup','rnfpolred','rnfpolredabs',
  117. 'rnfpseudobasis','rnfsteinitz','subgrouplist','zetak','zetakinit',
  118. 'plot','plotbox','plotclip','plotcolor','plotcopy','plotcursor',
  119. 'plotdraw','ploth','plothraw','plothsizes','plotinit','plotkill',
  120. 'plotlines','plotlinetype','plotmove','plotpoints','plotpointsize',
  121. 'plotpointtype','plotrbox','plotrecth','plotrecthraw','plotrline',
  122. 'plotrmove','plotrpoint','plotscale','plotstring','psdraw',
  123. 'psploth','psplothraw','O','deriv','diffop','eval','factorpadic',
  124. 'intformal','padicappr','padicfields','polchebyshev','polcoeff',
  125. 'polcyclo','poldegree','poldisc','poldiscreduced','polhensellift',
  126. 'polhermite','polinterpolate','polisirreducible','pollead',
  127. 'pollegendre','polrecip','polresultant','polroots','polrootsmod',
  128. 'polrootspadic','polsturm','polsubcyclo','polsylvestermatrix',
  129. 'polsym','poltchebi','polzagier','serconvol','serlaplace',
  130. 'serreverse','subst','substpol','substvec','taylor','thue',
  131. 'thueinit','break','for','fordiv','forell','forprime','forstep',
  132. 'forsubgroup','forvec','if','next','return','until','while',
  133. 'Strprintf','addhelp','alarm','alias','allocatemem','apply',
  134. 'default','error','extern','externstr','getheap','getrand',
  135. 'getstack','gettime','global','input','install','kill','print1',
  136. 'print','printf','printtex','quit','read','readvec','select',
  137. 'setrand','system','trap','type','version','warning','whatnow',
  138. 'write1','write','writebin','writetex','divrem','lex','max','min',
  139. 'shift','shiftmul','sign','vecmax','vecmin','derivnum','intcirc',
  140. 'intfouriercos','intfourierexp','intfouriersin','intfuncinit',
  141. 'intlaplaceinv','intmellininv','intmellininvshort','intnum',
  142. 'intnuminit','intnuminitgen','intnumromb','intnumstep','prod',
  143. 'prodeuler','prodinf','solve','sum','sumalt','sumdiv','suminf',
  144. 'sumnum','sumnumalt','sumnuminit','sumpos','Euler','I','Pi','abs',
  145. 'acos','acosh','agm','arg','asin','asinh','atan','atanh','bernfrac',
  146. 'bernreal','bernvec','besselh1','besselh2','besseli','besselj',
  147. 'besseljh','besselk','besseln','cos','cosh','cotan','dilog','eint1',
  148. 'erfc','eta','exp','gamma','gammah','hyperu','incgam','incgamc',
  149. 'lngamma','log','polylog','psi','sin','sinh','sqr','sqrt','sqrtn',
  150. 'tan','tanh','teichmuller','theta','thetanullk','weber','zeta',
  151. 'algdep','charpoly','concat','lindep','listcreate','listinsert',
  152. 'listkill','listpop','listput','listsort','matadjoint',
  153. 'matcompanion','matdet','matdetint','matdiagonal','mateigen',
  154. 'matfrobenius','mathess','mathilbert','mathnf','mathnfmod',
  155. 'mathnfmodid','matid','matimage','matimagecompl','matindexrank',
  156. 'matintersect','matinverseimage','matisdiagonal','matker',
  157. 'matkerint','matmuldiagonal','matmultodiagonal','matpascal',
  158. 'matrank','matrix','matrixqz','matsize','matsnf','matsolve',
  159. 'matsolvemod','matsupplement','mattranspose','minpoly','qfgaussred',
  160. 'qfjacobi','qflll','qflllgram','qfminim','qfperfection','qfrep',
  161. 'qfsign','setintersect','setisset','setminus','setsearch','cmp',
  162. 'setunion','trace','vecextract','vecsort','vector','vectorsmall',
  163. 'vectorv','ellheegner'
  164. ),
  165. 2 => array(
  166. 'void','bool','negbool','small','int',/*'real',*/'mp','var','lg','pol',
  167. 'vecsmall','vec','list','str','genstr','gen','typ'
  168. ),
  169. 3 => array(
  170. 'TeXstyle','breakloop','colors','compatible','datadir','debug',
  171. 'debugfiles','debugmem','echo','factor_add_primes','factor_proven',
  172. 'format','graphcolormap','graphcolors','help','histfile','histsize',
  173. 'lines','linewrap',/*'log',*/'logfile','new_galois_format','output',
  174. 'parisize','path','prettyprinter','primelimit','prompt_cont',
  175. 'prompt','psfile','readline','realprecision','recover','secure',
  176. 'seriesprecision',/*'simplify',*/'strictmatch','timer'
  177. ),
  178. 4 => array(
  179. 'alarmer','archer','errpile','gdiver','impl','syntaxer','invmoder',
  180. 'overflower','talker','typeer','user'
  181. )
  182. ),
  183. 'SYMBOLS' => array(
  184. 1 => array(
  185. '(',')','{','}','[',']','+','-','*','/','%','=','<','>','!','^','&','|','?',';',':',',','\\','\''
  186. )
  187. ),
  188. 'CASE_SENSITIVE' => array(
  189. GESHI_COMMENTS => false,
  190. 1 => true,
  191. 2 => true,
  192. 3 => true,
  193. 4 => true
  194. ),
  195. 'STYLES' => array(
  196. 'KEYWORDS' => array(
  197. 1 => 'color: #0000ff;',
  198. 2 => 'color: #e07022;',
  199. 3 => 'color: #00d2d2;',
  200. 4 => 'color: #00d2d2;'
  201. ),
  202. 'COMMENTS' => array(
  203. 1 => 'color: #008000;',
  204. 'MULTI' => 'color: #008000;'
  205. ),
  206. 'ESCAPE_CHAR' => array(
  207. 0 => 'color: #111111; font-weight: bold;'
  208. ),
  209. 'BRACKETS' => array(
  210. 0 => 'color: #002222;'
  211. ),
  212. 'STRINGS' => array(
  213. 0 => 'color: #800080;'
  214. ),
  215. 'NUMBERS' => array(
  216. 0 => 'color: #666666;',
  217. 1 => 'color: #666666;',
  218. 2 => 'color: #666666;'
  219. ),
  220. 'METHODS' => array(
  221. 0 => 'color: #004000;'
  222. ),
  223. 'SYMBOLS' => array(
  224. 1 => 'color: #339933;'
  225. ),
  226. 'REGEXPS' => array(
  227. 0 => 'color: #e07022', # Should be the same as keyword group 2
  228. 1 => 'color: #555555'
  229. ),
  230. 'SCRIPT' => array()
  231. ),
  232. 'URLS' => array(
  233. 1 => '',
  234. 2 => '',
  235. 3 => '',
  236. 4 => ''
  237. ),
  238. 'OOLANG' => true,
  239. 'OBJECT_SPLITTERS' => array(
  240. 1 => '.'
  241. ),
  242. 'REGEXPS' => array(
  243. 0 => array( # types marked on variables
  244. GESHI_SEARCH => '(?<!\\\\ )"(t_(?:INT|REAL|INTMOD|FRAC|FFELT|COMPLEX|PADIC|QUAD|POLMOD|POL|SER|RFRAC|QFR|QFI|VEC|COL|MAT|LIST|STR|VECSMALL|CLOSURE))"',
  245. GESHI_REPLACE => '\\1',
  246. GESHI_MODIFIERS => '',
  247. GESHI_BEFORE => '"',
  248. GESHI_AFTER => '"'
  249. ),
  250. 1 => array( # literal variables
  251. GESHI_SEARCH => '(?<!\\\\)(\'[a-zA-Z][a-zA-Z0-9_]*)',
  252. GESHI_REPLACE => '\\1',
  253. GESHI_MODIFIERS => '',
  254. GESHI_BEFORE => '',
  255. GESHI_AFTER => ''
  256. )
  257. ),
  258. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  259. 'SCRIPT_DELIMITERS' => array(
  260. 2 => array(
  261. '[a-zA-Z][a-zA-Z0-9_]*:' => ''
  262. ),
  263. 3 => array(
  264. 'default(' => ''
  265. ),
  266. 4 => array(
  267. 'trap(' => ''
  268. ),
  269. ),
  270. 'HIGHLIGHT_STRICT_BLOCK' => array()
  271. );
  272. ?>