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