diff options
108 files changed, 10013 insertions, 2177 deletions
@@ -16,6 +16,7 @@ Other contributors, listed alphabetically, are: * Paul Baumgart, 280 North, Inc. -- Objective-J lexer * Michael Bayer -- Myghty lexers * John Benediktsson -- Factor lexer +* Christopher Bertels -- Fancy lexer * Jarrett Billingsley -- MiniD lexer * Adam Blinkinsop -- Haskell, Redcode lexers * Frits van Bommel -- assembler lexers @@ -27,8 +28,10 @@ Other contributors, listed alphabetically, are: * Nick Efford -- Python 3 lexer * Artem Egorkine -- terminal256 formatter * James H. Fisher -- PostScript lexer -* Naveen Garg - Autohotkey lexer +* Naveen Garg -- Autohotkey lexer * Laurent Gautier -- R/S lexer +* Alex Gaynor -- PyPy log lexer +* Bertrand Goetzmann -- Groovy lexer * Krzysiek Goj -- Scala lexer * Matt Good -- Genshi, Cheetah lexers * Patrick Gotthardt -- PHP namespaces support @@ -36,6 +39,7 @@ Other contributors, listed alphabetically, are: * Matthew Harrison -- SVG formatter * Steven Hazel -- Tcl lexer * Aslak Hellesøy -- Gherkin lexer +* Jordi Gutiérrez Hermoso -- Octave lexer * David Hess, Fish Software, Inc. -- Objective-J lexer * Varun Hiremath -- Debian control lexer * Ben Hollis -- Mason lexer @@ -50,8 +54,11 @@ Other contributors, listed alphabetically, are: * Simone Margaritelli -- Hybris lexer * Kirk McDonald -- D lexer * Stephen McKamey -- Duel/JBST lexer +* Brian McKenna -- F# lexer * Lukas Meuser -- BBCode formatter, Lua lexer +* Michael Mior -- Awk lexer * Paulo Moura -- Logtalk lexer +* Mher Movsisyan -- DTD lexer * Ana Nelson -- Ragel, ANTLR, R console lexers * Nam T. Nguyen -- Monokai style * Jesper Noehr -- HTML formatter "anchorlinenos" @@ -60,6 +67,7 @@ Other contributors, listed alphabetically, are: * Jon Parise -- Protocol buffers lexer * Ronny Pfannschmidt -- BBCode lexer * Benjamin Peterson -- Test suite refactoring +* Dominik Picheta -- Nimrod lexer * Justin Reidy -- MXML lexer * Lubomir Rintel -- GoodData MAQL and CL lexers * Andre Roberge -- Tango style @@ -71,8 +79,10 @@ Other contributors, listed alphabetically, are: * Ken Schutte -- Matlab lexers * Tassilo Schweyer -- Io, MOOCode lexers * Joerg Sieker -- ABAP lexer +* Robert Simmons -- Standard ML lexer * Kirill Simonov -- YAML lexer * Steve Spigarelli -- XQuery lexer +* Jerome St-Louis -- eC lexer * Tiberius Teng -- default style overhaul * Jeremy Thurgood -- Erlang, Squid config lexers * Erick Tryzelaar -- Felix lexer @@ -82,5 +92,6 @@ Other contributors, listed alphabetically, are: * Dietmar Winkler -- Modelica lexer * Nils Winter -- Smalltalk lexer * Davy Wybiral -- Clojure lexer +* Alex Zimin -- Nemerle lexer Many thanks for all contributions! @@ -4,9 +4,49 @@ Pygments changelog Issue numbers refer to the tracker at http://bitbucket.org/birkenfeld/pygments-main/issues. +Version 1.5 +----------- +(codename not decided, released Jul xx, 2011) + +- Lexers added: + + * Awk (#630) + * Fancy (#633) + * PyPy Log + * eC + * Nimrod + * Nemerle (#667) + * F# (#353) + * Groovy (#501) + * PostgreSQL (#660) + * DTD + * Gosu + * Octave (PR#22) + * Standard ML (PR#14) + +- In the LaTeX formatter, escape special &, < and > chars (#648). + +- In the LaTeX formatter, fix display problems for styles with token + background colors (#670). + +- Enhancements to the Squid conf lexer (#664). + +- Several fixes to the reStructuredText lexer (#636). + +- Recognize methods in the ObjC lexer (#638). + +- Fix Lua "class" highlighting: it does not have classes (#665). + +- Fix degenerate regex in Scala lexer (#671). + +- Fix number pattern order in Ocaml lexer (#647). + +- Fix generic type highlighting in ActionScript 3 (#666). + + Version 1.4 ----------- -(codename Unschärfe, released Jan 03, 2010) +(codename Unschärfe, released Jan 03, 2011) - Lexers added: @@ -1,4 +1,4 @@ -Copyright (c) 2006-2010 by the respective authors (see AUTHORS file). +Copyright (c) 2006-2011 by the respective authors (see AUTHORS file). All rights reserved. Redistribution and use in source and binary forms, with or without @@ -4,7 +4,7 @@ # # Combines scripts for common tasks. # -# :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. +# :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. # :license: BSD, see LICENSE for details. # diff --git a/docs/generate.py b/docs/generate.py index e5e7eaa0..79095d38 100644 --- a/docs/generate.py +++ b/docs/generate.py @@ -6,7 +6,7 @@ Generates a bunch of html files containing the documentation. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/docs/src/plugins.txt b/docs/src/plugins.txt index 335cf4ce..a6f8d7b0 100644 --- a/docs/src/plugins.txt +++ b/docs/src/plugins.txt @@ -80,10 +80,9 @@ How To Use Entrypoints This documentation doesn't explain how to use those entrypoints because this is covered in the `setuptools documentation`_. That page should cover everything -you need to write a plugin. Also `this blog entry`_ might be interesting. +you need to write a plugin. .. _setuptools documentation: http://peak.telecommunity.com/DevCenter/setuptools -.. _this blog entry: http://lucumr.pocoo.org/2006/7/30/setuptools-plugins Extending The Core diff --git a/external/markdown-processor.py b/external/markdown-processor.py index 0371af2b..b7ebb7f4 100644 --- a/external/markdown-processor.py +++ b/external/markdown-processor.py @@ -27,7 +27,7 @@ .. _Markdown: http://www.freewisdom.org/projects/python-markdown/ - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/external/moin-parser.py b/external/moin-parser.py index 6d55004f..bc550b89 100644 --- a/external/moin-parser.py +++ b/external/moin-parser.py @@ -31,7 +31,7 @@ If you do not want to do that and are willing to accept larger HTML output, you can set the INLINESTYLES option below to True. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/external/rst-directive-old.py b/external/rst-directive-old.py index b7877ae7..e01e0b66 100644 --- a/external/rst-directive-old.py +++ b/external/rst-directive-old.py @@ -31,7 +31,7 @@ .. _directive documentation: http://docutils.sourceforge.net/docs/howto/rst-directives.html - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/external/rst-directive.py b/external/rst-directive.py index 934adb54..2447d082 100644 --- a/external/rst-directive.py +++ b/external/rst-directive.py @@ -31,7 +31,7 @@ .. _directive documentation: http://docutils.sourceforge.net/docs/howto/rst-directives.html - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/__init__.py b/pygments/__init__.py index bc8ae83e..13cc2448 100644 --- a/pygments/__init__.py +++ b/pygments/__init__.py @@ -22,7 +22,7 @@ .. _Pygments tip: http://bitbucket.org/birkenfeld/pygments-main/get/tip.zip#egg=Pygments-dev - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/cmdline.py b/pygments/cmdline.py index cfce216a..7db761ca 100644 --- a/pygments/cmdline.py +++ b/pygments/cmdline.py @@ -5,7 +5,7 @@ Command line interface. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import sys @@ -219,7 +219,7 @@ def main(args=sys.argv): return 0 if opts.pop('-V', None) is not None: - print 'Pygments version %s, (c) 2006-2008 by Georg Brandl.' % __version__ + print 'Pygments version %s, (c) 2006-2011 by Georg Brandl.' % __version__ return 0 # handle ``pygmentize -L`` diff --git a/pygments/console.py b/pygments/console.py index 92a8c6d8..40de59b0 100644 --- a/pygments/console.py +++ b/pygments/console.py @@ -5,7 +5,7 @@ Format colored console output. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/filter.py b/pygments/filter.py index acb0d0ad..14efce4d 100644 --- a/pygments/filter.py +++ b/pygments/filter.py @@ -5,7 +5,7 @@ Module that implements the default filter. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/filters/__init__.py b/pygments/filters/__init__.py index 504c3e1e..d469f89d 100644 --- a/pygments/filters/__init__.py +++ b/pygments/filters/__init__.py @@ -6,7 +6,7 @@ Module containing filter lookup functions and default filters. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/formatter.py b/pygments/formatter.py index 6eea3d75..53c31b7d 100644 --- a/pygments/formatter.py +++ b/pygments/formatter.py @@ -5,7 +5,7 @@ Base formatter class. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/formatters/__init__.py b/pygments/formatters/__init__.py index 0e02a522..33a63997 100644 --- a/pygments/formatters/__init__.py +++ b/pygments/formatters/__init__.py @@ -5,7 +5,7 @@ Pygments formatters. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os.path diff --git a/pygments/formatters/_mapping.py b/pygments/formatters/_mapping.py index 0c344a7a..8736bfd0 100755 --- a/pygments/formatters/_mapping.py +++ b/pygments/formatters/_mapping.py @@ -9,7 +9,7 @@ Do not alter the FORMATTERS dictionary by hand. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/formatters/bbcode.py b/pygments/formatters/bbcode.py index 03852b3e..ed4c736f 100644 --- a/pygments/formatters/bbcode.py +++ b/pygments/formatters/bbcode.py @@ -5,7 +5,7 @@ BBcode formatter. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/formatters/html.py b/pygments/formatters/html.py index d1172c7f..1f0ca680 100644 --- a/pygments/formatters/html.py +++ b/pygments/formatters/html.py @@ -5,7 +5,7 @@ Formatter for HTML output. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/formatters/img.py b/pygments/formatters/img.py index 62f5f9b3..ec30cbe6 100644 --- a/pygments/formatters/img.py +++ b/pygments/formatters/img.py @@ -5,7 +5,7 @@ Formatter for Pixmap output. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/formatters/latex.py b/pygments/formatters/latex.py index cc464420..e109ebdd 100644 --- a/pygments/formatters/latex.py +++ b/pygments/formatters/latex.py @@ -5,7 +5,7 @@ Formatter for LaTeX fancyvrb output. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -26,6 +26,9 @@ def escape_tex(text, commandprefix): replace('\x02', r'\%sZcb{}' % commandprefix). \ replace('^', r'\%sZca{}' % commandprefix). \ replace('_', r'\%sZus{}' % commandprefix). \ + replace('&', r'\%sZam{}' % commandprefix). \ + replace('<', r'\%sZlt{}' % commandprefix). \ + replace('>', r'\%sZgt{}' % commandprefix). \ replace('#', r'\%sZsh{}' % commandprefix). \ replace('%', r'\%sZpc{}' % commandprefix). \ replace('$', r'\%sZdl{}' % commandprefix). \ @@ -106,6 +109,9 @@ STYLE_TEMPLATE = r''' \def\%(cp)sZob{\char`\{} \def\%(cp)sZcb{\char`\}} \def\%(cp)sZca{\char`\^} +\def\%(cp)sZam{\char`\&} +\def\%(cp)sZlt{\char`\<} +\def\%(cp)sZgt{\char`\>} \def\%(cp)sZsh{\char`\#} \def\%(cp)sZpc{\char`\%%} \def\%(cp)sZdl{\char`\$} @@ -258,11 +264,13 @@ class LatexFormatter(Formatter): cmndef += (r'\def\$$@tc##1{\textcolor[rgb]{%s}{##1}}' % rgbcolor(ndef['color'])) if ndef['border']: - cmndef += (r'\def\$$@bc##1{\fcolorbox[rgb]{%s}{%s}{##1}}' % + cmndef += (r'\def\$$@bc##1{\setlength{\fboxsep}{0pt}' + r'\fcolorbox[rgb]{%s}{%s}{\strut ##1}}' % (rgbcolor(ndef['border']), rgbcolor(ndef['bgcolor']))) elif ndef['bgcolor']: - cmndef += (r'\def\$$@bc##1{\colorbox[rgb]{%s}{##1}}' % + cmndef += (r'\def\$$@bc##1{\setlength{\fboxsep}{0pt}' + r'\colorbox[rgb]{%s}{\strut ##1}}' % rgbcolor(ndef['bgcolor'])) if cmndef == '': continue @@ -278,7 +286,7 @@ class LatexFormatter(Formatter): cp = self.commandprefix styles = [] for name, definition in self.cmd2def.iteritems(): - styles.append(r'\def\%s@tok@%s{%s}' % (cp, name, definition)) + styles.append(r'\expandafter\def\csname %s@tok@%s\endcsname{%s}' % (cp, name, definition)) return STYLE_TEMPLATE % {'cp': self.commandprefix, 'styles': '\n'.join(styles)} diff --git a/pygments/formatters/other.py b/pygments/formatters/other.py index 249291a8..84b45ea1 100644 --- a/pygments/formatters/other.py +++ b/pygments/formatters/other.py @@ -5,7 +5,7 @@ Other formatters: NullFormatter, RawTokenFormatter. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/formatters/rtf.py b/pygments/formatters/rtf.py index 83414c58..2e8b77aa 100644 --- a/pygments/formatters/rtf.py +++ b/pygments/formatters/rtf.py @@ -5,7 +5,7 @@ A formatter that generates RTF files. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/formatters/svg.py b/pygments/formatters/svg.py index 9928345a..773bd72f 100644 --- a/pygments/formatters/svg.py +++ b/pygments/formatters/svg.py @@ -5,7 +5,7 @@ Formatter for SVG output. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/formatters/terminal.py b/pygments/formatters/terminal.py index fc05cad7..a78c5a33 100644 --- a/pygments/formatters/terminal.py +++ b/pygments/formatters/terminal.py @@ -5,7 +5,7 @@ Formatter for terminal output with ANSI sequences. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/formatters/terminal256.py b/pygments/formatters/terminal256.py index d72a939e..bf8ee0ff 100644 --- a/pygments/formatters/terminal256.py +++ b/pygments/formatters/terminal256.py @@ -11,7 +11,7 @@ Formatter version 1. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/lexer.py b/pygments/lexer.py index a22768a3..53ea5ac1 100644 --- a/pygments/lexer.py +++ b/pygments/lexer.py @@ -5,7 +5,7 @@ Base lexer classes. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re diff --git a/pygments/lexers/__init__.py b/pygments/lexers/__init__.py index cce7e9b6..cafbf867 100644 --- a/pygments/lexers/__init__.py +++ b/pygments/lexers/__init__.py @@ -5,7 +5,7 @@ Pygments lexers. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/lexers/_asybuiltins.py b/pygments/lexers/_asybuiltins.py index fbfd937e..606f4f2e 100644 --- a/pygments/lexers/_asybuiltins.py +++ b/pygments/lexers/_asybuiltins.py @@ -10,7 +10,7 @@ TODO: perl/python script in Asymptote SVN similar to asy-list.pl but only for function and variable names. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/lexers/_clbuiltins.py b/pygments/lexers/_clbuiltins.py index 03e5cad4..22a0133e 100644 --- a/pygments/lexers/_clbuiltins.py +++ b/pygments/lexers/_clbuiltins.py @@ -5,7 +5,7 @@ ANSI Common Lisp builtins. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/lexers/_luabuiltins.py b/pygments/lexers/_luabuiltins.py index 502a3e63..487595f3 100644 --- a/pygments/lexers/_luabuiltins.py +++ b/pygments/lexers/_luabuiltins.py @@ -9,7 +9,7 @@ Do not edit the MODULES dict by hand. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/lexers/_mapping.py b/pygments/lexers/_mapping.py index e217489f..2bea9312 100644 --- a/pygments/lexers/_mapping.py +++ b/pygments/lexers/_mapping.py @@ -9,14 +9,14 @@ Do not alter the LEXERS dictionary by hand. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ LEXERS = { 'ABAPLexer': ('pygments.lexers.other', 'ABAP', ('abap',), ('*.abap',), ('text/x-abap',)), 'ActionScript3Lexer': ('pygments.lexers.web', 'ActionScript 3', ('as3', 'actionscript3'), ('*.as',), ('application/x-actionscript', 'text/x-actionscript', 'text/actionscript')), - 'ActionScriptLexer': ('pygments.lexers.web', 'ActionScript', ('as', 'actionscript'), ('*.as',), ('application/x-actionscript', 'text/x-actionscript', 'text/actionscript')), + 'ActionScriptLexer': ('pygments.lexers.web', 'ActionScript', ('as', 'actionscript'), ('*.as',), ('application/x-actionscript3', 'text/x-actionscript3', 'text/actionscript3')), 'AdaLexer': ('pygments.lexers.compiled', 'Ada', ('ada', 'ada95ada2005'), ('*.adb', '*.ads', '*.ada'), ('text/x-ada',)), 'AntlrActionScriptLexer': ('pygments.lexers.parsers', 'ANTLR With ActionScript Target', ('antlr-as', 'antlr-actionscript'), ('*.G', '*.g'), ()), 'AntlrCSharpLexer': ('pygments.lexers.parsers', 'ANTLR With C# Target', ('antlr-csharp', 'antlr-c#'), ('*.G', '*.g'), ()), @@ -31,8 +31,9 @@ LEXERS = { 'AppleScriptLexer': ('pygments.lexers.other', 'AppleScript', ('applescript',), ('*.applescript',), ()), 'AsymptoteLexer': ('pygments.lexers.other', 'Asymptote', ('asy', 'asymptote'), ('*.asy',), ('text/x-asymptote',)), 'AutohotkeyLexer': ('pygments.lexers.other', 'autohotkey', ('ahk',), ('*.ahk', '*.ahkl'), ('text/x-autohotkey',)), + 'AwkLexer': ('pygments.lexers.other', 'Awk', ('awk', 'gawk', 'mawk', 'nawk'), ('*.awk',), ('application/x-awk',)), 'BBCodeLexer': ('pygments.lexers.text', 'BBCode', ('bbcode',), (), ('text/x-bbcode',)), - 'BaseMakefileLexer': ('pygments.lexers.text', 'Makefile', ('basemake',), (), ()), + 'BaseMakefileLexer': ('pygments.lexers.text', 'Base Makefile', ('basemake',), (), ()), 'BashLexer': ('pygments.lexers.other', 'Bash', ('bash', 'sh', 'ksh'), ('*.sh', '*.ksh', '*.bash', '*.ebuild', '*.eclass'), ('application/x-sh', 'application/x-shellscript')), 'BashSessionLexer': ('pygments.lexers.other', 'Bash Session', ('console',), ('*.sh-session',), ('application/x-shell-session',)), 'BatchLexer': ('pygments.lexers.other', 'Batchfile', ('bat',), ('*.bat', '*.cmd'), ('application/x-dos-batch',)), @@ -40,7 +41,7 @@ LEXERS = { 'BlitzMaxLexer': ('pygments.lexers.compiled', 'BlitzMax', ('blitzmax', 'bmax'), ('*.bmx',), ('text/x-bmx',)), 'BooLexer': ('pygments.lexers.dotnet', 'Boo', ('boo',), ('*.boo',), ('text/x-boo',)), 'BrainfuckLexer': ('pygments.lexers.other', 'Brainfuck', ('brainfuck', 'bf'), ('*.bf', '*.b'), ('application/x-brainfuck',)), - 'CLexer': ('pygments.lexers.compiled', 'C', ('c',), ('*.c', '*.h'), ('text/x-chdr', 'text/x-csrc')), + 'CLexer': ('pygments.lexers.compiled', 'C', ('c',), ('*.c', '*.h', '*.idc'), ('text/x-chdr', 'text/x-csrc')), 'CMakeLexer': ('pygments.lexers.text', 'CMake', ('cmake',), ('*.cmake', 'CMakeLists.txt'), ('text/x-cmake',)), 'CObjdumpLexer': ('pygments.lexers.asm', 'c-objdump', ('c-objdump',), ('*.c-objdump',), ('text/x-c-objdump',)), 'CSharpAspxLexer': ('pygments.lexers.dotnet', 'aspx-cs', ('aspx-cs',), ('*.aspx', '*.asax', '*.ascx', '*.ashx', '*.asmx', '*.axd'), ()), @@ -70,17 +71,21 @@ LEXERS = { 'DelphiLexer': ('pygments.lexers.compiled', 'Delphi', ('delphi', 'pas', 'pascal', 'objectpascal'), ('*.pas',), ('text/x-pascal',)), 'DiffLexer': ('pygments.lexers.text', 'Diff', ('diff', 'udiff'), ('*.diff', '*.patch'), ('text/x-diff', 'text/x-patch')), 'DjangoLexer': ('pygments.lexers.templates', 'Django/Jinja', ('django', 'jinja'), (), ('application/x-django-templating', 'application/x-jinja')), + 'DtdLexer': ('pygments.lexers.web', 'DTD', ('dtd',), ('*.dtd',), ('application/xml-dtd',)), 'DuelLexer': ('pygments.lexers.web', 'Duel', ('duel', 'Duel Engine', 'Duel View', 'JBST', 'jbst', 'JsonML+BST'), ('*.duel', '*.jbst'), ('text/x-duel', 'text/x-jbst')), 'DylanLexer': ('pygments.lexers.compiled', 'Dylan', ('dylan',), ('*.dylan', '*.dyl'), ('text/x-dylan',)), + 'ECLexer': ('pygments.lexers.compiled', 'eC', ('ec',), ('*.ec', '*.eh'), ('text/x-echdr', 'text/x-ecsrc')), 'ErbLexer': ('pygments.lexers.templates', 'ERB', ('erb',), (), ('application/x-ruby-templating',)), 'ErlangLexer': ('pygments.lexers.functional', 'Erlang', ('erlang',), ('*.erl', '*.hrl'), ('text/x-erlang',)), 'ErlangShellLexer': ('pygments.lexers.functional', 'Erlang erl session', ('erl',), ('*.erl-sh',), ('text/x-erl-shellsession',)), 'EvoqueHtmlLexer': ('pygments.lexers.templates', 'HTML+Evoque', ('html+evoque',), ('*.html',), ('text/html+evoque',)), 'EvoqueLexer': ('pygments.lexers.templates', 'Evoque', ('evoque',), ('*.evoque',), ('application/x-evoque',)), 'EvoqueXmlLexer': ('pygments.lexers.templates', 'XML+Evoque', ('xml+evoque',), ('*.xml',), ('application/xml+evoque',)), + 'FSharpLexer': ('pygments.lexers.dotnet', 'FSharp', ('fsharp',), ('*.fs', '*.fsi'), ('text/x-fsharp',)), 'FactorLexer': ('pygments.lexers.agile', 'Factor', ('factor',), ('*.factor',), ('text/x-factor',)), + 'FancyLexer': ('pygments.lexers.agile', 'Fancy', ('fancy', 'fy'), ('*.fy', '*.fancypack'), ('text/x-fancysrc',)), 'FelixLexer': ('pygments.lexers.compiled', 'Felix', ('felix', 'flx'), ('*.flx', '*.flxh'), ('text/x-felix',)), - 'FortranLexer': ('pygments.lexers.compiled', 'Fortran', ('fortran',), ('*.f', '*.f90'), ('text/x-fortran',)), + 'FortranLexer': ('pygments.lexers.compiled', 'Fortran', ('fortran',), ('*.f', '*.f90', '*.F', '*.F90'), ('text/x-fortran',)), 'GLShaderLexer': ('pygments.lexers.compiled', 'GLSL', ('glsl',), ('*.vert', '*.frag', '*.geo'), ('text/x-glslsrc',)), 'GasLexer': ('pygments.lexers.asm', 'GAS', ('gas',), ('*.s', '*.S'), ('text/x-gas',)), 'GenshiLexer': ('pygments.lexers.templates', 'Genshi', ('genshi', 'kid', 'xml+genshi', 'xml+kid'), ('*.kid',), ('application/x-genshi', 'application/x-kid')), @@ -90,7 +95,10 @@ LEXERS = { 'GnuplotLexer': ('pygments.lexers.other', 'Gnuplot', ('gnuplot',), ('*.plot', '*.plt'), ('text/x-gnuplot',)), 'GoLexer': ('pygments.lexers.compiled', 'Go', ('go',), ('*.go',), ('text/x-gosrc',)), 'GoodDataCLLexer': ('pygments.lexers.other', 'GoodData-CL', ('gooddata-cl',), ('*.gdc',), ('text/x-gooddata-cl',)), + 'GosuLexer': ('pygments.lexers.compiled', 'Gosu', ('gosu',), ('*.gs', '*.gsx', '*.gsp', '*.vark'), ('text/x-gosu',)), + 'GosuTemplateLexer': ('pygments.lexers.compiled', 'Gosu Template', ('gst',), ('*.gst',), ('text/x-gosu-template',)), 'GroffLexer': ('pygments.lexers.text', 'Groff', ('groff', 'nroff', 'man'), ('*.[1234567]', '*.man'), ('application/x-troff', 'text/troff')), + 'GroovyLexer': ('pygments.lexers.agile', 'Groovy', ('groovy',), ('*.groovy',), ('text/x-groovy',)), 'HamlLexer': ('pygments.lexers.web', 'Haml', ('haml', 'HAML'), ('*.haml',), ('text/x-haml',)), 'HaskellLexer': ('pygments.lexers.functional', 'Haskell', ('haskell', 'hs'), ('*.hs',), ('text/x-haskell',)), 'HaxeLexer': ('pygments.lexers.web', 'haXe', ('hx', 'haXe'), ('*.hx',), ('text/haxe',)), @@ -109,7 +117,7 @@ LEXERS = { 'JavascriptDjangoLexer': ('pygments.lexers.templates', 'JavaScript+Django/Jinja', ('js+django', 'javascript+django', 'js+jinja', 'javascript+jinja'), (), ('application/x-javascript+django', 'application/x-javascript+jinja', 'text/x-javascript+django', 'text/x-javascript+jinja', 'text/javascript+django', 'text/javascript+jinja')), 'JavascriptErbLexer': ('pygments.lexers.templates', 'JavaScript+Ruby', ('js+erb', 'javascript+erb', 'js+ruby', 'javascript+ruby'), (), ('application/x-javascript+ruby', 'text/x-javascript+ruby', 'text/javascript+ruby')), 'JavascriptGenshiLexer': ('pygments.lexers.templates', 'JavaScript+Genshi Text', ('js+genshitext', 'js+genshi', 'javascript+genshitext', 'javascript+genshi'), (), ('application/x-javascript+genshi', 'text/x-javascript+genshi', 'text/javascript+genshi')), - 'JavascriptLexer': ('pygments.lexers.web', 'JavaScript', ('js', 'javascript'), ('*.js',), ('application/javascript', 'application/x-javascript', 'text/x-javascript', 'text/javascript')), + 'JavascriptLexer': ('pygments.lexers.web', 'JavaScript', ('js', 'javascript'), ('*.js', '*.json'), ('application/javascript', 'application/x-javascript', 'text/x-javascript', 'text/javascript', 'application/json')), 'JavascriptPhpLexer': ('pygments.lexers.templates', 'JavaScript+PHP', ('js+php', 'javascript+php'), (), ('application/x-javascript+php', 'text/x-javascript+php', 'text/javascript+php')), 'JavascriptSmartyLexer': ('pygments.lexers.templates', 'JavaScript+Smarty', ('js+smarty', 'javascript+smarty'), (), ('application/x-javascript+smarty', 'text/x-javascript+smarty', 'text/javascript+smarty')), 'JspLexer': ('pygments.lexers.templates', 'Java Server Page', ('jsp',), ('*.jsp',), ('application/x-jsp',)), @@ -127,7 +135,7 @@ LEXERS = { 'MakoXmlLexer': ('pygments.lexers.templates', 'XML+Mako', ('xml+mako',), (), ('application/xml+mako',)), 'MaqlLexer': ('pygments.lexers.other', 'MAQL', ('maql',), ('*.maql',), ('text/x-gooddata-maql', 'application/x-gooddata-maql')), 'MasonLexer': ('pygments.lexers.templates', 'Mason', ('mason',), ('*.m', '*.mhtml', '*.mc', '*.mi', 'autohandler', 'dhandler'), ('application/x-mason',)), - 'MatlabLexer': ('pygments.lexers.math', 'Matlab', ('matlab', 'octave'), ('*.m',), ('text/matlab',)), + 'MatlabLexer': ('pygments.lexers.math', 'Matlab', ('matlab',), ('*.m',), ('text/matlab',)), 'MatlabSessionLexer': ('pygments.lexers.math', 'Matlab session', ('matlabsession',), (), ()), 'MiniDLexer': ('pygments.lexers.agile', 'MiniD', ('minid',), ('*.md',), ('text/x-minidsrc',)), 'ModelicaLexer': ('pygments.lexers.other', 'Modelica', ('modelica',), ('*.mo',), ('text/x-modelica',)), @@ -142,14 +150,17 @@ LEXERS = { 'MyghtyLexer': ('pygments.lexers.templates', 'Myghty', ('myghty',), ('*.myt', 'autodelegate'), ('application/x-myghty',)), 'MyghtyXmlLexer': ('pygments.lexers.templates', 'XML+Myghty', ('xml+myghty',), (), ('application/xml+myghty',)), 'NasmLexer': ('pygments.lexers.asm', 'NASM', ('nasm',), ('*.asm', '*.ASM'), ('text/x-nasm',)), + 'NemerleLexer': ('pygments.lexers.dotnet', 'Nemerle', ('nemerle',), ('*.n',), ('text/x-nemerle',)), 'NewspeakLexer': ('pygments.lexers.other', 'Newspeak', ('newspeak',), ('*.ns2',), ('text/x-newspeak',)), 'NginxConfLexer': ('pygments.lexers.text', 'Nginx configuration file', ('nginx',), (), ('text/x-nginx-conf',)), + 'NimrodLexer': ('pygments.lexers.compiled', 'Nimrod', ('nimrod', 'nim'), ('*.nim', '*.nimrod'), ('text/x-nimrod',)), 'NumPyLexer': ('pygments.lexers.math', 'NumPy', ('numpy',), (), ()), 'ObjdumpLexer': ('pygments.lexers.asm', 'objdump', ('objdump',), ('*.objdump',), ('text/x-objdump',)), 'ObjectiveCLexer': ('pygments.lexers.compiled', 'Objective-C', ('objective-c', 'objectivec', 'obj-c', 'objc'), ('*.m',), ('text/x-objective-c',)), 'ObjectiveJLexer': ('pygments.lexers.web', 'Objective-J', ('objective-j', 'objectivej', 'obj-j', 'objj'), ('*.j',), ('text/x-objective-j',)), 'OcamlLexer': ('pygments.lexers.compiled', 'OCaml', ('ocaml',), ('*.ml', '*.mli', '*.mll', '*.mly'), ('text/x-ocaml',)), 'OcamlLexer': ('pygments.lexers.functional', 'OCaml', ('ocaml',), ('*.ml', '*.mli', '*.mll', '*.mly'), ('text/x-ocaml',)), + 'OctaveLexer': ('pygments.lexers.math', 'Octave', ('octave',), ('*.m',), ('text/octave',)), 'OocLexer': ('pygments.lexers.compiled', 'Ooc', ('ooc',), ('*.ooc',), ('text/x-ooc',)), 'PerlLexer': ('pygments.lexers.agile', 'Perl', ('perl', 'pl'), ('*.pl', '*.pm'), ('text/x-perl', 'application/x-perl')), 'PhpLexer': ('pygments.lexers.web', 'PHP', ('php', 'php3', 'php4', 'php5'), ('*.php', '*.php[345]'), ('text/x-php',)), @@ -161,6 +172,7 @@ LEXERS = { 'PrologLexer': ('pygments.lexers.compiled', 'Prolog', ('prolog',), ('*.prolog', '*.pro', '*.pl'), ('text/x-prolog',)), 'PropertiesLexer': ('pygments.lexers.text', 'Properties', ('properties',), ('*.properties',), ('text/x-java-properties',)), 'ProtoBufLexer': ('pygments.lexers.other', 'Protocol Buffer', ('protobuf',), ('*.proto',), ()), + 'PyPyLogLexer': ('pygments.lexers.pypylog', 'PyPy Log', ('pypylog', 'pypy'), ('*.pypylog',), ('application/x-pypylog',)), 'Python3Lexer': ('pygments.lexers.agile', 'Python 3', ('python3', 'py3'), (), ('text/x-python3', 'application/x-python3')), 'Python3TracebackLexer': ('pygments.lexers.agile', 'Python 3.0 Traceback', ('py3tb',), ('*.py3tb',), ('text/x-python3-traceback',)), 'PythonConsoleLexer': ('pygments.lexers.agile', 'Python console session', ('pycon',), (), ('text/x-python-doctest',)), @@ -183,10 +195,11 @@ LEXERS = { 'RubyConsoleLexer': ('pygments.lexers.agile', 'Ruby irb session', ('rbcon', 'irb'), (), ('text/x-ruby-shellsession',)), 'RubyLexer': ('pygments.lexers.agile', 'Ruby', ('rb', 'ruby', 'duby'), ('*.rb', '*.rbw', 'Rakefile', '*.rake', '*.gemspec', '*.rbx', '*.duby'), ('text/x-ruby', 'application/x-ruby')), 'SLexer': ('pygments.lexers.math', 'S', ('splus', 's', 'r'), ('*.S', '*.R'), ('text/S-plus', 'text/S', 'text/R')), + 'SMLLexer': ('pygments.lexers.functional', 'Standard ML', ('sml',), ('*.sml', '*.sig', '*.fun'), ('text/x-standardml', 'application/x-standardml')), 'SassLexer': ('pygments.lexers.web', 'Sass', ('sass', 'SASS'), ('*.sass',), ('text/x-sass',)), 'ScalaLexer': ('pygments.lexers.compiled', 'Scala', ('scala',), ('*.scala',), ('text/x-scala',)), 'ScamlLexer': ('pygments.lexers.web', 'Scaml', ('scaml', 'SCAML'), ('*.scaml',), ('text/x-scaml',)), - 'SchemeLexer': ('pygments.lexers.functional', 'Scheme', ('scheme', 'scm'), ('*.scm',), ('text/x-scheme', 'application/x-scheme')), + 'SchemeLexer': ('pygments.lexers.functional', 'Scheme', ('scheme', 'scm'), ('*.scm', '*.ss', '*.rkt'), ('text/x-scheme', 'application/x-scheme')), 'ScssLexer': ('pygments.lexers.web', 'SCSS', ('scss',), ('*.scss',), ('text/x-scss',)), 'SmalltalkLexer': ('pygments.lexers.other', 'Smalltalk', ('smalltalk', 'squeak'), ('*.st',), ('text/x-smalltalk',)), 'SmartyLexer': ('pygments.lexers.templates', 'Smarty', ('smarty',), ('*.tpl',), ('application/x-smarty',)), @@ -206,15 +219,15 @@ LEXERS = { 'VelocityLexer': ('pygments.lexers.templates', 'Velocity', ('velocity',), ('*.vm', '*.fhtml'), ()), 'VelocityXmlLexer': ('pygments.lexers.templates', 'XML+Velocity', ('xml+velocity',), (), ('application/xml+velocity',)), 'VerilogLexer': ('pygments.lexers.hdl', 'verilog', ('v',), ('*.v', '*.sv'), ('text/x-verilog',)), - 'VimLexer': ('pygments.lexers.text', 'VimL', ('vim',), ('*.vim', '.vimrc'), ('text/x-vim',)), + 'VimLexer': ('pygments.lexers.text', 'VimL', ('vim',), ('*.vim', '.vimrc', '.exrc', '.gvimrc', '_vimrc', '_exrc', '_gvimrc'), ('text/x-vim',)), 'XQueryLexer': ('pygments.lexers.web', 'XQuery', ('xquery', 'xqy'), ('*.xqy', '*.xquery'), ('text/xquery', 'application/xquery')), 'XmlDjangoLexer': ('pygments.lexers.templates', 'XML+Django/Jinja', ('xml+django', 'xml+jinja'), (), ('application/xml+django', 'application/xml+jinja')), 'XmlErbLexer': ('pygments.lexers.templates', 'XML+Ruby', ('xml+erb', 'xml+ruby'), (), ('application/xml+ruby',)), - 'XmlLexer': ('pygments.lexers.web', 'XML', ('xml',), ('*.xml', '*.xsl', '*.rss', '*.xslt', '*.xsd', '*.wsdl'), ('text/xml', 'application/xml', 'image/svg+xml', 'application/rss+xml', 'application/atom+xml', 'application/xsl+xml', 'application/xslt+xml')), + 'XmlLexer': ('pygments.lexers.web', 'XML', ('xml',), ('*.xml', '*.xsl', '*.rss', '*.xslt', '*.xsd', '*.wsdl'), ('text/xml', 'application/xml', 'image/svg+xml', 'application/rss+xml', 'application/atom+xml')), 'XmlPhpLexer': ('pygments.lexers.templates', 'XML+PHP', ('xml+php',), (), ('application/xml+php',)), 'XmlSmartyLexer': ('pygments.lexers.templates', 'XML+Smarty', ('xml+smarty',), (), ('application/xml+smarty',)), - 'XsltLexer': ('pygments.lexers.web', 'XSLT', ('xslt',), ('*.xsl', '*.xslt'), ('text/xml', 'application/xml', 'image/svg+xml', 'application/rss+xml', 'application/atom+xml', 'application/xsl+xml', 'application/xslt+xml')), - 'YamlLexer': ('pygments.lexers.text', 'YAML', ('yaml',), ('*.yaml', '*.yml'), ('text/x-yaml',)) + 'XsltLexer': ('pygments.lexers.web', 'XSLT', ('xslt',), ('*.xsl', '*.xslt'), ('application/xsl+xml', 'application/xslt+xml')), + 'YamlLexer': ('pygments.lexers.text', 'YAML', ('yaml',), ('*.yaml', '*.yml'), ('text/x-yaml',)), } if __name__ == '__main__': @@ -253,6 +266,6 @@ if __name__ == '__main__': # write new file f = open(__file__, 'w') f.write(header) - f.write('LEXERS = {\n %s\n}\n\n' % ',\n '.join(found_lexers)) + f.write('LEXERS = {\n %s,\n}\n\n' % ',\n '.join(found_lexers)) f.write(footer) f.close() diff --git a/pygments/lexers/_phpbuiltins.py b/pygments/lexers/_phpbuiltins.py index 0c0acccc..405655b1 100644 --- a/pygments/lexers/_phpbuiltins.py +++ b/pygments/lexers/_phpbuiltins.py @@ -12,12 +12,31 @@ internet connection. don't run that at home, use a server ;-) - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ MODULES = {'.NET': ['dotnet_load'], + 'APC': ['apc_add', + 'apc_bin_dump', + 'apc_bin_dumpfile', + 'apc_bin_load', + 'apc_bin_loadfile', + 'apc_cache_info', + 'apc_cas', + 'apc_clear_cache', + 'apc_compile_file', + 'apc_dec', + 'apc_define_constants', + 'apc_delete_file', + 'apc_delete', + 'apc_exists', + 'apc_fetch', + 'apc_inc', + 'apc_load_constants', + 'apc_sma_info', + 'apc_store'], 'APD': ['apd_breakpoint', 'apd_callstack', 'apd_clunk', @@ -29,11 +48,33 @@ MODULES = {'.NET': ['dotnet_load'], 'apd_echo', 'apd_get_active_symbols', 'apd_set_pprof_trace', - 'apd_set_session', + 'apd_set_session_trace_socket', 'apd_set_session_trace', - 'apd_set_socket_session_trace', + 'apd_set_session', 'override_function', 'rename_function'], + 'Aliases and deprecated Mysqli': ['mysqli_bind_param', + 'mysqli_bind_result', + 'mysqli_client_encoding', + 'mysqli_connect', + 'mysqli_disable_reads_from_master', + 'mysqli_disable_rpl_parse', + 'mysqli_enable_reads_from_master', + 'mysqli_enable_rpl_parse', + 'mysqli_escape_string', + 'mysqli_execute', + 'mysqli_fetch', + 'mysqli_get_metadata', + 'mysqli_master_query', + 'mysqli_param_count', + 'mysqli_report', + 'mysqli_rpl_parse_enabled', + 'mysqli_rpl_probe', + 'mysqli_rpl_query_type', + 'mysqli_send_long_data', + 'mysqli_send_query', + 'mysqli_set_opt', + 'mysqli_slave_query'], 'Apache': ['apache_child_terminate', 'apache_get_modules', 'apache_get_version', @@ -44,88 +85,93 @@ MODULES = {'.NET': ['dotnet_load'], 'apache_reset_timeout', 'apache_response_headers', 'apache_setenv', - 'ascii2ebcdic', - 'ebcdic2ascii', 'getallheaders', 'virtual'], - 'Arrays': ['array', - 'array_change_key_case', - 'array_chunk', - 'array_combine', - 'array_count_values', - 'array_diff', - 'array_diff_assoc', - 'array_diff_key', - 'array_diff_uassoc', - 'array_diff_ukey', - 'array_fill', - 'array_filter', - 'array_flip', - 'array_intersect', - 'array_intersect_assoc', - 'array_intersect_key', - 'array_intersect_uassoc', - 'array_intersect_ukey', - 'array_key_exists', - 'array_keys', - 'array_map', - 'array_merge', - 'array_merge_recursive', - 'array_multisort', - 'array_pad', - 'array_pop', - 'array_push', - 'array_rand', - 'array_reduce', - 'array_reverse', - 'array_search', - 'array_shift', - 'array_slice', - 'array_splice', - 'array_sum', - 'array_udiff', - 'array_udiff_assoc', - 'array_udiff_uassoc', - 'array_uintersect', - 'array_uintersect_assoc', - 'array_uintersect_uassoc', - 'array_unique', - 'array_unshift', - 'array_values', - 'array_walk', - 'array_walk_recursive', - 'arsort', - 'asort', - 'compact', - 'count', - 'current', - 'each', - 'end', - 'extract', - 'in_array', - 'key', - 'krsort', - 'ksort', - 'list', - 'natcasesort', - 'natsort', - 'next', - 'pos', - 'prev', - 'range', - 'reset', - 'rsort', - 'shuffle', - 'sizeof', - 'sort', - 'uasort', - 'uksort', - 'usort'], - 'Aspell': ['aspell_check', - 'aspell_check_raw', - 'aspell_new', - 'aspell_suggest'], - 'BC math': ['bcadd', + 'Array': ['array_change_key_case', + 'array_chunk', + 'array_combine', + 'array_count_values', + 'array_diff_assoc', + 'array_diff_key', + 'array_diff_uassoc', + 'array_diff_ukey', + 'array_diff', + 'array_fill_keys', + 'array_fill', + 'array_filter', + 'array_flip', + 'array_intersect_assoc', + 'array_intersect_key', + 'array_intersect_uassoc', + 'array_intersect_ukey', + 'array_intersect', + 'array_key_exists', + 'array_keys', + 'array_map', + 'array_merge_recursive', + 'array_merge', + 'array_multisort', + 'array_pad', + 'array_pop', + 'array_product', + 'array_push', + 'array_rand', + 'array_reduce', + 'array_replace_recursive', + 'array_replace', + 'array_reverse', + 'array_search', + 'array_shift', + 'array_slice', + 'array_splice', + 'array_sum', + 'array_udiff_assoc', + 'array_udiff_uassoc', + 'array_udiff', + 'array_uintersect_assoc', + 'array_uintersect_uassoc', + 'array_uintersect', + 'array_unique', + 'array_unshift', + 'array_values', + 'array_walk_recursive', + 'array_walk', + 'array', + 'arsort', + 'asort', + 'compact', + 'count', + 'current', + 'each', + 'end', + 'extract', + 'in_array', + 'key', + 'krsort', + 'ksort', + 'list', + 'natcasesort', + 'natsort', + 'next', + 'pos', + 'prev', + 'range', + 'reset', + 'rsort', + 'shuffle', + 'sizeof', + 'sort', + 'uasort', + 'uksort', + 'usort'], + 'BBCode': ['bbcode_add_element', + 'bbcode_add_smiley', + 'bbcode_create', + 'bbcode_destroy', + 'bbcode_parse', + 'bbcode_set_arg_parser', + 'bbcode_set_flags'], + 'BC Math': ['bcadd', 'bccomp', 'bcdiv', 'bcmod', @@ -145,31 +191,15 @@ MODULES = {'.NET': ['dotnet_load'], 'bzopen', 'bzread', 'bzwrite'], - 'CCVS': ['ccvs_add', - 'ccvs_auth', - 'ccvs_command', - 'ccvs_count', - 'ccvs_delete', - 'ccvs_done', - 'ccvs_init', - 'ccvs_lookup', - 'ccvs_new', - 'ccvs_report', - 'ccvs_return', - 'ccvs_reverse', - 'ccvs_sale', - 'ccvs_status', - 'ccvs_textvalue', - 'ccvs_void'], 'COM': ['com_addref', 'com_create_guid', 'com_event_sink', - 'com_get', 'com_get_active_object', + 'com_get', 'com_invoke', 'com_isenum', - 'com_load', 'com_load_typelib', + 'com_load', 'com_message_pump', 'com_print_typeinfo', 'com_propget', @@ -199,151 +229,212 @@ MODULES = {'.NET': ['dotnet_load'], 'variant_or', 'variant_pow', 'variant_round', - 'variant_set', 'variant_set_type', + 'variant_set', 'variant_sub', 'variant_xor'], - 'CURL': ['curl_close', - 'curl_copy_handle', - 'curl_errno', - 'curl_error', - 'curl_exec', - 'curl_getinfo', - 'curl_init', - 'curl_multi_add_handle', - 'curl_multi_close', - 'curl_multi_exec', - 'curl_multi_getcontent', - 'curl_multi_info_read', - 'curl_multi_init', - 'curl_multi_remove_handle', - 'curl_multi_select', - 'curl_setopt', - 'curl_version'], + 'CUBRID': ['cubrid_affected_rows', + 'cubrid_bind', + 'cubrid_close_prepare', + 'cubrid_close_request', + 'cubrid_col_get', + 'cubrid_col_size', + 'cubrid_column_names', + 'cubrid_column_types', + 'cubrid_commit', + 'cubrid_connect_with_url', + 'cubrid_connect', + 'cubrid_current_oid', + 'cubrid_disconnect', + 'cubrid_drop', + 'cubrid_error_code_facility', + 'cubrid_error_code', + 'cubrid_error_msg', + 'cubrid_execute', + 'cubrid_fetch', + 'cubrid_free_result', + 'cubrid_get_charset', + 'cubrid_get_class_name', + 'cubrid_get_client_info', + 'cubrid_get_db_parameter', + 'cubrid_get_server_info', + 'cubrid_get', + 'cubrid_insert_id', + 'cubrid_is_instance', + 'cubrid_lob_close', + 'cubrid_lob_export', + 'cubrid_lob_get', + 'cubrid_lob_send', + 'cubrid_lob_size', + 'cubrid_lock_read', + 'cubrid_lock_write', + 'cubrid_move_cursor', + 'cubrid_num_cols', + 'cubrid_num_rows', + 'cubrid_prepare', + 'cubrid_put', + 'cubrid_rollback', + 'cubrid_schema', + 'cubrid_seq_drop', + 'cubrid_seq_insert', + 'cubrid_seq_put', + 'cubrid_set_add', + 'cubrid_set_drop', + 'cubrid_version'], + 'Cairo': ['cairo_create', + 'cairo_font_face_get_type', + 'cairo_font_face_status', + 'cairo_font_options_create', + 'cairo_font_options_equal', + 'cairo_font_options_get_antialias', + 'cairo_font_options_get_hint_metrics', + 'cairo_font_options_get_hint_style', + 'cairo_font_options_get_subpixel_order', + 'cairo_font_options_hash', + 'cairo_font_options_merge', + 'cairo_font_options_set_antialias', + 'cairo_font_options_set_hint_metrics', + 'cairo_font_options_set_hint_style', + 'cairo_font_options_set_subpixel_order', + 'cairo_font_options_status', + 'cairo_format_stride_for_width', + 'cairo_image_surface_create_for_data', + 'cairo_image_surface_create_from_png', + 'cairo_image_surface_create', + 'cairo_image_surface_get_data', + 'cairo_image_surface_get_format', + 'cairo_image_surface_get_height', + 'cairo_image_surface_get_stride', + 'cairo_image_surface_get_width', + 'cairo_matrix_create_scale', + 'cairo_matrix_create_translate', + 'cairo_matrix_invert', + 'cairo_matrix_multiply', + 'cairo_matrix_rotate', + 'cairo_matrix_transform_distance', + 'cairo_matrix_transform_point', + 'cairo_matrix_translate', + 'cairo_pattern_add_color_stop_rgb', + 'cairo_pattern_add_color_stop_rgba', + 'cairo_pattern_create_for_surface', + 'cairo_pattern_create_linear', + 'cairo_pattern_create_radial', + 'cairo_pattern_create_rgb', + 'cairo_pattern_create_rgba', + 'cairo_pattern_get_color_stop_count', + 'cairo_pattern_get_color_stop_rgba', + 'cairo_pattern_get_extend', + 'cairo_pattern_get_filter', + 'cairo_pattern_get_linear_points', + 'cairo_pattern_get_matrix', + 'cairo_pattern_get_radial_circles', + 'cairo_pattern_get_rgba', + 'cairo_pattern_get_surface', + 'cairo_pattern_get_type', + 'cairo_pattern_set_extend', + 'cairo_pattern_set_filter', + 'cairo_pattern_set_matrix', + 'cairo_pattern_status', + 'cairo_pdf_surface_create', + 'cairo_pdf_surface_set_size', + 'cairo_ps_get_levels', + 'cairo_ps_level_to_string', + 'cairo_ps_surface_create', + 'cairo_ps_surface_dsc_begin_page_setup', + 'cairo_ps_surface_dsc_begin_setup', + 'cairo_ps_surface_dsc_comment', + 'cairo_ps_surface_get_eps', + 'cairo_ps_surface_restrict_to_level', + 'cairo_ps_surface_set_eps', + 'cairo_ps_surface_set_size', + 'cairo_scaled_font_create', + 'cairo_scaled_font_extents', + 'cairo_scaled_font_get_ctm', + 'cairo_scaled_font_get_font_face', + 'cairo_scaled_font_get_font_matrix', + 'cairo_scaled_font_get_font_options', + 'cairo_scaled_font_get_scale_matrix', + 'cairo_scaled_font_get_type', + 'cairo_scaled_font_glyph_extents', + 'cairo_scaled_font_status', + 'cairo_scaled_font_text_extents', + 'cairo_surface_copy_page', + 'cairo_surface_create_similar', + 'cairo_surface_finish', + 'cairo_surface_flush', + 'cairo_surface_get_content', + 'cairo_surface_get_device_offset', + 'cairo_surface_get_font_options', + 'cairo_surface_get_type', + 'cairo_surface_mark_dirty_rectangle', + 'cairo_surface_mark_dirty', + 'cairo_surface_set_device_offset', + 'cairo_surface_set_fallback_resolution', + 'cairo_surface_show_page', + 'cairo_surface_status', + 'cairo_surface_write_to_png', + 'cairo_svg_surface_create', + 'cairo_svg_surface_restrict_to_version', + 'cairo_svg_version_to_string'], 'Calendar': ['cal_days_in_month', 'cal_from_jd', 'cal_info', 'cal_to_jd', 'easter_date', 'easter_days', - 'frenchtojd', - 'gregoriantojd', - 'jddayofweek', - 'jdmonthname', - 'jdtofrench', - 'jdtogregorian', + 'FrenchToJD', + 'GregorianToJD', + 'JDDayOfWeek', + 'JDMonthName', + 'JDToFrench', + 'JDToGregorian', 'jdtojewish', - 'jdtojulian', + 'JDToJulian', 'jdtounix', - 'jewishtojd', - 'juliantojd', + 'JewishToJD', + 'JulianToJD', 'unixtojd'], - 'Classes/Objects': ['call_user_method', - 'call_user_method_array', - 'class_exists', - 'get_class', - 'get_class_methods', - 'get_class_vars', - 'get_declared_classes', - 'get_declared_interfaces', - 'get_object_vars', - 'get_parent_class', - 'interface_exists', - 'is_a', - 'is_subclass_of', - 'method_exists'], + 'Classes/Object': ['call_user_method_array', + 'call_user_method', + 'class_alias', + 'class_exists', + 'get_called_class', + 'get_class_methods', + 'get_class_vars', + 'get_class', + 'get_declared_classes', + 'get_declared_interfaces', + 'get_object_vars', + 'get_parent_class', + 'interface_exists', + 'is_a', + 'is_subclass_of', + 'method_exists', + 'property_exists'], 'Classkit': ['classkit_import', 'classkit_method_add', 'classkit_method_copy', 'classkit_method_redefine', 'classkit_method_remove', 'classkit_method_rename'], - 'ClibPDF': ['cpdf_add_annotation', - 'cpdf_add_outline', - 'cpdf_arc', - 'cpdf_begin_text', - 'cpdf_circle', - 'cpdf_clip', - 'cpdf_close', - 'cpdf_closepath', - 'cpdf_closepath_fill_stroke', - 'cpdf_closepath_stroke', - 'cpdf_continue_text', - 'cpdf_curveto', - 'cpdf_end_text', - 'cpdf_fill', - 'cpdf_fill_stroke', - 'cpdf_finalize', - 'cpdf_finalize_page', - 'cpdf_global_set_document_limits', - 'cpdf_import_jpeg', - 'cpdf_lineto', - 'cpdf_moveto', - 'cpdf_newpath', - 'cpdf_open', - 'cpdf_output_buffer', - 'cpdf_page_init', - 'cpdf_place_inline_image', - 'cpdf_rect', - 'cpdf_restore', - 'cpdf_rlineto', - 'cpdf_rmoveto', - 'cpdf_rotate', - 'cpdf_rotate_text', - 'cpdf_save', - 'cpdf_save_to_file', - 'cpdf_scale', - 'cpdf_set_action_url', - 'cpdf_set_char_spacing', - 'cpdf_set_creator', - 'cpdf_set_current_page', - 'cpdf_set_font', - 'cpdf_set_font_directories', - 'cpdf_set_font_map_file', - 'cpdf_set_horiz_scaling', - 'cpdf_set_keywords', - 'cpdf_set_leading', - 'cpdf_set_page_animation', - 'cpdf_set_subject', - 'cpdf_set_text_matrix', - 'cpdf_set_text_pos', - 'cpdf_set_text_rendering', - 'cpdf_set_text_rise', - 'cpdf_set_title', - 'cpdf_set_viewer_preferences', - 'cpdf_set_word_spacing', - 'cpdf_setdash', - 'cpdf_setflat', - 'cpdf_setgray', - 'cpdf_setgray_fill', - 'cpdf_setgray_stroke', - 'cpdf_setlinecap', - 'cpdf_setlinejoin', - 'cpdf_setlinewidth', - 'cpdf_setmiterlimit', - 'cpdf_setrgbcolor', - 'cpdf_setrgbcolor_fill', - 'cpdf_setrgbcolor_stroke', - 'cpdf_show', - 'cpdf_show_xy', - 'cpdf_stringwidth', - 'cpdf_stroke', - 'cpdf_text', - 'cpdf_translate'], 'Crack': ['crack_check', 'crack_closedict', 'crack_getlastmessage', 'crack_opendict'], - 'Cybercash': ['cybercash_base64_decode', - 'cybercash_base64_encode', - 'cybercash_decr', - 'cybercash_encr'], - 'Cyrus IMAP': ['cyrus_authenticate', - 'cyrus_bind', - 'cyrus_close', - 'cyrus_connect', - 'cyrus_query', - 'cyrus_unbind'], + 'Ctype': ['ctype_alnum', + 'ctype_alpha', + 'ctype_cntrl', + 'ctype_digit', + 'ctype_graph', + 'ctype_lower', + 'ctype_print', + 'ctype_punct'], + 'Cyrus': ['cyrus_authenticate', + 'cyrus_bind', + 'cyrus_close', + 'cyrus_connect', + 'cyrus_query', + 'cyrus_unbind'], 'DB++': ['dbplus_add', 'dbplus_aql', 'dbplus_chdir', @@ -391,34 +482,65 @@ MODULES = {'.NET': ['dotnet_load'], 'dbplus_update', 'dbplus_xlockrel', 'dbplus_xunlockrel'], - 'DBM': ['dblist', - 'dbmclose', - 'dbmdelete', - 'dbmexists', - 'dbmfetch', - 'dbmfirstkey', - 'dbminsert', - 'dbmnextkey', - 'dbmopen', - 'dbmreplace'], + 'DBA': ['dba_close', + 'dba_delete', + 'dba_exists', + 'dba_fetch', + 'dba_firstkey', + 'dba_handlers', + 'dba_insert', + 'dba_key_split', + 'dba_list', + 'dba_nextkey', + 'dba_open', + 'dba_optimize', + 'dba_popen', + 'dba_replace', + 'dba_sync'], 'DOM': ['dom_import_simplexml'], - 'DOM XML': ['domxml_new_doc', - 'domxml_open_file', - 'domxml_open_mem', - 'domxml_version', - 'domxml_xmltree', - 'domxml_xslt_stylesheet', - 'domxml_xslt_stylesheet_doc', - 'domxml_xslt_stylesheet_file', - 'xpath_eval', - 'xpath_eval_expression', - 'xpath_new_context', - 'xptr_eval', - 'xptr_new_context'], + 'DOM XML (PHP 4)': ['domxml_new_doc', + 'domxml_open_file', + 'domxml_open_mem', + 'domxml_version', + 'domxml_xmltree', + 'domxml_xslt_stylesheet_doc', + 'domxml_xslt_stylesheet_file', + 'domxml_xslt_stylesheet', + 'domxml_xslt_version', + 'xpath_eval_expression', + 'xpath_eval', + 'xpath_new_context', + 'xpath_register_ns_auto', + 'xpath_register_ns', + 'xptr_eval', + 'xptr_new_context'], 'Date/Time': ['checkdate', - 'date', + 'date_add', + 'date_create_from_format', + 'date_create', + 'date_date_set', + 'date_default_timezone_get', + 'date_default_timezone_set', + 'date_diff', + 'date_format', + 'date_get_last_errors', + 'date_interval_create_from_date_string', + 'date_interval_format', + 'date_isodate_set', + 'date_modify', + 'date_offset_get', + 'date_parse_from_format', + 'date_parse', + 'date_sub', + 'date_sun_info', 'date_sunrise', 'date_sunset', + 'date_time_set', + 'date_timestamp_get', + 'date_timestamp_set', + 'date_timezone_get', + 'date_timezone_set', + 'date', 'getdate', 'gettimeofday', 'gmdate', @@ -431,39 +553,71 @@ MODULES = {'.NET': ['dotnet_load'], 'strftime', 'strptime', 'strtotime', - 'time'], - 'Direct IO': ['dio_close', - 'dio_fcntl', - 'dio_open', - 'dio_read', - 'dio_seek', - 'dio_stat', - 'dio_tcsetattr', - 'dio_truncate', - 'dio_write'], - 'Directories': ['chdir', - 'chroot', - 'closedir', - 'getcwd', - 'opendir', - 'readdir', - 'rewinddir', - 'scandir'], - 'Errors and Logging': ['debug_backtrace', - 'debug_print_backtrace', - 'error_log', - 'error_reporting', - 'restore_error_handler', - 'restore_exception_handler', - 'set_error_handler', - 'set_exception_handler', - 'trigger_error', - 'user_error'], + 'time', + 'timezone_abbreviations_list', + 'timezone_identifiers_list', + 'timezone_location_get', + 'timezone_name_from_abbr', + 'timezone_name_get', + 'timezone_offset_get', + 'timezone_open', + 'timezone_transitions_get', + 'timezone_version_get'], + 'Direct IO': ['dio_close', 'dio_fcntl', 'dio_open'], + 'Directory': ['chdir', + 'chroot', + 'closedir', + 'getcwd', + 'opendir', + 'readdir', + 'rewinddir', + 'scandir'], + 'Enchant': ['enchant_broker_describe', + 'enchant_broker_dict_exists', + 'enchant_broker_free_dict', + 'enchant_broker_free', + 'enchant_broker_get_error', + 'enchant_broker_init', + 'enchant_broker_list_dicts', + 'enchant_broker_request_dict', + 'enchant_broker_request_pwl_dict', + 'enchant_broker_set_ordering', + 'enchant_dict_add_to_personal', + 'enchant_dict_add_to_session', + 'enchant_dict_check', + 'enchant_dict_describe', + 'enchant_dict_get_error', + 'enchant_dict_is_in_session', + 'enchant_dict_quick_check', + 'enchant_dict_store_replacement', + 'enchant_dict_suggest'], + 'Error Handling': ['debug_backtrace', + 'debug_print_backtrace', + 'error_get_last', + 'error_log', + 'error_reporting', + 'restore_error_handler', + 'restore_exception_handler', + 'set_error_handler', + 'set_exception_handler', + 'trigger_error', + 'user_error'], 'Exif': ['exif_imagetype', 'exif_read_data', 'exif_tagname', 'exif_thumbnail', 'read_exif_data'], + 'Expect': ['expect_expectl'], + 'FAM': ['fam_cancel_monitor', + 'fam_close', + 'fam_monitor_collection', + 'fam_monitor_directory', + 'fam_monitor_file', + 'fam_next_event', + 'fam_open', + 'fam_pending', + 'fam_resume_monitor', + 'fam_suspend_monitor'], 'FDF': ['fdf_add_doc_javascript', 'fdf_add_template', 'fdf_close', @@ -482,11 +636,11 @@ MODULES = {'.NET': ['dotnet_load'], 'fdf_get_version', 'fdf_header', 'fdf_next_field_name', - 'fdf_open', 'fdf_open_string', + 'fdf_open', 'fdf_remove_item', - 'fdf_save', 'fdf_save_string', + 'fdf_save', 'fdf_set_ap', 'fdf_set_encoding', 'fdf_set_file', @@ -509,8 +663,8 @@ MODULES = {'.NET': ['dotnet_load'], 'ftp_exec', 'ftp_fget', 'ftp_fput', - 'ftp_get', 'ftp_get_option', + 'ftp_get', 'ftp_login', 'ftp_mdtm', 'ftp_mkdir', @@ -533,13 +687,18 @@ MODULES = {'.NET': ['dotnet_load'], 'ftp_size', 'ftp_ssl_connect', 'ftp_systype'], + 'Fileinfo': ['finfo_buffer', + 'finfo_close', + 'finfo_file', + 'finfo_open', + 'finfo_set_flags', + 'mime_content_type'], 'Filesystem': ['basename', 'chgrp', 'chmod', 'chown', 'clearstatcache', 'copy', - 'delete', 'dirname', 'disk_free_space', 'disk_total_space', @@ -551,10 +710,10 @@ MODULES = {'.NET': ['dotnet_load'], 'fgetcsv', 'fgets', 'fgetss', - 'file', 'file_exists', 'file_get_contents', 'file_put_contents', + 'file', 'fileatime', 'filectime', 'filegroup', @@ -586,17 +745,22 @@ MODULES = {'.NET': ['dotnet_load'], 'is_uploaded_file', 'is_writable', 'is_writeable', + 'lchgrp', + 'lchown', 'link', 'linkinfo', 'lstat', 'mkdir', 'move_uploaded_file', 'parse_ini_file', + 'parse_ini_string', 'pathinfo', 'pclose', 'popen', 'readfile', 'readlink', + 'realpath_cache_get', + 'realpath_cache_size', 'realpath', 'rename', 'rewind', @@ -609,6 +773,13 @@ MODULES = {'.NET': ['dotnet_load'], 'touch', 'umask', 'unlink'], + 'Filter': ['filter_has_var', + 'filter_id', + 'filter_input_array', + 'filter_input', + 'filter_list', + 'filter_var_array', + 'filter_var'], 'Firebird/InterBase': ['ibase_add_user', 'ibase_affected_rows', 'ibase_backup', @@ -622,8 +793,8 @@ MODULES = {'.NET': ['dotnet_load'], 'ibase_blob_info', 'ibase_blob_open', 'ibase_close', - 'ibase_commit', 'ibase_commit_ret', + 'ibase_commit', 'ibase_connect', 'ibase_db_info', 'ibase_delete_user', @@ -649,8 +820,8 @@ MODULES = {'.NET': ['dotnet_load'], 'ibase_prepare', 'ibase_query', 'ibase_restore', - 'ibase_rollback', 'ibase_rollback_ret', + 'ibase_rollback', 'ibase_server_info', 'ibase_service_attach', 'ibase_service_detach', @@ -671,8 +842,8 @@ MODULES = {'.NET': ['dotnet_load'], 'fbsql_create_clob', 'fbsql_create_db', 'fbsql_data_seek', - 'fbsql_database', 'fbsql_database_password', + 'fbsql_database', 'fbsql_db_query', 'fbsql_db_status', 'fbsql_drop_db', @@ -707,18 +878,23 @@ MODULES = {'.NET': ['dotnet_load'], 'fbsql_read_clob', 'fbsql_result', 'fbsql_rollback', + 'fbsql_rows_fetched', 'fbsql_select_db', + 'fbsql_set_characterset', 'fbsql_set_lob_mode', 'fbsql_set_password', 'fbsql_set_transaction', 'fbsql_start_db', 'fbsql_stop_db', + 'fbsql_table_name', 'fbsql_tablename', 'fbsql_username', 'fbsql_warnings'], - 'Function handling': ['call_user_func', - 'call_user_func_array', + 'Function handling': ['call_user_func_array', + 'call_user_func', 'create_function', + 'forward_static_call_array', + 'forward_static_call', 'func_get_arg', 'func_get_args', 'func_num_args', @@ -727,16 +903,20 @@ MODULES = {'.NET': ['dotnet_load'], 'register_shutdown_function', 'register_tick_function', 'unregister_tick_function'], + 'GD and Image': ['gd_info', + 'getimagesize', + 'image_type_to_extension', + 'image_type_to_mime_type'], 'GMP': ['gmp_abs', 'gmp_add', 'gmp_and', 'gmp_clrbit', 'gmp_cmp', 'gmp_com', - 'gmp_div', 'gmp_div_q', 'gmp_div_qr', 'gmp_div_r', + 'gmp_div', 'gmp_divexact', 'gmp_fact', 'gmp_gcd', @@ -750,6 +930,7 @@ MODULES = {'.NET': ['dotnet_load'], 'gmp_mod', 'gmp_mul', 'gmp_neg', + 'gmp_nextprime', 'gmp_or', 'gmp_perfect_square', 'gmp_popcount', @@ -765,70 +946,286 @@ MODULES = {'.NET': ['dotnet_load'], 'gmp_sqrtrem', 'gmp_strval', 'gmp_sub', + 'gmp_testbit', 'gmp_xor'], - 'Hyperwave': ['hw_array2objrec', + 'GeoIP': ['geoip_continent_code_by_name', + 'geoip_country_code_by_name', + 'geoip_country_code3_by_name', + 'geoip_country_name_by_name', + 'geoip_database_info', + 'geoip_db_avail', + 'geoip_db_filename', + 'geoip_db_get_all_info', + 'geoip_id_by_name', + 'geoip_isp_by_name', + 'geoip_org_by_name', + 'geoip_record_by_name', + 'geoip_region_by_name', + 'geoip_region_name_by_code', + 'geoip_time_zone_by_country_and_region'], + 'Gettext': ['bind_textdomain_codeset', + 'bindtextdomain', + 'dcgettext', + 'dcngettext', + 'dgettext', + 'dngettext', + 'gettext', + 'ngettext', + 'textdomain'], + 'GnuPG': ['gnupg_adddecryptkey', + 'gnupg_addencryptkey', + 'gnupg_addsignkey', + 'gnupg_cleardecryptkeys', + 'gnupg_clearencryptkeys', + 'gnupg_clearsignkeys', + 'gnupg_decrypt', + 'gnupg_decryptverify', + 'gnupg_encrypt', + 'gnupg_encryptsign', + 'gnupg_export', + 'gnupg_geterror', + 'gnupg_getprotocol', + 'gnupg_import', + 'gnupg_init', + 'gnupg_keyinfo', + 'gnupg_setarmor', + 'gnupg_seterrormode', + 'gnupg_setsignmode', + 'gnupg_sign', + 'gnupg_verify'], + 'Gopher': ['gopher_parsedir'], + 'Grapheme': ['grapheme_extract', + 'grapheme_stripos', + 'grapheme_stristr', + 'grapheme_strlen', + 'grapheme_strpos', + 'grapheme_strripos', + 'grapheme_strrpos', + 'grapheme_strstr', + 'grapheme_substr'], + 'Gupnp': ['gupnp_context_get_host_ip', + 'gupnp_context_get_port', + 'gupnp_context_get_subscription_timeout', + 'gupnp_context_host_path', + 'gupnp_context_new', + 'gupnp_context_set_subscription_timeout', + 'gupnp_context_timeout_add', + 'gupnp_context_unhost_path', + 'gupnp_control_point_browse_start', + 'gupnp_control_point_browse_stop', + 'gupnp_control_point_callback_set', + 'gupnp_control_point_new', + 'gupnp_device_action_callback_set', + 'gupnp_device_info_get_service', + 'gupnp_device_info_get', + 'gupnp_root_device_get_available', + 'gupnp_root_device_get_relative_location', + 'gupnp_root_device_new', + 'gupnp_root_device_set_available', + 'gupnp_root_device_start', + 'gupnp_root_device_stop', + 'gupnp_service_action_get', + 'gupnp_service_action_return_error', + 'gupnp_service_action_return', + 'gupnp_service_action_set', + 'gupnp_service_freeze_notify', + 'gupnp_service_info_get_introspection', + 'gupnp_service_info_get', + 'gupnp_service_introspection_get_state_variable', + 'gupnp_service_notify', + 'gupnp_service_proxy_action_get', + 'gupnp_service_proxy_action_set', + 'gupnp_service_proxy_add_notify', + 'gupnp_service_proxy_callback_set', + 'gupnp_service_proxy_get_subscribed', + 'gupnp_service_proxy_remove_notify', + 'gupnp_service_proxy_set_subscribed', + 'gupnp_service_thaw_notify'], + 'HTTP': ['http_cache_etag', + 'http_cache_last_modified', + 'http_chunked_decode', + 'http_deflate', + 'http_inflate', + 'http_build_cookie', + 'http_date', + 'http_get_request_body_stream', + 'http_get_request_body', + 'http_get_request_headers', + 'http_match_etag', + 'http_match_modified', + 'http_match_request_header', + 'http_support', + 'http_negotiate_charset', + 'http_negotiate_content_type', + 'http_negotiate_language', + 'ob_deflatehandler', + 'ob_etaghandler', + 'ob_inflatehandler', + 'http_parse_cookie', + 'http_parse_headers', + 'http_parse_message', + 'http_parse_params', + 'http_persistent_handles_clean', + 'http_persistent_handles_count', + 'http_persistent_handles_ident', + 'http_get', + 'http_head', + 'http_post_data', + 'http_post_fields', + 'http_put_data', + 'http_put_file', + 'http_put_stream', + 'http_request_body_encode', + 'http_request_method_exists', + 'http_request_method_name', + 'http_request_method_register', + 'http_request_method_unregister', + 'http_request', + 'http_redirect', + 'http_send_content_disposition', + 'http_send_content_type', + 'http_send_data', + 'http_send_file', + 'http_send_last_modified', + 'http_send_status', + 'http_send_stream', + 'http_throttle', + 'http_build_str', + 'http_build_url'], + 'Hash': ['hash_algos', + 'hash_copy', + 'hash_file', + 'hash_final', + 'hash_hmac_file', + 'hash_hmac', + 'hash_init', + 'hash_update_file', + 'hash_update_stream', + 'hash_update', + 'hash'], + 'Hyperwave': ['hw_Array2Objrec', 'hw_changeobject', - 'hw_children', - 'hw_childrenobj', - 'hw_close', - 'hw_connect', + 'hw_Children', + 'hw_ChildrenObj', + 'hw_Close', + 'hw_Connect', 'hw_connection_info', 'hw_cp', - 'hw_deleteobject', - 'hw_docbyanchor', - 'hw_docbyanchorobj', - 'hw_document_attributes', - 'hw_document_bodytag', - 'hw_document_content', - 'hw_document_setcontent', - 'hw_document_size', + 'hw_Deleteobject', + 'hw_DocByAnchor', + 'hw_DocByAnchorObj', + 'hw_Document_Attributes', + 'hw_Document_BodyTag', + 'hw_Document_Content', + 'hw_Document_SetContent', + 'hw_Document_Size', 'hw_dummy', - 'hw_edittext', - 'hw_error', - 'hw_errormsg', - 'hw_free_document', - 'hw_getanchors', - 'hw_getanchorsobj', - 'hw_getandlock', - 'hw_getchildcoll', - 'hw_getchildcollobj', - 'hw_getchilddoccoll', - 'hw_getchilddoccollobj', - 'hw_getobject', - 'hw_getobjectbyquery', - 'hw_getobjectbyquerycoll', - 'hw_getobjectbyquerycollobj', - 'hw_getobjectbyqueryobj', - 'hw_getparents', - 'hw_getparentsobj', + 'hw_EditText', + 'hw_Error', + 'hw_ErrorMsg', + 'hw_Free_Document', + 'hw_GetAnchors', + 'hw_GetAnchorsObj', + 'hw_GetAndLock', + 'hw_GetChildColl', + 'hw_GetChildCollObj', + 'hw_GetChildDocColl', + 'hw_GetChildDocCollObj', + 'hw_GetObject', + 'hw_GetObjectByQuery', + 'hw_GetObjectByQueryColl', + 'hw_GetObjectByQueryCollObj', + 'hw_GetObjectByQueryObj', + 'hw_GetParents', + 'hw_GetParentsObj', 'hw_getrellink', - 'hw_getremote', + 'hw_GetRemote', 'hw_getremotechildren', - 'hw_getsrcbydestobj', - 'hw_gettext', + 'hw_GetSrcByDestObj', + 'hw_GetText', 'hw_getusername', - 'hw_identify', - 'hw_incollections', - 'hw_info', - 'hw_inscoll', - 'hw_insdoc', + 'hw_Identify', + 'hw_InCollections', + 'hw_Info', + 'hw_InsColl', + 'hw_InsDoc', 'hw_insertanchors', - 'hw_insertdocument', - 'hw_insertobject', + 'hw_InsertDocument', + 'hw_InsertObject', 'hw_mapid', - 'hw_modifyobject', + 'hw_Modifyobject', 'hw_mv', - 'hw_new_document', + 'hw_New_Document', 'hw_objrec2array', - 'hw_output_document', - 'hw_pconnect', - 'hw_pipedocument', - 'hw_root', + 'hw_Output_Document', + 'hw_pConnect', + 'hw_PipeDocument', + 'hw_Root', 'hw_setlinkroot', 'hw_stat', - 'hw_unlock', - 'hw_who'], - 'Hyperwave API': ['hwapi_hgcsp'], + 'hw_Unlock', + 'hw_Who'], + 'Hyperwave API': ['hw_api_attribute', + 'hwapi_hgcsp', + 'hw_api_content', + 'hw_api_object'], + 'IBM DB2': ['db2_autocommit', + 'db2_bind_param', + 'db2_client_info', + 'db2_close', + 'db2_column_privileges', + 'db2_columns', + 'db2_commit', + 'db2_conn_error', + 'db2_conn_errormsg', + 'db2_connect', + 'db2_cursor_type', + 'db2_escape_string', + 'db2_exec', + 'db2_execute', + 'db2_fetch_array', + 'db2_fetch_assoc', + 'db2_fetch_both', + 'db2_fetch_object', + 'db2_fetch_row', + 'db2_field_display_size', + 'db2_field_name', + 'db2_field_num', + 'db2_field_precision', + 'db2_field_scale', + 'db2_field_type', + 'db2_field_width', + 'db2_foreign_keys', + 'db2_free_result', + 'db2_free_stmt', + 'db2_get_option', + 'db2_last_insert_id'], + 'ID3': ['id3_get_frame_long_name', + 'id3_get_frame_short_name', + 'id3_get_genre_id', + 'id3_get_genre_list', + 'id3_get_genre_name', + 'id3_get_tag', + 'id3_get_version', + 'id3_remove_tag', + 'id3_set_tag'], + 'IDN': ['idn_to_ascii', 'idn_to_unicode', 'idn_to_utf8'], + 'IIS': ['iis_add_server', + 'iis_get_dir_security', + 'iis_get_script_map', + 'iis_get_server_by_comment', + 'iis_get_server_by_path', + 'iis_get_server_rights', + 'iis_get_service_state', + 'iis_remove_server', + 'iis_set_app_settings', + 'iis_set_dir_security', + 'iis_set_script_map', + 'iis_set_server_rights', + 'iis_start_server', + 'iis_start_service', + 'iis_stop_server', + 'iis_stop_service'], 'IMAP': ['imap_8bit', 'imap_alerts', 'imap_append', @@ -847,7 +1244,9 @@ MODULES = {'.NET': ['dotnet_load'], 'imap_fetch_overview', 'imap_fetchbody', 'imap_fetchheader', + 'imap_fetchmime', 'imap_fetchstructure', + 'imap_gc', 'imap_get_quota', 'imap_get_quotaroot', 'imap_getacl', @@ -862,10 +1261,10 @@ MODULES = {'.NET': ['dotnet_load'], 'imap_listscan', 'imap_listsubscribed', 'imap_lsub', - 'imap_mail', 'imap_mail_compose', 'imap_mail_copy', 'imap_mail_move', + 'imap_mail', 'imap_mailboxmsginfo', 'imap_mime_header_decode', 'imap_msgno', @@ -879,6 +1278,7 @@ MODULES = {'.NET': ['dotnet_load'], 'imap_rfc822_parse_adrlist', 'imap_rfc822_parse_headers', 'imap_rfc822_write_address', + 'imap_savebody', 'imap_scanmailbox', 'imap_search', 'imap_set_quota', @@ -895,136 +1295,6 @@ MODULES = {'.NET': ['dotnet_load'], 'imap_utf7_decode', 'imap_utf7_encode', 'imap_utf8'], - 'IRC Gateway': ['ircg_channel_mode', - 'ircg_disconnect', - 'ircg_eval_ecmascript_params', - 'ircg_fetch_error_msg', - 'ircg_get_username', - 'ircg_html_encode', - 'ircg_ignore_add', - 'ircg_ignore_del', - 'ircg_invite', - 'ircg_is_conn_alive', - 'ircg_join', - 'ircg_kick', - 'ircg_list', - 'ircg_lookup_format_messages', - 'ircg_lusers', - 'ircg_msg', - 'ircg_names', - 'ircg_nick', - 'ircg_nickname_escape', - 'ircg_nickname_unescape', - 'ircg_notice', - 'ircg_oper', - 'ircg_part', - 'ircg_pconnect', - 'ircg_register_format_messages', - 'ircg_set_current', - 'ircg_set_file', - 'ircg_set_on_die', - 'ircg_topic', - 'ircg_who', - 'ircg_whois'], - 'Image': ['gd_info', - 'getimagesize', - 'image2wbmp', - 'image_type_to_extension', - 'image_type_to_mime_type', - 'imagealphablending', - 'imageantialias', - 'imagearc', - 'imagechar', - 'imagecharup', - 'imagecolorallocate', - 'imagecolorallocatealpha', - 'imagecolorat', - 'imagecolorclosest', - 'imagecolorclosestalpha', - 'imagecolorclosesthwb', - 'imagecolordeallocate', - 'imagecolorexact', - 'imagecolorexactalpha', - 'imagecolormatch', - 'imagecolorresolve', - 'imagecolorresolvealpha', - 'imagecolorset', - 'imagecolorsforindex', - 'imagecolorstotal', - 'imagecolortransparent', - 'imagecopy', - 'imagecopymerge', - 'imagecopymergegray', - 'imagecopyresampled', - 'imagecopyresized', - 'imagecreate', - 'imagecreatefromgd', - 'imagecreatefromgd2', - 'imagecreatefromgd2part', - 'imagecreatefromgif', - 'imagecreatefromjpeg', - 'imagecreatefrompng', - 'imagecreatefromstring', - 'imagecreatefromwbmp', - 'imagecreatefromxbm', - 'imagecreatefromxpm', - 'imagecreatetruecolor', - 'imagedashedline', - 'imagedestroy', - 'imageellipse', - 'imagefill', - 'imagefilledarc', - 'imagefilledellipse', - 'imagefilledpolygon', - 'imagefilledrectangle', - 'imagefilltoborder', - 'imagefilter', - 'imagefontheight', - 'imagefontwidth', - 'imageftbbox', - 'imagefttext', - 'imagegammacorrect', - 'imagegd', - 'imagegd2', - 'imagegif', - 'imageinterlace', - 'imageistruecolor', - 'imagejpeg', - 'imagelayereffect', - 'imageline', - 'imageloadfont', - 'imagepalettecopy', - 'imagepng', - 'imagepolygon', - 'imagepsbbox', - 'imagepsencodefont', - 'imagepsextendfont', - 'imagepsfreefont', - 'imagepsloadfont', - 'imagepsslantfont', - 'imagepstext', - 'imagerectangle', - 'imagerotate', - 'imagesavealpha', - 'imagesetbrush', - 'imagesetpixel', - 'imagesetstyle', - 'imagesetthickness', - 'imagesettile', - 'imagestring', - 'imagestringup', - 'imagesx', - 'imagesy', - 'imagetruecolortopalette', - 'imagettfbbox', - 'imagettftext', - 'imagetypes', - 'imagewbmp', - 'imagexbm', - 'iptcembed', - 'iptcparse', - 'jpeg2wbmp', - 'png2wbmp'], 'Informix': ['ifx_affected_rows', 'ifx_blobinfile_mode', 'ifx_byteasvarchar', @@ -1063,25 +1333,58 @@ MODULES = {'.NET': ['dotnet_load'], 'ifxus_seek_slob', 'ifxus_tell_slob', 'ifxus_write_slob'], - 'Ingres II': ['ingres_autocommit', - 'ingres_close', - 'ingres_commit', - 'ingres_connect', - 'ingres_fetch_array', - 'ingres_fetch_object', - 'ingres_fetch_row', - 'ingres_field_length', - 'ingres_field_name', - 'ingres_field_nullable', - 'ingres_field_precision', - 'ingres_field_scale', - 'ingres_field_type', - 'ingres_num_fields', - 'ingres_num_rows', - 'ingres_pconnect', - 'ingres_query', - 'ingres_rollback'], + 'Ingres': ['ingres_autocommit_state', + 'ingres_autocommit', + 'ingres_charset', + 'ingres_close', + 'ingres_commit', + 'ingres_connect', + 'ingres_cursor', + 'ingres_errno', + 'ingres_error', + 'ingres_errsqlstate', + 'ingres_escape_string', + 'ingres_execute', + 'ingres_fetch_array', + 'ingres_fetch_assoc', + 'ingres_fetch_object', + 'ingres_fetch_proc_return', + 'ingres_fetch_row', + 'ingres_field_length', + 'ingres_field_name', + 'ingres_field_nullable', + 'ingres_field_precision', + 'ingres_field_scale', + 'ingres_field_type', + 'ingres_free_result', + 'ingres_next_error', + 'ingres_num_fields', + 'ingres_num_rows', + 'ingres_pconnect', + 'ingres_prepare', + 'ingres_query', + 'ingres_result_seek', + 'ingres_rollback', + 'ingres_set_environment', + 'ingres_unbuffered_query'], + 'Inotify': ['inotify_add_watch', + 'inotify_init', + 'inotify_queue_len', + 'inotify_read', + 'inotify_rm_watch'], + 'JSON': ['json_decode', 'json_encode', 'json_last_error'], 'Java': ['java_last_exception_clear', 'java_last_exception_get'], + 'Judy': ['judy_type', 'judy_version'], + 'KADM5': ['kadm5_chpass_principal', + 'kadm5_create_principal', + 'kadm5_delete_principal', + 'kadm5_destroy', + 'kadm5_flush', + 'kadm5_get_policies', + 'kadm5_get_principal', + 'kadm5_get_principals', + 'kadm5_init_with_password', + 'kadm5_modify_principal'], 'LDAP': ['ldap_8859_to_t61', 'ldap_add', 'ldap_bind', @@ -1103,8 +1406,8 @@ MODULES = {'.NET': ['dotnet_load'], 'ldap_get_dn', 'ldap_get_entries', 'ldap_get_option', - 'ldap_get_values', 'ldap_get_values_len', + 'ldap_get_values', 'ldap_list', 'ldap_mod_add', 'ldap_mod_del', @@ -1126,6 +1429,30 @@ MODULES = {'.NET': ['dotnet_load'], 'ldap_t61_to_8859', 'ldap_unbind'], 'LZF': ['lzf_compress', 'lzf_decompress', 'lzf_optimized_for'], + 'Libevent': ['event_add', + 'event_base_free', + 'event_base_loop', + 'event_base_loopbreak', + 'event_base_loopexit', + 'event_base_new', + 'event_base_priority_init', + 'event_base_set', + 'event_buffer_base_set', + 'event_buffer_disable', + 'event_buffer_enable', + 'event_buffer_fd_set', + 'event_buffer_free', + 'event_buffer_new', + 'event_buffer_priority_set', + 'event_buffer_read', + 'event_buffer_set_callback', + 'event_buffer_timeout_set', + 'event_buffer_watermark_set', + 'event_buffer_write', + 'event_del', + 'event_free', + 'event_new', + 'event_set'], 'Lotus Notes': ['notes_body', 'notes_copy_db', 'notes_create_db', @@ -1140,84 +1467,48 @@ MODULES = {'.NET': ['dotnet_load'], 'notes_search', 'notes_unread', 'notes_version'], - 'MCAL': ['mcal_append_event', - 'mcal_close', - 'mcal_create_calendar', - 'mcal_date_compare', - 'mcal_date_valid', - 'mcal_day_of_week', - 'mcal_day_of_year', - 'mcal_days_in_month', - 'mcal_delete_calendar', - 'mcal_delete_event', - 'mcal_event_add_attribute', - 'mcal_event_init', - 'mcal_event_set_alarm', - 'mcal_event_set_category', - 'mcal_event_set_class', - 'mcal_event_set_description', - 'mcal_event_set_end', - 'mcal_event_set_recur_daily', - 'mcal_event_set_recur_monthly_mday', - 'mcal_event_set_recur_monthly_wday', - 'mcal_event_set_recur_none', - 'mcal_event_set_recur_weekly', - 'mcal_event_set_recur_yearly', - 'mcal_event_set_start', - 'mcal_event_set_title', - 'mcal_expunge', - 'mcal_fetch_current_stream_event', - 'mcal_fetch_event', - 'mcal_is_leap_year', - 'mcal_list_alarms', - 'mcal_list_events', - 'mcal_next_recurrence', - 'mcal_open', - 'mcal_popen', - 'mcal_rename_calendar', - 'mcal_reopen', - 'mcal_snooze', - 'mcal_store_event', - 'mcal_time_valid', - 'mcal_week_of_year'], - 'MS SQL Server': ['mssql_bind', - 'mssql_close', - 'mssql_connect', - 'mssql_data_seek', - 'mssql_execute', - 'mssql_fetch_array', - 'mssql_fetch_assoc', - 'mssql_fetch_batch', - 'mssql_fetch_field', - 'mssql_fetch_object', - 'mssql_fetch_row', - 'mssql_field_length', - 'mssql_field_name', - 'mssql_field_seek', - 'mssql_field_type', - 'mssql_free_result', - 'mssql_free_statement', - 'mssql_get_last_message', - 'mssql_guid_string', - 'mssql_init', - 'mssql_min_error_severity', - 'mssql_min_message_severity', - 'mssql_next_result', - 'mssql_num_fields', - 'mssql_num_rows', - 'mssql_pconnect', - 'mssql_query', - 'mssql_result', - 'mssql_rows_affected', - 'mssql_select_db'], + 'MCVE': ['m_checkstatus', + 'm_completeauthorizations', + 'm_connect', + 'm_connectionerror', + 'm_deletetrans', + 'm_destroyconn', + 'm_destroyengine', + 'm_getcell', + 'm_getcellbynum', + 'm_getcommadelimited', + 'm_getheader', + 'm_initconn', + 'm_initengine', + 'm_iscommadelimited', + 'm_maxconntimeout', + 'm_monitor', + 'm_numcolumns', + 'm_numrows', + 'm_parsecommadelimited', + 'm_responsekeys'], 'Mail': ['ezmlm_hash', 'mail'], + 'Mailparse': ['mailparse_determine_best_xfer_encoding', + 'mailparse_msg_create', + 'mailparse_msg_extract_part_file', + 'mailparse_msg_extract_part', + 'mailparse_msg_extract_whole_part_file', + 'mailparse_msg_free', + 'mailparse_msg_get_part_data', + 'mailparse_msg_get_part', + 'mailparse_msg_get_structure', + 'mailparse_msg_parse_file', + 'mailparse_msg_parse', + 'mailparse_rfc822_parse_addresses', + 'mailparse_stream_encode', + 'mailparse_uudecode_all'], 'Math': ['abs', 'acos', 'acosh', 'asin', 'asinh', - 'atan', 'atan2', + 'atan', 'atanh', 'base_convert', 'bindec', @@ -1229,53 +1520,134 @@ MODULES = {'.NET': ['dotnet_load'], 'decoct', 'deg2rad', 'exp', - 'expm1', - 'floor', - 'fmod', - 'getrandmax', - 'hexdec', - 'hypot', - 'is_finite', - 'is_infinite', - 'is_nan', - 'lcg_value', - 'log', - 'log10', - 'log1p', - 'max', - 'min', - 'mt_getrandmax', - 'mt_rand', - 'mt_srand', - 'octdec', - 'pi', - 'pow', - 'rad2deg', - 'rand', - 'round', - 'sin', - 'sinh', - 'sqrt', - 'srand', - 'tan', - 'tanh'], + 'expm1'], + 'MaxDB': ['maxdb_affected_rows', + 'maxdb_autocommit', + 'maxdb_bind_param', + 'maxdb_bind_result', + 'maxdb_change_user', + 'maxdb_character_set_name', + 'maxdb_client_encoding', + 'maxdb_close_long_data', + 'maxdb_close', + 'maxdb_commit', + 'maxdb_connect_errno', + 'maxdb_connect_error', + 'maxdb_connect', + 'maxdb_data_seek', + 'maxdb_debug', + 'maxdb_disable_reads_from_master', + 'maxdb_disable_rpl_parse', + 'maxdb_dump_debug_info', + 'maxdb_embedded_connect', + 'maxdb_enable_reads_from_master', + 'maxdb_enable_rpl_parse', + 'maxdb_errno', + 'maxdb_error', + 'maxdb_escape_string', + 'maxdb_execute', + 'maxdb_fetch_array', + 'maxdb_fetch_assoc', + 'maxdb_fetch_field_direct', + 'maxdb_fetch_field', + 'maxdb_fetch_fields', + 'maxdb_fetch_lengths', + 'maxdb_fetch_object', + 'maxdb_fetch_row', + 'maxdb_fetch', + 'maxdb_field_count', + 'maxdb_field_seek', + 'maxdb_field_tell', + 'maxdb_free_result', + 'maxdb_get_client_info', + 'maxdb_get_client_version', + 'maxdb_get_host_info', + 'maxdb_get_metadata', + 'maxdb_get_proto_info', + 'maxdb_get_server_info', + 'maxdb_get_server_version', + 'maxdb_info', + 'maxdb_init', + 'maxdb_insert_id', + 'maxdb_kill', + 'maxdb_master_query', + 'maxdb_more_results', + 'maxdb_multi_query', + 'maxdb_next_result', + 'maxdb_num_fields', + 'maxdb_num_rows', + 'maxdb_options', + 'maxdb_param_count', + 'maxdb_ping', + 'maxdb_prepare', + 'maxdb_query', + 'maxdb_real_connect', + 'maxdb_real_escape_string', + 'maxdb_real_query', + 'maxdb_report', + 'maxdb_rollback', + 'maxdb_rpl_parse_enabled', + 'maxdb_rpl_probe', + 'maxdb_rpl_query_type', + 'maxdb_select_db', + 'maxdb_send_long_data', + 'maxdb_send_query', + 'maxdb_server_end', + 'maxdb_server_init', + 'maxdb_set_opt', + 'maxdb_sqlstate', + 'maxdb_ssl_set', + 'maxdb_stat', + 'maxdb_stmt_affected_rows'], + 'Mcrypt': ['mcrypt_cbc', + 'mcrypt_cfb', + 'mcrypt_create_iv', + 'mcrypt_decrypt', + 'mcrypt_ecb', + 'mcrypt_enc_get_algorithms_name', + 'mcrypt_enc_get_block_size', + 'mcrypt_enc_get_iv_size', + 'mcrypt_enc_get_key_size', + 'mcrypt_enc_get_modes_name', + 'mcrypt_enc_get_supported_key_sizes', + 'mcrypt_enc_is_block_algorithm_mode', + 'mcrypt_enc_is_block_algorithm', + 'mcrypt_enc_is_block_mode', + 'mcrypt_enc_self_test', + 'mcrypt_encrypt', + 'mcrypt_generic_deinit', + 'mcrypt_generic_end', + 'mcrypt_generic_init', + 'mcrypt_generic', + 'mcrypt_get_block_size', + 'mcrypt_get_cipher_name', + 'mcrypt_get_iv_size', + 'mcrypt_get_key_size', + 'mcrypt_list_algorithms', + 'mcrypt_list_modes', + 'mcrypt_module_close', + 'mcrypt_module_get_algo_block_size', + 'mcrypt_module_get_algo_key_size', + 'mcrypt_module_get_supported_key_sizes', + 'mcrypt_module_is_block_algorithm_mode', + 'mcrypt_module_is_block_algorithm', + 'mcrypt_module_is_block_mode', + 'mcrypt_module_open', + 'mcrypt_module_self_test', + 'mcrypt_ofb', + 'mdecrypt_generic'], 'Memcache': ['memcache_debug'], - 'Mimetype': ['mime_content_type'], - 'Ming (flash)': ['ming_setcubicthreshold', - 'ming_setscale', - 'ming_useswfversion', - 'swfaction', - 'swfbitmap', - 'swfbutton', - 'swffill', - 'swffont', - 'swfgradient', - 'swfmorph', - 'swfmovie', - 'swfshape', - 'swfsprite', - 'swftext', - 'swftextfield'], + 'Mhash': ['mhash_count', + 'mhash_get_block_size', + 'mhash_get_hash_name', + 'mhash_keygen_s2k', + 'mhash'], + 'Ming': ['ming_keypress', + 'ming_setcubicthreshold', + 'ming_setscale', + 'ming_setswfcompression', + 'ming_useconstants', + 'ming_useswfversion'], 'Misc.': ['connection_aborted', 'connection_status', 'connection_timeout', @@ -1286,6 +1658,7 @@ MODULES = {'.NET': ['dotnet_load'], 'eval', 'exit', 'get_browser', + '__halt_compiler', 'highlight_file', 'highlight_string', 'ignore_user_abort', @@ -1294,32 +1667,66 @@ MODULES = {'.NET': ['dotnet_load'], 'php_strip_whitespace', 'show_source', 'sleep', + 'sys_getloadavg', 'time_nanosleep', + 'time_sleep_until', 'uniqid', 'unpack', 'usleep'], + 'Mongo': ['bson_decode', 'bson_encode'], 'Msession': ['msession_connect', 'msession_count', 'msession_create', 'msession_destroy', 'msession_disconnect', 'msession_find', - 'msession_get', 'msession_get_array', 'msession_get_data', + 'msession_get', 'msession_inc', 'msession_list', 'msession_listvar', 'msession_lock', 'msession_plugin', 'msession_randstr', - 'msession_set', 'msession_set_array', 'msession_set_data', + 'msession_set', 'msession_timeout', 'msession_uniq', 'msession_unlock'], - 'Multibyte String': ['mb_convert_case', + 'Mssql': ['mssql_bind', + 'mssql_close', + 'mssql_connect', + 'mssql_data_seek', + 'mssql_execute', + 'mssql_fetch_array', + 'mssql_fetch_assoc', + 'mssql_fetch_batch', + 'mssql_fetch_field', + 'mssql_fetch_object', + 'mssql_fetch_row', + 'mssql_field_length', + 'mssql_field_name', + 'mssql_field_seek', + 'mssql_field_type', + 'mssql_free_result', + 'mssql_free_statement', + 'mssql_get_last_message', + 'mssql_guid_string', + 'mssql_init', + 'mssql_min_error_severity', + 'mssql_min_message_severity', + 'mssql_next_result', + 'mssql_num_fields', + 'mssql_num_rows', + 'mssql_pconnect', + 'mssql_query', + 'mssql_result', + 'mssql_rows_affected', + 'mssql_select_db'], + 'Multibyte String': ['mb_check_encoding', + 'mb_convert_case', 'mb_convert_encoding', 'mb_convert_kana', 'mb_convert_variables', @@ -1329,18 +1736,19 @@ MODULES = {'.NET': ['dotnet_load'], 'mb_detect_order', 'mb_encode_mimeheader', 'mb_encode_numericentity', - 'mb_ereg', + 'mb_encoding_aliases', 'mb_ereg_match', 'mb_ereg_replace', - 'mb_ereg_search', 'mb_ereg_search_getpos', 'mb_ereg_search_getregs', 'mb_ereg_search_init', 'mb_ereg_search_pos', 'mb_ereg_search_regs', 'mb_ereg_search_setpos', - 'mb_eregi', + 'mb_ereg_search', + 'mb_ereg', 'mb_eregi_replace', + 'mb_eregi', 'mb_get_info', 'mb_http_input', 'mb_http_output', @@ -1356,17 +1764,22 @@ MODULES = {'.NET': ['dotnet_load'], 'mb_split', 'mb_strcut', 'mb_strimwidth', + 'mb_stripos', + 'mb_stristr', 'mb_strlen', 'mb_strpos', + 'mb_strrchr', + 'mb_strrichr', + 'mb_strripos', 'mb_strrpos', + 'mb_strstr', 'mb_strtolower', 'mb_strtoupper', 'mb_strwidth', 'mb_substitute_character', - 'mb_substr', - 'mb_substr_count'], + 'mb_substr_count', + 'mb_substr'], 'MySQL': ['mysql_affected_rows', - 'mysql_change_user', 'mysql_client_encoding', 'mysql_close', 'mysql_connect', @@ -1409,6 +1822,7 @@ MODULES = {'.NET': ['dotnet_load'], 'mysql_real_escape_string', 'mysql_result', 'mysql_select_db', + 'mysql_set_charset', 'mysql_stat', 'mysql_tablename', 'mysql_thread_id', @@ -1466,9 +1880,9 @@ MODULES = {'.NET': ['dotnet_load'], 'ncurses_hide_panel', 'ncurses_hline', 'ncurses_inch', - 'ncurses_init', 'ncurses_init_color', 'ncurses_init_pair', + 'ncurses_init', 'ncurses_insch', 'ncurses_insdelln', 'ncurses_insertln', @@ -1483,8 +1897,8 @@ MODULES = {'.NET': ['dotnet_load'], 'ncurses_mouse_trafo', 'ncurses_mouseinterval', 'ncurses_mousemask', - 'ncurses_move', 'ncurses_move_panel', + 'ncurses_move', 'ncurses_mvaddch', 'ncurses_mvaddchnstr', 'ncurses_mvaddchstr', @@ -1576,8 +1990,6 @@ MODULES = {'.NET': ['dotnet_load'], 'ncurses_wvline'], 'Network': ['checkdnsrr', 'closelog', - 'debugger_off', - 'debugger_on', 'define_syslog_variables', 'dns_check_record', 'dns_get_mx', @@ -1585,28 +1997,31 @@ MODULES = {'.NET': ['dotnet_load'], 'fsockopen', 'gethostbyaddr', 'gethostbyname', - 'gethostbynamel', - 'getmxrr', - 'getprotobyname', - 'getprotobynumber', - 'getservbyname', - 'getservbyport', - 'header', - 'headers_list', - 'headers_sent', - 'inet_ntop', - 'inet_pton', - 'ip2long', - 'long2ip', - 'openlog', - 'pfsockopen', - 'setcookie', - 'setrawcookie', - 'socket_get_status', - 'socket_set_blocking', - 'socket_set_timeout', - 'syslog'], - 'OCI8': ['oci_bind_by_name', + 'gethostbynamel'], + 'Newt': ['newt_bell', + 'newt_button_bar', + 'newt_button', + 'newt_centered_window', + 'newt_checkbox_get_value', + 'newt_checkbox_set_flags', + 'newt_checkbox_set_value', + 'newt_checkbox_tree_add_item', + 'newt_checkbox_tree_find_item', + 'newt_checkbox_tree_get_current', + 'newt_checkbox_tree_get_entry_value', + 'newt_checkbox_tree_get_multi_selection', + 'newt_checkbox_tree_get_selection', + 'newt_checkbox_tree_multi', + 'newt_checkbox_tree_set_current', + 'newt_checkbox_tree_set_entry_value', + 'newt_checkbox_tree_set_entry', + 'newt_checkbox_tree_set_width', + 'newt_checkbox_tree', + 'newt_checkbox', + 'newt_clear_key_buffer'], + 'OAuth': ['oauth_get_sbs', 'oauth_urlencode'], + 'OCI8': ['oci_bind_array_by_name', + 'oci_bind_by_name', 'oci_cancel', 'oci_close', 'oci_commit', @@ -1614,19 +2029,19 @@ MODULES = {'.NET': ['dotnet_load'], 'oci_define_by_name', 'oci_error', 'oci_execute', - 'oci_fetch', 'oci_fetch_all', 'oci_fetch_array', 'oci_fetch_assoc', 'oci_fetch_object', 'oci_fetch_row', + 'oci_fetch', 'oci_field_is_null', 'oci_field_name', 'oci_field_precision', 'oci_field_scale', 'oci_field_size', - 'oci_field_type', 'oci_field_type_raw', + 'oci_field_type', 'oci_free_statement', 'oci_internal_debug', 'oci_lob_copy', @@ -1643,61 +2058,17 @@ MODULES = {'.NET': ['dotnet_load'], 'oci_result', 'oci_rollback', 'oci_server_version', + 'oci_set_action', + 'oci_set_client_identifier', + 'oci_set_client_info', + 'oci_set_edition', + 'oci_set_module_name', 'oci_set_prefetch', - 'oci_statement_type', - 'ocibindbyname', - 'ocicancel', - 'ocicloselob', - 'ocicollappend', - 'ocicollassign', - 'ocicollassignelem', - 'ocicollgetelem', - 'ocicollmax', - 'ocicollsize', - 'ocicolltrim', - 'ocicolumnisnull', - 'ocicolumnname', - 'ocicolumnprecision', - 'ocicolumnscale', - 'ocicolumnsize', - 'ocicolumntype', - 'ocicolumntyperaw', - 'ocicommit', - 'ocidefinebyname', - 'ocierror', - 'ociexecute', - 'ocifetch', - 'ocifetchinto', - 'ocifetchstatement', - 'ocifreecollection', - 'ocifreecursor', - 'ocifreedesc', - 'ocifreestatement', - 'ociinternaldebug', - 'ociloadlob', - 'ocilogoff', - 'ocilogon', - 'ocinewcollection', - 'ocinewcursor', - 'ocinewdescriptor', - 'ocinlogon', - 'ocinumcols', - 'ociparse', - 'ociplogon', - 'ociresult', - 'ocirollback', - 'ocirowcount', - 'ocisavelob', - 'ocisavelobfile', - 'ociserverversion', - 'ocisetprefetch', - 'ocistatementtype', - 'ociwritelobtofile', - 'ociwritetemporarylob'], + 'oci_statement_type'], 'ODBC': ['odbc_autocommit', 'odbc_binmode', - 'odbc_close', 'odbc_close_all', + 'odbc_close', 'odbc_columnprivileges', 'odbc_columns', 'odbc_commit', @@ -1731,40 +2102,69 @@ MODULES = {'.NET': ['dotnet_load'], 'odbc_primarykeys', 'odbc_procedurecolumns', 'odbc_procedures', - 'odbc_result', 'odbc_result_all', + 'odbc_result', 'odbc_rollback', 'odbc_setoption', 'odbc_specialcolumns', 'odbc_statistics', 'odbc_tableprivileges', 'odbc_tables'], - 'Object Aggregation': ['aggregate', - 'aggregate_info', - 'aggregate_methods', + 'Object Aggregation': ['aggregate_info', 'aggregate_methods_by_list', - 'aggregate_methods_by_regexp', - 'aggregate_properties', - 'aggregate_properties_by_list', - 'aggregate_properties_by_regexp', - 'aggregation_info', - 'deaggregate'], + 'aggregate_methods_by_regexp'], 'Object overloading': ['overload'], - 'OpenSSL': ['openssl_csr_export', - 'openssl_csr_export_to_file', + 'OpenAL': ['openal_buffer_create', + 'openal_buffer_data', + 'openal_buffer_destroy', + 'openal_buffer_get', + 'openal_buffer_loadwav', + 'openal_context_create', + 'openal_context_current', + 'openal_context_destroy', + 'openal_context_process', + 'openal_context_suspend', + 'openal_device_close', + 'openal_device_open', + 'openal_listener_get', + 'openal_listener_set', + 'openal_source_create', + 'openal_source_destroy', + 'openal_source_get', + 'openal_source_pause', + 'openal_source_play', + 'openal_source_rewind', + 'openal_source_set', + 'openal_source_stop', + 'openal_stream'], + 'OpenSSL': ['openssl_csr_export_to_file', + 'openssl_csr_export', + 'openssl_csr_get_public_key', + 'openssl_csr_get_subject', 'openssl_csr_new', 'openssl_csr_sign', + 'openssl_decrypt', + 'openssl_dh_compute_key', + 'openssl_digest', + 'openssl_encrypt', 'openssl_error_string', 'openssl_free_key', + 'openssl_get_cipher_methods', + 'openssl_get_md_methods', 'openssl_get_privatekey', 'openssl_get_publickey', 'openssl_open', + 'openssl_pkcs12_export_to_file', + 'openssl_pkcs12_export', + 'openssl_pkcs12_read', 'openssl_pkcs7_decrypt', 'openssl_pkcs7_encrypt', 'openssl_pkcs7_sign', 'openssl_pkcs7_verify', - 'openssl_pkey_export', 'openssl_pkey_export_to_file', + 'openssl_pkey_export', + 'openssl_pkey_free', + 'openssl_pkey_get_details', 'openssl_pkey_get_private', 'openssl_pkey_get_public', 'openssl_pkey_new', @@ -1772,39 +2172,17 @@ MODULES = {'.NET': ['dotnet_load'], 'openssl_private_encrypt', 'openssl_public_decrypt', 'openssl_public_encrypt', + 'openssl_random_pseudo_bytes', 'openssl_seal', 'openssl_sign', 'openssl_verify', 'openssl_x509_check_private_key', 'openssl_x509_checkpurpose', - 'openssl_x509_export', 'openssl_x509_export_to_file', + 'openssl_x509_export', 'openssl_x509_free', 'openssl_x509_parse', 'openssl_x509_read'], - 'Oracle': ['ora_bind', - 'ora_close', - 'ora_columnname', - 'ora_columnsize', - 'ora_columntype', - 'ora_commit', - 'ora_commitoff', - 'ora_commiton', - 'ora_do', - 'ora_error', - 'ora_errorcode', - 'ora_exec', - 'ora_fetch', - 'ora_fetch_into', - 'ora_getcolumn', - 'ora_logoff', - 'ora_logon', - 'ora_numcols', - 'ora_numrows', - 'ora_open', - 'ora_parse', - 'ora_plogon', - 'ora_rollback'], 'Output Control': ['flush', 'ob_clean', 'ob_end_clean', @@ -1822,32 +2200,36 @@ MODULES = {'.NET': ['dotnet_load'], 'ob_start', 'output_add_rewrite_var', 'output_reset_rewrite_vars'], - 'OvrimosSQL': ['ovrimos_close', - 'ovrimos_commit', - 'ovrimos_connect', - 'ovrimos_cursor', - 'ovrimos_exec', - 'ovrimos_execute', - 'ovrimos_fetch_into', - 'ovrimos_fetch_row', - 'ovrimos_field_len', - 'ovrimos_field_name', - 'ovrimos_field_num', - 'ovrimos_field_type', - 'ovrimos_free_result', - 'ovrimos_longreadlen', - 'ovrimos_num_fields', - 'ovrimos_num_rows', - 'ovrimos_prepare', - 'ovrimos_result', - 'ovrimos_result_all', - 'ovrimos_rollback'], + 'Ovrimos SQL': ['ovrimos_close', + 'ovrimos_commit', + 'ovrimos_connect', + 'ovrimos_cursor', + 'ovrimos_exec', + 'ovrimos_execute', + 'ovrimos_fetch_into', + 'ovrimos_fetch_row', + 'ovrimos_field_len', + 'ovrimos_field_name', + 'ovrimos_field_num', + 'ovrimos_field_type', + 'ovrimos_free_result', + 'ovrimos_longreadlen', + 'ovrimos_num_fields', + 'ovrimos_num_rows', + 'ovrimos_prepare', + 'ovrimos_result_all', + 'ovrimos_result', + 'ovrimos_rollback'], 'PCNTL': ['pcntl_alarm', 'pcntl_exec', 'pcntl_fork', 'pcntl_getpriority', 'pcntl_setpriority', + 'pcntl_signal_dispatch', 'pcntl_signal', + 'pcntl_sigprocmask', + 'pcntl_sigtimedwait', + 'pcntl_sigwaitinfo', 'pcntl_wait', 'pcntl_waitpid', 'pcntl_wexitstatus', @@ -1856,129 +2238,202 @@ MODULES = {'.NET': ['dotnet_load'], 'pcntl_wifstopped', 'pcntl_wstopsig', 'pcntl_wtermsig'], - 'PCRE': ['preg_grep', - 'preg_match', + 'PCRE': ['preg_filter', + 'preg_grep', + 'preg_last_error', 'preg_match_all', + 'preg_match', 'preg_quote', - 'preg_replace', 'preg_replace_callback', + 'preg_replace', 'preg_split'], - 'PDF': ['pdf_add_annotation', - 'pdf_add_bookmark', - 'pdf_add_launchlink', - 'pdf_add_locallink', - 'pdf_add_note', - 'pdf_add_outline', - 'pdf_add_pdflink', - 'pdf_add_thumbnail', - 'pdf_add_weblink', - 'pdf_arc', - 'pdf_arcn', - 'pdf_attach_file', - 'pdf_begin_page', - 'pdf_begin_pattern', - 'pdf_begin_template', - 'pdf_circle', - 'pdf_clip', - 'pdf_close', - 'pdf_close_image', - 'pdf_close_pdi', - 'pdf_close_pdi_page', - 'pdf_closepath', - 'pdf_closepath_fill_stroke', - 'pdf_closepath_stroke', - 'pdf_concat', - 'pdf_continue_text', - 'pdf_curveto', - 'pdf_delete', - 'pdf_end_page', - 'pdf_end_pattern', - 'pdf_end_template', - 'pdf_endpath', - 'pdf_fill', - 'pdf_fill_stroke', - 'pdf_findfont', - 'pdf_get_buffer', - 'pdf_get_font', - 'pdf_get_fontname', - 'pdf_get_fontsize', - 'pdf_get_image_height', - 'pdf_get_image_width', - 'pdf_get_majorversion', - 'pdf_get_minorversion', - 'pdf_get_parameter', - 'pdf_get_pdi_parameter', - 'pdf_get_pdi_value', - 'pdf_get_value', - 'pdf_initgraphics', - 'pdf_lineto', - 'pdf_makespotcolor', - 'pdf_moveto', - 'pdf_new', - 'pdf_open_ccitt', - 'pdf_open_file', - 'pdf_open_gif', - 'pdf_open_image', - 'pdf_open_image_file', - 'pdf_open_jpeg', - 'pdf_open_memory_image', - 'pdf_open_pdi', - 'pdf_open_pdi_page', - 'pdf_open_tiff', - 'pdf_place_image', - 'pdf_place_pdi_page', - 'pdf_rect', - 'pdf_restore', - 'pdf_rotate', - 'pdf_save', - 'pdf_scale', - 'pdf_set_border_color', - 'pdf_set_border_dash', - 'pdf_set_border_style', - 'pdf_set_char_spacing', - 'pdf_set_duration', - 'pdf_set_horiz_scaling', - 'pdf_set_info', - 'pdf_set_info_author', - 'pdf_set_info_creator', - 'pdf_set_info_keywords', - 'pdf_set_info_subject', - 'pdf_set_info_title', - 'pdf_set_leading', - 'pdf_set_parameter', - 'pdf_set_text_matrix', - 'pdf_set_text_pos', - 'pdf_set_text_rendering', - 'pdf_set_text_rise', - 'pdf_set_value', - 'pdf_set_word_spacing', - 'pdf_setcolor', - 'pdf_setdash', - 'pdf_setflat', - 'pdf_setfont', - 'pdf_setgray', - 'pdf_setgray_fill', - 'pdf_setgray_stroke', - 'pdf_setlinecap', - 'pdf_setlinejoin', - 'pdf_setlinewidth', - 'pdf_setmatrix', - 'pdf_setmiterlimit', - 'pdf_setpolydash', - 'pdf_setrgbcolor', - 'pdf_setrgbcolor_fill', - 'pdf_setrgbcolor_stroke', - 'pdf_show', - 'pdf_show_boxed', - 'pdf_show_xy', - 'pdf_skew', - 'pdf_stringwidth', - 'pdf_stroke', - 'pdf_translate'], - 'PHP Options/Info': ['assert', - 'assert_options', + 'PDF': ['PDF_activate_item', + 'PDF_add_annotation', + 'PDF_add_bookmark', + 'PDF_add_launchlink', + 'PDF_add_locallink', + 'PDF_add_nameddest', + 'PDF_add_note', + 'PDF_add_outline', + 'PDF_add_pdflink', + 'PDF_add_table_cell', + 'PDF_add_textflow', + 'PDF_add_thumbnail', + 'PDF_add_weblink', + 'PDF_arc', + 'PDF_arcn', + 'PDF_attach_file', + 'PDF_begin_document', + 'PDF_begin_font', + 'PDF_begin_glyph', + 'PDF_begin_item', + 'PDF_begin_layer', + 'PDF_begin_page_ext', + 'PDF_begin_page', + 'PDF_begin_pattern', + 'PDF_begin_template_ext', + 'PDF_begin_template', + 'PDF_circle', + 'PDF_clip', + 'PDF_close_image', + 'PDF_close_pdi_page', + 'PDF_close_pdi', + 'PDF_close', + 'PDF_closepath_fill_stroke', + 'PDF_closepath_stroke', + 'PDF_closepath', + 'PDF_concat', + 'PDF_continue_text', + 'PDF_create_3dview', + 'PDF_create_action', + 'PDF_create_annotation', + 'PDF_create_bookmark', + 'PDF_create_field', + 'PDF_create_fieldgroup', + 'PDF_create_gstate', + 'PDF_create_pvf', + 'PDF_create_textflow', + 'PDF_curveto', + 'PDF_define_layer', + 'PDF_delete_pvf', + 'PDF_delete_table', + 'PDF_delete_textflow', + 'PDF_delete', + 'PDF_encoding_set_char', + 'PDF_end_document', + 'PDF_end_font', + 'PDF_end_glyph', + 'PDF_end_item', + 'PDF_end_layer', + 'PDF_end_page_ext', + 'PDF_end_page', + 'PDF_end_pattern', + 'PDF_end_template', + 'PDF_endpath', + 'PDF_fill_imageblock', + 'PDF_fill_pdfblock', + 'PDF_fill_stroke', + 'PDF_fill_textblock', + 'PDF_fill', + 'PDF_findfont', + 'PDF_fit_image', + 'PDF_fit_pdi_page', + 'PDF_fit_table', + 'PDF_fit_textflow', + 'PDF_fit_textline', + 'PDF_get_apiname', + 'PDF_get_buffer', + 'PDF_get_errmsg', + 'PDF_get_errnum', + 'PDF_get_font', + 'PDF_get_fontname', + 'PDF_get_fontsize', + 'PDF_get_image_height', + 'PDF_get_image_width', + 'PDF_get_majorversion', + 'PDF_get_minorversion', + 'PDF_get_parameter', + 'PDF_get_pdi_parameter', + 'PDF_get_pdi_value', + 'PDF_get_value', + 'PDF_info_font', + 'PDF_info_matchbox', + 'PDF_info_table', + 'PDF_info_textflow', + 'PDF_info_textline', + 'PDF_initgraphics', + 'PDF_lineto', + 'PDF_load_3ddata', + 'PDF_load_font', + 'PDF_load_iccprofile', + 'PDF_load_image', + 'PDF_makespotcolor', + 'PDF_moveto', + 'PDF_new', + 'PDF_open_ccitt', + 'PDF_open_file', + 'PDF_open_gif', + 'PDF_open_image_file', + 'PDF_open_image', + 'PDF_open_jpeg', + 'PDF_open_memory_image', + 'PDF_open_pdi_document', + 'PDF_open_pdi_page', + 'PDF_open_pdi', + 'PDF_open_tiff', + 'PDF_pcos_get_number', + 'PDF_pcos_get_stream', + 'PDF_pcos_get_string', + 'PDF_place_image', + 'PDF_place_pdi_page', + 'PDF_process_pdi', + 'PDF_rect', + 'PDF_restore', + 'PDF_resume_page', + 'PDF_rotate', + 'PDF_save', + 'PDF_scale', + 'PDF_set_border_color', + 'PDF_set_border_dash', + 'PDF_set_border_style', + 'PDF_set_char_spacing', + 'PDF_set_duration', + 'PDF_set_gstate', + 'PDF_set_horiz_scaling', + 'PDF_set_info_author', + 'PDF_set_info_creator', + 'PDF_set_info_keywords', + 'PDF_set_info_subject', + 'PDF_set_info_title', + 'PDF_set_info', + 'PDF_set_layer_dependency', + 'PDF_set_leading', + 'PDF_set_parameter', + 'PDF_set_text_matrix', + 'PDF_set_text_pos', + 'PDF_set_text_rendering', + 'PDF_set_text_rise', + 'PDF_set_value', + 'PDF_set_word_spacing', + 'PDF_setcolor', + 'PDF_setdash', + 'PDF_setdashpattern', + 'PDF_setflat', + 'PDF_setfont', + 'PDF_setgray_fill', + 'PDF_setgray_stroke', + 'PDF_setgray', + 'PDF_setlinecap', + 'PDF_setlinejoin', + 'PDF_setlinewidth', + 'PDF_setmatrix', + 'PDF_setmiterlimit', + 'PDF_setpolydash', + 'PDF_setrgbcolor_fill', + 'PDF_setrgbcolor_stroke', + 'PDF_setrgbcolor', + 'PDF_shading_pattern', + 'PDF_shading', + 'PDF_shfill', + 'PDF_show_boxed', + 'PDF_show_xy', + 'PDF_show', + 'PDF_skew', + 'PDF_stringwidth', + 'PDF_stroke', + 'PDF_suspend_page', + 'PDF_translate', + 'PDF_utf16_to_utf8', + 'PDF_utf32_to_utf16', + 'PDF_utf8_to_utf16'], + 'PHP Options/Info': ['assert_options', + 'assert', 'dl', 'extension_loaded', + 'gc_collect_cycles', + 'gc_disable', + 'gc_enable', + 'gc_enabled', 'get_cfg_var', 'get_current_user', 'get_defined_constants', @@ -1998,12 +2453,14 @@ MODULES = {'.NET': ['dotnet_load'], 'getopt', 'getrusage', 'ini_alter', - 'ini_get', 'ini_get_all', + 'ini_get', 'ini_restore', 'ini_set', - 'main', + 'magic_quotes_runtime', + 'memory_get_peak_usage', 'memory_get_usage', + 'php_ini_loaded_file', 'php_ini_scanned_files', 'php_logo_guid', 'php_sapi_name', @@ -2016,10 +2473,14 @@ MODULES = {'.NET': ['dotnet_load'], 'set_include_path', 'set_magic_quotes_runtime', 'set_time_limit', + 'sys_get_temp_dir', 'version_compare', 'zend_logo_guid', + 'zend_thread_id', 'zend_version'], - 'POSIX': ['posix_ctermid', + 'POSIX': ['posix_access', + 'posix_ctermid', + 'posix_errno', 'posix_get_last_error', 'posix_getcwd', 'posix_getegid', @@ -2038,9 +2499,11 @@ MODULES = {'.NET': ['dotnet_load'], 'posix_getrlimit', 'posix_getsid', 'posix_getuid', + 'posix_initgroups', 'posix_isatty', 'posix_kill', 'posix_mkfifo', + 'posix_mknod', 'posix_setegid', 'posix_seteuid', 'posix_setgid', @@ -2051,13 +2514,116 @@ MODULES = {'.NET': ['dotnet_load'], 'posix_times', 'posix_ttyname', 'posix_uname'], - 'POSIX Regex': ['ereg', - 'ereg_replace', - 'eregi', + 'POSIX Regex': ['ereg_replace', + 'ereg', 'eregi_replace', + 'eregi', 'split', 'spliti', 'sql_regcase'], + 'PS': ['ps_add_bookmark', + 'ps_add_launchlink', + 'ps_add_locallink', + 'ps_add_note', + 'ps_add_pdflink', + 'ps_add_weblink', + 'ps_arc', + 'ps_arcn', + 'ps_begin_page', + 'ps_begin_pattern', + 'ps_begin_template', + 'ps_circle', + 'ps_clip', + 'ps_close_image', + 'ps_close', + 'ps_closepath_stroke', + 'ps_closepath', + 'ps_continue_text', + 'ps_curveto', + 'ps_delete', + 'ps_end_page', + 'ps_end_pattern', + 'ps_end_template', + 'ps_fill_stroke', + 'ps_fill', + 'ps_findfont', + 'ps_get_buffer', + 'ps_get_parameter', + 'ps_get_value', + 'ps_hyphenate', + 'ps_include_file', + 'ps_lineto', + 'ps_makespotcolor', + 'ps_moveto', + 'ps_new', + 'ps_open_file', + 'ps_open_image_file', + 'ps_open_image', + 'ps_open_memory_image', + 'ps_place_image', + 'ps_rect', + 'ps_restore', + 'ps_rotate', + 'ps_save', + 'ps_scale', + 'ps_set_border_color', + 'ps_set_border_dash', + 'ps_set_border_style', + 'ps_set_info', + 'ps_set_parameter', + 'ps_set_text_pos', + 'ps_set_value', + 'ps_setcolor', + 'ps_setdash', + 'ps_setflat', + 'ps_setfont', + 'ps_setgray', + 'ps_setlinecap', + 'ps_setlinejoin', + 'ps_setlinewidth', + 'ps_setmiterlimit', + 'ps_setoverprintmode', + 'ps_setpolydash', + 'ps_shading_pattern', + 'ps_shading', + 'ps_shfill', + 'ps_show_boxed', + 'ps_show_xy2', + 'ps_show_xy', + 'ps_show2', + 'ps_show', + 'ps_string_geometry', + 'ps_stringwidth', + 'ps_stroke', + 'ps_symbol_name', + 'ps_symbol_width', + 'ps_symbol', + 'ps_translate'], + 'Paradox': ['px_close', + 'px_create_fp', + 'px_date2string', + 'px_delete_record', + 'px_delete', + 'px_get_field', + 'px_get_info', + 'px_get_parameter', + 'px_get_record', + 'px_get_schema', + 'px_get_value', + 'px_insert_record', + 'px_new', + 'px_numfields', + 'px_numrecords', + 'px_open_fp', + 'px_put_record', + 'px_retrieve_record', + 'px_set_blob_file', + 'px_set_parameter', + 'px_set_tablename', + 'px_set_targetencoding', + 'px_set_value', + 'px_timestamp2string', + 'px_update_record'], 'Parsekit': ['parsekit_compile_file', 'parsekit_compile_string', 'parsekit_func_arginfo'], @@ -2077,6 +2643,8 @@ MODULES = {'.NET': ['dotnet_load'], 'pg_end_copy', 'pg_escape_bytea', 'pg_escape_string', + 'pg_execute', + 'pg_fetch_all_columns', 'pg_fetch_all', 'pg_fetch_array', 'pg_fetch_assoc', @@ -2088,6 +2656,8 @@ MODULES = {'.NET': ['dotnet_load'], 'pg_field_num', 'pg_field_prtlen', 'pg_field_size', + 'pg_field_table', + 'pg_field_type_oid', 'pg_field_type', 'pg_free_result', 'pg_get_notify', @@ -2103,8 +2673,8 @@ MODULES = {'.NET': ['dotnet_load'], 'pg_lo_export', 'pg_lo_import', 'pg_lo_open', - 'pg_lo_read', 'pg_lo_read_all', + 'pg_lo_read', 'pg_lo_seek', 'pg_lo_tell', 'pg_lo_unlink', @@ -2117,20 +2687,7 @@ MODULES = {'.NET': ['dotnet_load'], 'pg_pconnect', 'pg_ping', 'pg_port', - 'pg_put_line', - 'pg_query', - 'pg_result_error', - 'pg_result_seek', - 'pg_result_status', - 'pg_select', - 'pg_send_query', - 'pg_set_client_encoding', - 'pg_trace', - 'pg_tty', - 'pg_unescape_bytea', - 'pg_untrace', - 'pg_update', - 'pg_version'], + 'pg_prepare'], 'Printer': ['printer_abort', 'printer_close', 'printer_create_brush', @@ -2162,7 +2719,7 @@ MODULES = {'.NET': ['dotnet_load'], 'printer_start_doc', 'printer_start_page', 'printer_write'], - 'Program Execution': ['escapeshellarg', + 'Program execution': ['escapeshellarg', 'escapeshellcmd', 'exec', 'passthru', @@ -2185,16 +2742,51 @@ MODULES = {'.NET': ['dotnet_load'], 'pspell_config_personal', 'pspell_config_repl', 'pspell_config_runtogether', - 'pspell_config_save_repl', - 'pspell_new', - 'pspell_new_config', - 'pspell_new_personal', - 'pspell_save_wordlist', - 'pspell_store_replacement', - 'pspell_suggest'], - 'Rar': ['rar_close', 'rar_entry_get', 'rar_list', 'rar_open'], - 'Readline': ['readline', - 'readline_add_history', + 'pspell_config_save_repl'], + 'RPM Reader': ['rpm_close', + 'rpm_get_tag', + 'rpm_is_valid', + 'rpm_open', + 'rpm_version'], + 'RRD': ['rrd_create', + 'rrd_error', + 'rrd_fetch', + 'rrd_first', + 'rrd_graph', + 'rrd_info', + 'rrd_last', + 'rrd_lastupdate', + 'rrd_restore', + 'rrd_tune', + 'rrd_update', + 'rrd_xport'], + 'Radius': ['radius_acct_open', + 'radius_add_server', + 'radius_auth_open', + 'radius_close', + 'radius_config', + 'radius_create_request', + 'radius_cvt_addr', + 'radius_cvt_int', + 'radius_cvt_string', + 'radius_demangle_mppe_key', + 'radius_demangle', + 'radius_get_attr', + 'radius_get_vendor_attr', + 'radius_put_addr', + 'radius_put_attr', + 'radius_put_int', + 'radius_put_string', + 'radius_put_vendor_addr', + 'radius_put_vendor_attr', + 'radius_put_vendor_int', + 'radius_put_vendor_string', + 'radius_request_authenticator', + 'radius_send_request', + 'radius_server_secret', + 'radius_strerror'], + 'Rar': ['rar_wrapper_cache_stats'], + 'Readline': ['readline_add_history', 'readline_callback_handler_install', 'readline_callback_handler_remove', 'readline_callback_read_char', @@ -2205,78 +2797,124 @@ MODULES = {'.NET': ['dotnet_load'], 'readline_on_new_line', 'readline_read_history', 'readline_redisplay', - 'readline_write_history'], - 'Recode': ['recode', 'recode_file', 'recode_string'], - 'SESAM': ['sesam_affected_rows', - 'sesam_commit', - 'sesam_connect', - 'sesam_diagnostic', - 'sesam_disconnect', - 'sesam_errormsg', - 'sesam_execimm', - 'sesam_fetch_array', - 'sesam_fetch_result', - 'sesam_fetch_row', - 'sesam_field_array', - 'sesam_field_name', - 'sesam_free_result', - 'sesam_num_fields', - 'sesam_query', - 'sesam_rollback', - 'sesam_seek_row', - 'sesam_settransaction'], + 'readline_write_history', + 'readline'], + 'Recode': ['recode_file', 'recode_string', 'recode'], 'SNMP': ['snmp_get_quick_print', 'snmp_get_valueretrieval', 'snmp_read_mib', 'snmp_set_enum_print', 'snmp_set_oid_numeric_print', + 'snmp_set_oid_output_format', 'snmp_set_quick_print', 'snmp_set_valueretrieval', + 'snmp2_get', + 'snmp2_getnext', + 'snmp2_real_walk', + 'snmp2_set', + 'snmp2_walk', + 'snmp3_get', + 'snmp3_getnext', + 'snmp3_real_walk', + 'snmp3_set', + 'snmp3_walk', 'snmpget', 'snmpgetnext', 'snmprealwalk', 'snmpset', 'snmpwalk', 'snmpwalkoid'], - 'SOAP': ['is_soap_fault'], - 'SQLite': ['sqlite_array_query', - 'sqlite_busy_timeout', - 'sqlite_changes', - 'sqlite_close', - 'sqlite_column', - 'sqlite_create_aggregate', - 'sqlite_create_function', - 'sqlite_current', - 'sqlite_error_string', - 'sqlite_escape_string', - 'sqlite_exec', - 'sqlite_factory', - 'sqlite_fetch_all', - 'sqlite_fetch_array', - 'sqlite_fetch_column_types', - 'sqlite_fetch_object', - 'sqlite_fetch_single', - 'sqlite_fetch_string', - 'sqlite_field_name', - 'sqlite_has_more', - 'sqlite_has_prev', - 'sqlite_last_error', - 'sqlite_last_insert_rowid', - 'sqlite_libencoding', - 'sqlite_libversion', - 'sqlite_next', - 'sqlite_num_fields', - 'sqlite_num_rows', - 'sqlite_open', - 'sqlite_popen', - 'sqlite_prev', - 'sqlite_query', - 'sqlite_rewind', - 'sqlite_seek', - 'sqlite_single_query', - 'sqlite_udf_decode_binary', - 'sqlite_udf_encode_binary', - 'sqlite_unbuffered_query'], + 'SOAP': ['is_soap_fault', 'use_soap_error_handler'], + 'SPL': ['class_implements', + 'class_parents', + 'iterator_apply', + 'iterator_count', + 'iterator_to_array', + 'spl_autoload_call', + 'spl_autoload_extensions', + 'spl_autoload_functions', + 'spl_autoload_register', + 'spl_autoload_unregister', + 'spl_autoload', + 'spl_classes', + 'spl_object_hash'], + 'SPPLUS': ['calcul_hmac', 'calculhmac', 'nthmac', 'signeurlpaiement'], + 'SQLite': ['sqlite_array_query', 'sqlite_busy_timeout', 'sqlite_changes'], + 'SSH2': ['ssh2_auth_hostbased_file', + 'ssh2_auth_none', + 'ssh2_auth_password', + 'ssh2_auth_pubkey_file', + 'ssh2_connect', + 'ssh2_exec', + 'ssh2_fetch_stream', + 'ssh2_fingerprint', + 'ssh2_methods_negotiated', + 'ssh2_publickey_add', + 'ssh2_publickey_init', + 'ssh2_publickey_list', + 'ssh2_publickey_remove', + 'ssh2_scp_recv', + 'ssh2_scp_send', + 'ssh2_sftp_lstat', + 'ssh2_sftp_mkdir', + 'ssh2_sftp_readlink', + 'ssh2_sftp_realpath', + 'ssh2_sftp_rename', + 'ssh2_sftp_rmdir', + 'ssh2_sftp_stat', + 'ssh2_sftp_symlink', + 'ssh2_sftp_unlink', + 'ssh2_sftp', + 'ssh2_shell', + 'ssh2_tunnel'], + 'SVN': ['svn_add', + 'svn_auth_get_parameter', + 'svn_auth_set_parameter', + 'svn_blame', + 'svn_cat', + 'svn_checkout', + 'svn_cleanup', + 'svn_client_version', + 'svn_commit', + 'svn_delete', + 'svn_diff', + 'svn_export', + 'svn_fs_abort_txn', + 'svn_fs_apply_text', + 'svn_fs_begin_txn2', + 'svn_fs_change_node_prop', + 'svn_fs_check_path', + 'svn_fs_contents_changed', + 'svn_fs_copy', + 'svn_fs_delete', + 'svn_fs_dir_entries', + 'svn_fs_file_contents', + 'svn_fs_file_length', + 'svn_fs_is_dir', + 'svn_fs_is_file', + 'svn_fs_make_dir', + 'svn_fs_make_file', + 'svn_fs_node_created_rev', + 'svn_fs_node_prop', + 'svn_fs_props_changed', + 'svn_fs_revision_prop', + 'svn_fs_revision_root', + 'svn_fs_txn_root', + 'svn_fs_youngest_rev', + 'svn_import', + 'svn_log', + 'svn_ls', + 'svn_mkdir', + 'svn_repos_create', + 'svn_repos_fs_begin_txn_for_commit', + 'svn_repos_fs_commit_txn', + 'svn_repos_fs', + 'svn_repos_hotcopy', + 'svn_repos_open', + 'svn_repos_recover', + 'svn_revert', + 'svn_status', + 'svn_update'], 'SWF': ['swf_actiongeturl', 'swf_actiongotoframe', 'swf_actiongotolabel', @@ -2313,8 +2951,8 @@ MODULES = {'.NET': ['dotnet_load'], 'swf_nextid', 'swf_oncondition', 'swf_openfile', - 'swf_ortho', 'swf_ortho2', + 'swf_ortho', 'swf_perspective', 'swf_placeobject', 'swf_polarview', @@ -2327,8 +2965,8 @@ MODULES = {'.NET': ['dotnet_load'], 'swf_setfont', 'swf_setframe', 'swf_shapearc', - 'swf_shapecurveto', 'swf_shapecurveto3', + 'swf_shapecurveto', 'swf_shapefillbitmapclip', 'swf_shapefillbitmaptile', 'swf_shapefilloff', @@ -2346,6 +2984,7 @@ MODULES = {'.NET': ['dotnet_load'], 'swf_viewport'], 'Semaphore': ['ftok', 'msg_get_queue', + 'msg_queue_exists', 'msg_receive', 'msg_remove_queue', 'msg_send', @@ -2358,182 +2997,250 @@ MODULES = {'.NET': ['dotnet_load'], 'shm_attach', 'shm_detach', 'shm_get_var', + 'shm_has_var', 'shm_put_var', - 'shm_remove', - 'shm_remove_var'], - 'Sessions': ['session_cache_expire', - 'session_cache_limiter', - 'session_commit', - 'session_decode', - 'session_destroy', - 'session_encode', - 'session_get_cookie_params', - 'session_id', - 'session_is_registered', - 'session_module_name', - 'session_name', - 'session_regenerate_id', - 'session_register', - 'session_save_path', - 'session_set_cookie_params', - 'session_set_save_handler', - 'session_start', - 'session_unregister', - 'session_unset', - 'session_write_close'], + 'shm_remove_var', + 'shm_remove'], + 'Session': ['session_cache_expire', + 'session_cache_limiter', + 'session_commit', + 'session_decode', + 'session_destroy', + 'session_encode', + 'session_get_cookie_params', + 'session_id', + 'session_is_registered', + 'session_module_name', + 'session_name', + 'session_regenerate_id', + 'session_register', + 'session_save_path', + 'session_set_cookie_params', + 'session_set_save_handler', + 'session_start', + 'session_unregister', + 'session_unset', + 'session_write_close'], + 'Session PgSQL': ['session_pgsql_add_error', + 'session_pgsql_get_error', + 'session_pgsql_get_field', + 'session_pgsql_reset', + 'session_pgsql_set_field', + 'session_pgsql_status'], + 'Shared Memory': ['shmop_close', + 'shmop_delete', + 'shmop_open', + 'shmop_read', + 'shmop_size', + 'shmop_write'], 'SimpleXML': ['simplexml_import_dom', 'simplexml_load_file', 'simplexml_load_string'], - 'Sockets': ['socket_accept', - 'socket_bind', - 'socket_clear_error', - 'socket_close', - 'socket_connect', - 'socket_create', - 'socket_create_listen', - 'socket_create_pair', - 'socket_get_option', - 'socket_getpeername', - 'socket_getsockname', - 'socket_last_error', - 'socket_listen', - 'socket_read', - 'socket_recv', - 'socket_recvfrom', - 'socket_select', - 'socket_send', - 'socket_sendto', - 'socket_set_block', - 'socket_set_nonblock', - 'socket_set_option', - 'socket_shutdown', - 'socket_strerror', - 'socket_write'], - 'Streams': ['stream_context_create', - 'stream_context_get_default', - 'stream_context_get_options', - 'stream_context_set_option', - 'stream_context_set_params', - 'stream_copy_to_stream', - 'stream_filter_append', - 'stream_filter_prepend', - 'stream_filter_register', - 'stream_filter_remove', - 'stream_get_contents', - 'stream_get_filters', - 'stream_get_line', - 'stream_get_meta_data', - 'stream_get_transports', - 'stream_get_wrappers', - 'stream_register_wrapper', - 'stream_select', - 'stream_set_blocking', - 'stream_set_timeout', - 'stream_set_write_buffer', - 'stream_socket_accept', - 'stream_socket_client', - 'stream_socket_enable_crypto', - 'stream_socket_get_name', - 'stream_socket_pair', - 'stream_socket_recvfrom', - 'stream_socket_sendto', - 'stream_socket_server', - 'stream_wrapper_register', - 'stream_wrapper_restore', - 'stream_wrapper_unregister'], - 'Strings': ['addcslashes', - 'addslashes', - 'bin2hex', - 'chop', - 'chr', - 'chunk_split', - 'convert_cyr_string', - 'convert_uudecode', - 'convert_uuencode', - 'count_chars', - 'crc32', - 'crypt', - 'echo', - 'explode', - 'fprintf', - 'get_html_translation_table', - 'hebrev', - 'hebrevc', - 'html_entity_decode', - 'htmlentities', - 'htmlspecialchars', - 'implode', - 'join', - 'levenshtein', - 'localeconv', - 'ltrim', - 'md5', - 'md5_file', - 'metaphone', - 'money_format', - 'nl2br', - 'nl_langinfo', - 'number_format', - 'ord', - 'parse_str', - 'print', - 'printf', - 'quoted_printable_decode', - 'quotemeta', - 'rtrim', - 'setlocale', - 'sha1', - 'sha1_file', - 'similar_text', - 'soundex', - 'sprintf', - 'sscanf', - 'str_ireplace', - 'str_pad', - 'str_repeat', - 'str_replace', - 'str_rot13', - 'str_shuffle', - 'str_split', - 'str_word_count', - 'strcasecmp', - 'strchr', - 'strcmp', - 'strcoll', - 'strcspn', - 'strip_tags', - 'stripcslashes', - 'stripos', - 'stripslashes', - 'stristr', - 'strlen', - 'strnatcasecmp', - 'strnatcmp', - 'strncasecmp', - 'strncmp', - 'strpbrk', - 'strpos', - 'strrchr', - 'strrev', - 'strripos', - 'strrpos', - 'strspn', - 'strstr', - 'strtok', - 'strtolower', - 'strtoupper', - 'strtr', - 'substr', - 'substr_compare', - 'substr_count', - 'substr_replace', - 'trim', - 'ucfirst', - 'ucwords', - 'vfprintf', - 'vprintf', - 'vsprintf', - 'wordwrap'], + 'Socket': ['socket_accept', + 'socket_bind', + 'socket_clear_error', + 'socket_close', + 'socket_connect', + 'socket_create_listen', + 'socket_create_pair', + 'socket_create', + 'socket_get_option', + 'socket_getpeername', + 'socket_getsockname', + 'socket_last_error', + 'socket_listen', + 'socket_read', + 'socket_recv', + 'socket_recvfrom', + 'socket_select', + 'socket_send', + 'socket_sendto', + 'socket_set_block', + 'socket_set_nonblock', + 'socket_set_option', + 'socket_shutdown', + 'socket_strerror', + 'socket_write'], + 'Solr': ['solr_get_version'], + 'Statistic': ['stats_absolute_deviation', + 'stats_cdf_beta', + 'stats_cdf_binomial', + 'stats_cdf_cauchy', + 'stats_cdf_chisquare', + 'stats_cdf_exponential', + 'stats_cdf_f', + 'stats_cdf_gamma', + 'stats_cdf_laplace', + 'stats_cdf_logistic', + 'stats_cdf_negative_binomial', + 'stats_cdf_noncentral_chisquare', + 'stats_cdf_noncentral_f', + 'stats_cdf_poisson', + 'stats_cdf_t', + 'stats_cdf_uniform', + 'stats_cdf_weibull', + 'stats_covariance', + 'stats_den_uniform', + 'stats_dens_beta', + 'stats_dens_cauchy', + 'stats_dens_chisquare', + 'stats_dens_exponential', + 'stats_dens_f', + 'stats_dens_gamma', + 'stats_dens_laplace', + 'stats_dens_logistic', + 'stats_dens_negative_binomial', + 'stats_dens_normal', + 'stats_dens_pmf_binomial', + 'stats_dens_pmf_hypergeometric', + 'stats_dens_pmf_poisson', + 'stats_dens_t', + 'stats_dens_weibull', + 'stats_harmonic_mean', + 'stats_kurtosis', + 'stats_rand_gen_beta', + 'stats_rand_gen_chisquare', + 'stats_rand_gen_exponential', + 'stats_rand_gen_f', + 'stats_rand_gen_funiform', + 'stats_rand_gen_gamma', + 'stats_rand_gen_ibinomial_negative', + 'stats_rand_gen_ibinomial', + 'stats_rand_gen_int', + 'stats_rand_gen_ipoisson', + 'stats_rand_gen_iuniform', + 'stats_rand_gen_noncenral_chisquare', + 'stats_rand_gen_noncentral_f', + 'stats_rand_gen_noncentral_t', + 'stats_rand_gen_normal', + 'stats_rand_gen_t', + 'stats_rand_get_seeds', + 'stats_rand_phrase_to_seeds', + 'stats_rand_ranf', + 'stats_rand_setall', + 'stats_skew', + 'stats_standard_deviation', + 'stats_stat_binomial_coef', + 'stats_stat_correlation', + 'stats_stat_gennch', + 'stats_stat_independent_t', + 'stats_stat_innerproduct', + 'stats_stat_noncentral_t', + 'stats_stat_paired_t', + 'stats_stat_percentile', + 'stats_stat_powersum', + 'stats_variance'], + 'Stomp': ['stomp_connect_error', 'stomp_version'], + 'Stream': ['set_socket_blocking', + 'stream_bucket_append', + 'stream_bucket_make_writeable', + 'stream_bucket_new', + 'stream_bucket_prepend', + 'stream_context_create', + 'stream_context_get_default', + 'stream_context_get_options', + 'stream_context_get_params', + 'stream_context_set_default', + 'stream_context_set_option', + 'stream_context_set_params', + 'stream_copy_to_stream', + 'stream_encoding', + 'stream_filter_append', + 'stream_filter_prepend', + 'stream_filter_register', + 'stream_filter_remove', + 'stream_get_contents', + 'stream_get_filters', + 'stream_get_line', + 'stream_get_meta_data', + 'stream_get_transports', + 'stream_get_wrappers', + 'stream_is_local', + 'stream_notification_callback', + 'stream_register_wrapper', + 'stream_resolve_include_path', + 'stream_select'], + 'String': ['addcslashes', + 'addslashes', + 'bin2hex', + 'chop', + 'chr', + 'chunk_split', + 'convert_cyr_string', + 'convert_uudecode', + 'convert_uuencode', + 'count_chars', + 'crc32', + 'crypt', + 'echo', + 'explode', + 'fprintf', + 'get_html_translation_table', + 'hebrev', + 'hebrevc', + 'html_entity_decode', + 'htmlentities', + 'htmlspecialchars_decode', + 'htmlspecialchars', + 'implode', + 'join', + 'lcfirst', + 'levenshtein', + 'localeconv', + 'ltrim', + 'md5_file', + 'md5', + 'metaphone', + 'money_format', + 'nl_langinfo', + 'nl2br', + 'number_format', + 'ord', + 'parse_str', + 'print', + 'printf', + 'quoted_printable_decode', + 'quoted_printable_encode', + 'quotemeta', + 'rtrim', + 'setlocale', + 'sha1_file', + 'sha1', + 'similar_text', + 'soundex', + 'sprintf', + 'sscanf', + 'str_getcsv', + 'str_ireplace', + 'str_pad', + 'str_repeat', + 'str_replace', + 'str_rot13', + 'str_shuffle', + 'str_split', + 'str_word_count', + 'strcasecmp', + 'strchr', + 'strcmp', + 'strcoll', + 'strcspn', + 'strip_tags', + 'stripcslashes', + 'stripos', + 'stripslashes', + 'stristr', + 'strlen', + 'strnatcasecmp', + 'strnatcmp', + 'strncasecmp', + 'strncmp', + 'strpbrk', + 'strpos', + 'strrchr', + 'strrev', + 'strripos', + 'strrpos', + 'strspn'], 'Sybase': ['sybase_affected_rows', 'sybase_close', 'sybase_connect', @@ -2559,56 +3266,63 @@ MODULES = {'.NET': ['dotnet_load'], 'sybase_select_db', 'sybase_set_message_handler', 'sybase_unbuffered_query'], - 'TCP Wrappers': ['tcpwrap_check'], + 'TCP': ['tcpwrap_check'], + 'Tidy': ['ob_tidyhandler', + 'tidy_access_count', + 'tidy_config_count', + 'tidy_error_count', + 'tidy_get_error_buffer', + 'tidy_get_output', + 'tidy_load_config', + 'tidy_reset_config', + 'tidy_save_config', + 'tidy_set_encoding', + 'tidy_setopt', + 'tidy_warning_count'], 'Tokenizer': ['token_get_all', 'token_name'], - 'URLs': ['base64_decode', - 'base64_encode', - 'get_headers', - 'get_meta_tags', - 'http_build_query', - 'parse_url', - 'rawurldecode', - 'rawurlencode', - 'urldecode', - 'urlencode'], - 'Variables handling': ['debug_zval_dump', - 'doubleval', - 'empty', - 'floatval', - 'get_defined_vars', - 'get_resource_type', - 'gettype', - 'import_request_variables', - 'intval', - 'is_array', - 'is_bool', - 'is_callable', - 'is_double', - 'is_float', - 'is_int', - 'is_integer', - 'is_long', - 'is_null', - 'is_numeric', - 'is_object', - 'is_real', - 'is_resource', - 'is_scalar', - 'is_string', - 'isset', - 'print_r', - 'serialize', - 'settype', - 'strval', - 'unserialize', - 'unset', - 'var_dump', - 'var_export'], - 'Verisign Payflow Pro': ['pfpro_cleanup', - 'pfpro_init', - 'pfpro_process', - 'pfpro_process_raw', - 'pfpro_version'], + 'URL': ['base64_decode', + 'base64_encode', + 'get_headers', + 'get_meta_tags', + 'http_build_query', + 'parse_url', + 'rawurldecode', + 'rawurlencode', + 'urldecode', + 'urlencode'], + 'Variable handling': ['debug_zval_dump', + 'doubleval', + 'empty', + 'floatval', + 'get_defined_vars', + 'get_resource_type', + 'gettype', + 'import_request_variables', + 'intval', + 'is_array', + 'is_bool', + 'is_callable', + 'is_double', + 'is_float', + 'is_int', + 'is_integer', + 'is_long', + 'is_null', + 'is_numeric', + 'is_object', + 'is_real', + 'is_resource', + 'is_scalar', + 'is_string', + 'isset', + 'print_r', + 'serialize', + 'settype', + 'strval', + 'unserialize', + 'unset', + 'var_dump', + 'var_export'], 'W32api': ['w32api_deftype', 'w32api_init_dtype', 'w32api_invoke_function', @@ -2619,35 +3333,35 @@ MODULES = {'.NET': ['dotnet_load'], 'wddx_packet_end', 'wddx_packet_start', 'wddx_serialize_value', - 'wddx_serialize_vars'], - 'XML': ['utf8_decode', - 'utf8_encode', - 'xml_error_string', - 'xml_get_current_byte_index', - 'xml_get_current_column_number', - 'xml_get_current_line_number', - 'xml_get_error_code', - 'xml_parse', - 'xml_parse_into_struct', - 'xml_parser_create', - 'xml_parser_create_ns', - 'xml_parser_free', - 'xml_parser_get_option', - 'xml_parser_set_option', - 'xml_set_character_data_handler', - 'xml_set_default_handler', - 'xml_set_element_handler', - 'xml_set_end_namespace_decl_handler', - 'xml_set_external_entity_ref_handler', - 'xml_set_notation_decl_handler', - 'xml_set_object', - 'xml_set_processing_instruction_handler', - 'xml_set_start_namespace_decl_handler', - 'xml_set_unparsed_entity_decl_handler'], - 'XML-RPC': ['xmlrpc_decode', - 'xmlrpc_decode_request', - 'xmlrpc_encode', + 'wddx_serialize_vars', + 'wddx_unserialize'], + 'WinCache': ['wincache_fcache_fileinfo', + 'wincache_fcache_meminfo', + 'wincache_lock', + 'wincache_ocache_fileinfo', + 'wincache_ocache_meminfo', + 'wincache_refresh_if_changed', + 'wincache_rplist_fileinfo', + 'wincache_rplist_meminfo', + 'wincache_scache_info', + 'wincache_scache_meminfo', + 'wincache_ucache_add', + 'wincache_ucache_cas', + 'wincache_ucache_clear', + 'wincache_ucache_dec', + 'wincache_ucache_delete', + 'wincache_ucache_exists', + 'wincache_ucache_get', + 'wincache_ucache_inc', + 'wincache_ucache_info', + 'wincache_ucache_meminfo', + 'wincache_ucache_set', + 'wincache_unlock'], + 'XML Parser': ['utf8_decode'], + 'XML-RPC': ['xmlrpc_decode_request', + 'xmlrpc_decode', 'xmlrpc_encode_request', + 'xmlrpc_encode', 'xmlrpc_get_type', 'xmlrpc_is_fault', 'xmlrpc_parse_method_descriptions', @@ -2658,34 +3372,25 @@ MODULES = {'.NET': ['dotnet_load'], 'xmlrpc_server_register_introspection_callback', 'xmlrpc_server_register_method', 'xmlrpc_set_type'], - 'XSL': ['xsl_xsltprocessor_get_parameter', - 'xsl_xsltprocessor_has_exslt_support', - 'xsl_xsltprocessor_import_stylesheet', - 'xsl_xsltprocessor_register_php_functions', - 'xsl_xsltprocessor_remove_parameter', - 'xsl_xsltprocessor_set_parameter', - 'xsl_xsltprocessor_transform_to_doc', - 'xsl_xsltprocessor_transform_to_uri', - 'xsl_xsltprocessor_transform_to_xml'], - 'XSLT': ['xslt_backend_info', - 'xslt_backend_name', - 'xslt_backend_version', - 'xslt_create', - 'xslt_errno', - 'xslt_error', - 'xslt_free', - 'xslt_getopt', - 'xslt_process', - 'xslt_set_base', - 'xslt_set_encoding', - 'xslt_set_error_handler', - 'xslt_set_log', - 'xslt_set_object', - 'xslt_set_sax_handler', - 'xslt_set_sax_handlers', - 'xslt_set_scheme_handler', - 'xslt_set_scheme_handlers', - 'xslt_setopt'], + 'XSLT (PHP4)': ['xslt_backend_info', + 'xslt_backend_name', + 'xslt_backend_version', + 'xslt_create', + 'xslt_errno', + 'xslt_error', + 'xslt_free', + 'xslt_getopt', + 'xslt_process', + 'xslt_set_base', + 'xslt_set_encoding', + 'xslt_set_error_handler', + 'xslt_set_log', + 'xslt_set_object', + 'xslt_set_sax_handler', + 'xslt_set_sax_handlers', + 'xslt_set_scheme_handler', + 'xslt_set_scheme_handlers', + 'xslt_setopt'], 'YAZ': ['yaz_addinfo', 'yaz_ccl_conf', 'yaz_ccl_parse', @@ -2696,14 +3401,15 @@ MODULES = {'.NET': ['dotnet_load'], 'yaz_errno', 'yaz_error', 'yaz_es_result', + 'yaz_es', 'yaz_get_option', 'yaz_hits', 'yaz_itemorder', 'yaz_present', 'yaz_range', 'yaz_record', - 'yaz_scan', 'yaz_scan_result', + 'yaz_scan', 'yaz_schema', 'yaz_search', 'yaz_set_option', @@ -2720,6 +3426,11 @@ MODULES = {'.NET': ['dotnet_load'], 'yp_match', 'yp_next', 'yp_order'], + 'Yaml': ['yaml_emit_file', + 'yaml_emit', + 'yaml_parse_file', + 'yaml_parse_url', + 'yaml_parse'], 'Zip': ['zip_close', 'zip_entry_close', 'zip_entry_compressedsize', @@ -2732,6 +3443,7 @@ MODULES = {'.NET': ['dotnet_load'], 'zip_read'], 'Zlib': ['gzclose', 'gzcompress', + 'gzdecode', 'gzdeflate', 'gzencode', 'gzeof', @@ -2751,111 +3463,86 @@ MODULES = {'.NET': ['dotnet_load'], 'gzwrite', 'readgzfile', 'zlib_get_coding_type'], - 'bcompiler': ['bcompiler_load', - 'bcompiler_load_exe', + 'bcompiler': ['bcompiler_load_exe', + 'bcompiler_load', 'bcompiler_parse_class', 'bcompiler_read', 'bcompiler_write_class', 'bcompiler_write_constant', 'bcompiler_write_exe_footer', + 'bcompiler_write_file', 'bcompiler_write_footer', 'bcompiler_write_function', 'bcompiler_write_functions_from_file', - 'bcompiler_write_header'], - 'ctype': ['ctype_alnum', - 'ctype_alpha', - 'ctype_cntrl', - 'ctype_digit', - 'ctype_graph', - 'ctype_lower', - 'ctype_print', - 'ctype_punct', - 'ctype_space', - 'ctype_upper', - 'ctype_xdigit'], + 'bcompiler_write_header', + 'bcompiler_write_included_filename'], + 'cURL': ['curl_close', + 'curl_copy_handle', + 'curl_errno', + 'curl_error', + 'curl_exec', + 'curl_getinfo', + 'curl_init', + 'curl_multi_add_handle', + 'curl_multi_close', + 'curl_multi_exec', + 'curl_multi_getcontent', + 'curl_multi_info_read', + 'curl_multi_init', + 'curl_multi_remove_handle', + 'curl_multi_select', + 'curl_setopt_array', + 'curl_setopt', + 'curl_version'], + 'chdb': ['chdb_create'], 'dBase': ['dbase_add_record', 'dbase_close', 'dbase_create', 'dbase_delete_record', 'dbase_get_header_info', - 'dbase_get_record', 'dbase_get_record_with_names', + 'dbase_get_record', 'dbase_numfields', 'dbase_numrecords', 'dbase_open', 'dbase_pack', 'dbase_replace_record'], - 'dba': ['dba_close', - 'dba_delete', - 'dba_exists', - 'dba_fetch', - 'dba_firstkey', - 'dba_handlers', - 'dba_insert', - 'dba_key_split', - 'dba_list', - 'dba_nextkey', - 'dba_open', - 'dba_optimize', - 'dba_popen', - 'dba_replace', - 'dba_sync'], 'dbx': ['dbx_close', 'dbx_compare', 'dbx_connect', 'dbx_error', 'dbx_escape_string', - 'dbx_fetch_row', - 'dbx_query', - 'dbx_sort'], - 'fam': ['fam_cancel_monitor', - 'fam_close', - 'fam_monitor_collection', - 'fam_monitor_directory', - 'fam_monitor_file', - 'fam_next_event', - 'fam_open', - 'fam_pending', - 'fam_resume_monitor', - 'fam_suspend_monitor'], - 'filePro': ['filepro', - 'filepro_fieldcount', + 'dbx_fetch_row'], + 'filePro': ['filepro_fieldcount', 'filepro_fieldname', 'filepro_fieldtype', 'filepro_fieldwidth', 'filepro_retrieve', - 'filepro_rowcount'], - 'gettext': ['bind_textdomain_codeset', - 'bindtextdomain', - 'dcgettext', - 'dcngettext', - 'dgettext', - 'dngettext', - 'gettext', - 'ngettext', - 'textdomain'], - 'iconv': ['iconv', - 'iconv_get_encoding', - 'iconv_mime_decode', + 'filepro_rowcount', + 'filepro'], + 'iconv': ['iconv_get_encoding', 'iconv_mime_decode_headers', + 'iconv_mime_decode', 'iconv_mime_encode', 'iconv_set_encoding', 'iconv_strlen', 'iconv_strpos', 'iconv_strrpos', 'iconv_substr', + 'iconv', 'ob_iconv_handler'], - 'id3': ['id3_get_frame_long_name', - 'id3_get_frame_short_name', - 'id3_get_genre_id', - 'id3_get_genre_list', - 'id3_get_genre_name', - 'id3_get_tag', - 'id3_get_version', - 'id3_remove_tag', - 'id3_set_tag'], - 'mSQL': ['msql', - 'msql_affected_rows', + 'inclued': ['inclued_get_data'], + 'intl': ['intl_error_name', + 'intl_get_error_code', + 'intl_get_error_message', + 'intl_is_failure'], + 'libxml': ['libxml_clear_errors', + 'libxml_disable_entity_loader', + 'libxml_get_errors', + 'libxml_get_last_error', + 'libxml_set_streams_context', + 'libxml_use_internal_errors'], + 'mSQL': ['msql_affected_rows', 'msql_close', 'msql_connect', 'msql_create_db', @@ -2893,65 +3580,11 @@ MODULES = {'.NET': ['dotnet_load'], 'msql_regcase', 'msql_result', 'msql_select_db', - 'msql_tablename'], - 'mailparse': ['mailparse_determine_best_xfer_encoding', - 'mailparse_msg_create', - 'mailparse_msg_extract_part', - 'mailparse_msg_extract_part_file', - 'mailparse_msg_free', - 'mailparse_msg_get_part', - 'mailparse_msg_get_part_data', - 'mailparse_msg_get_structure', - 'mailparse_msg_parse', - 'mailparse_msg_parse_file', - 'mailparse_rfc822_parse_addresses', - 'mailparse_stream_encode', - 'mailparse_uudecode_all'], - 'mcrypt': ['mcrypt_cbc', - 'mcrypt_cfb', - 'mcrypt_create_iv', - 'mcrypt_decrypt', - 'mcrypt_ecb', - 'mcrypt_enc_get_algorithms_name', - 'mcrypt_enc_get_block_size', - 'mcrypt_enc_get_iv_size', - 'mcrypt_enc_get_key_size', - 'mcrypt_enc_get_modes_name', - 'mcrypt_enc_get_supported_key_sizes', - 'mcrypt_enc_is_block_algorithm', - 'mcrypt_enc_is_block_algorithm_mode', - 'mcrypt_enc_is_block_mode', - 'mcrypt_enc_self_test', - 'mcrypt_encrypt', - 'mcrypt_generic', - 'mcrypt_generic_deinit', - 'mcrypt_generic_end', - 'mcrypt_generic_init', - 'mcrypt_get_block_size', - 'mcrypt_get_cipher_name', - 'mcrypt_get_iv_size', - 'mcrypt_get_key_size', - 'mcrypt_list_algorithms', - 'mcrypt_list_modes', - 'mcrypt_module_close', - 'mcrypt_module_get_algo_block_size', - 'mcrypt_module_get_algo_key_size', - 'mcrypt_module_get_supported_key_sizes', - 'mcrypt_module_is_block_algorithm', - 'mcrypt_module_is_block_algorithm_mode', - 'mcrypt_module_is_block_mode', - 'mcrypt_module_open', - 'mcrypt_module_self_test', - 'mcrypt_ofb', - 'mdecrypt_generic'], - 'mhash': ['mhash', - 'mhash_count', - 'mhash_get_block_size', - 'mhash_get_hash_name', - 'mhash_keygen_s2k'], + 'msql_tablename', + 'msql'], 'mnoGoSearch': ['udm_add_search_limit', - 'udm_alloc_agent', 'udm_alloc_agent_array', + 'udm_alloc_agent', 'udm_api_version', 'udm_cat_list', 'udm_cat_path', @@ -2973,417 +3606,182 @@ MODULES = {'.NET': ['dotnet_load'], 'udm_load_ispell_data', 'udm_open_stored', 'udm_set_agent_param'], - 'muscat': ['muscat_close', - 'muscat_get', - 'muscat_give', - 'muscat_setup', - 'muscat_setup_net'], - 'mysqli': ['mysqli_affected_rows', - 'mysqli_autocommit', - 'mysqli_bind_param', - 'mysqli_bind_result', - 'mysqli_change_user', - 'mysqli_character_set_name', - 'mysqli_client_encoding', - 'mysqli_close', - 'mysqli_commit', - 'mysqli_connect', - 'mysqli_connect_errno', - 'mysqli_connect_error', - 'mysqli_data_seek', - 'mysqli_debug', - 'mysqli_disable_reads_from_master', - 'mysqli_disable_rpl_parse', - 'mysqli_dump_debug_info', - 'mysqli_embedded_connect', - 'mysqli_enable_reads_from_master', - 'mysqli_enable_rpl_parse', - 'mysqli_errno', - 'mysqli_error', - 'mysqli_escape_string', - 'mysqli_execute', - 'mysqli_fetch', - 'mysqli_fetch_array', - 'mysqli_fetch_assoc', - 'mysqli_fetch_field', - 'mysqli_fetch_field_direct', - 'mysqli_fetch_fields', - 'mysqli_fetch_lengths', - 'mysqli_fetch_object', - 'mysqli_fetch_row', - 'mysqli_field_count', - 'mysqli_field_seek', - 'mysqli_field_tell', - 'mysqli_free_result', - 'mysqli_get_client_info', - 'mysqli_get_client_version', - 'mysqli_get_host_info', - 'mysqli_get_metadata', - 'mysqli_get_proto_info', - 'mysqli_get_server_info', - 'mysqli_get_server_version', - 'mysqli_info', - 'mysqli_init', - 'mysqli_insert_id', - 'mysqli_kill', - 'mysqli_master_query', - 'mysqli_more_results', - 'mysqli_multi_query', - 'mysqli_next_result', - 'mysqli_num_fields', - 'mysqli_num_rows', - 'mysqli_options', - 'mysqli_param_count', - 'mysqli_ping', - 'mysqli_prepare', - 'mysqli_query', - 'mysqli_real_connect', - 'mysqli_real_escape_string', - 'mysqli_real_query', - 'mysqli_report', - 'mysqli_rollback', - 'mysqli_rpl_parse_enabled', - 'mysqli_rpl_probe', - 'mysqli_rpl_query_type', - 'mysqli_select_db', - 'mysqli_send_long_data', - 'mysqli_send_query', - 'mysqli_server_end', - 'mysqli_server_init', - 'mysqli_set_opt', - 'mysqli_sqlstate', - 'mysqli_ssl_set', - 'mysqli_stat', - 'mysqli_stmt_affected_rows', - 'mysqli_stmt_bind_param', - 'mysqli_stmt_bind_result', - 'mysqli_stmt_close', - 'mysqli_stmt_data_seek', - 'mysqli_stmt_errno', - 'mysqli_stmt_error', - 'mysqli_stmt_execute', - 'mysqli_stmt_fetch', - 'mysqli_stmt_free_result', - 'mysqli_stmt_init', - 'mysqli_stmt_num_rows', - 'mysqli_stmt_param_count', - 'mysqli_stmt_prepare', - 'mysqli_stmt_reset', - 'mysqli_stmt_result_metadata', - 'mysqli_stmt_send_long_data', - 'mysqli_stmt_sqlstate', - 'mysqli_stmt_store_result', - 'mysqli_store_result', - 'mysqli_thread_id', - 'mysqli_thread_safe', - 'mysqli_use_result', - 'mysqli_warning_count'], - 'openal': ['openal_buffer_create', - 'openal_buffer_data', - 'openal_buffer_destroy', - 'openal_buffer_get', - 'openal_buffer_loadwav', - 'openal_context_create', - 'openal_context_current', - 'openal_context_destroy', - 'openal_context_process', - 'openal_context_suspend', - 'openal_device_close', - 'openal_device_open', - 'openal_listener_get', - 'openal_listener_set', - 'openal_source_create', - 'openal_source_destroy', - 'openal_source_get', - 'openal_source_pause', - 'openal_source_play', - 'openal_source_rewind', - 'openal_source_set', - 'openal_source_stop', - 'openal_stream'], + 'mqseries': ['mqseries_back', + 'mqseries_begin', + 'mqseries_close', + 'mqseries_cmit', + 'mqseries_conn', + 'mqseries_connx', + 'mqseries_disc', + 'mqseries_get', + 'mqseries_inq', + 'mqseries_open', + 'mqseries_put1', + 'mqseries_put', + 'mqseries_set', + 'mqseries_strerror'], + 'mysqlnd_qc': ['mysqlnd_qc_change_handler', + 'mysqlnd_qc_clear_cache', + 'mysqlnd_qc_get_cache_info', + 'mysqlnd_qc_get_core_stats', + 'mysqlnd_qc_get_handler', + 'mysqlnd_qc_get_query_trace_log', + 'mysqlnd_qc_set_user_handlers'], 'qtdom': ['qdom_error', 'qdom_tree'], - 'shmop': ['shmop_close', - 'shmop_delete', - 'shmop_open', - 'shmop_read', - 'shmop_size', - 'shmop_write'], - 'spl': ['class_implements', - 'class_parents', - 'iterator-to-array', - 'iterator_count', - 'spl_classes'], - 'ssh2': ['ssh2_auth_none', - 'ssh2_auth_password', - 'ssh2_auth_pubkey_file', - 'ssh2_connect', - 'ssh2_exec', - 'ssh2_fetch_stream', - 'ssh2_fingerprint', - 'ssh2_methods_negotiated', - 'ssh2_scp_recv', - 'ssh2_scp_send', - 'ssh2_sftp', - 'ssh2_sftp_lstat', - 'ssh2_sftp_mkdir', - 'ssh2_sftp_readlink', - 'ssh2_sftp_realpath', - 'ssh2_sftp_rename', - 'ssh2_sftp_rmdir', - 'ssh2_sftp_stat', - 'ssh2_sftp_symlink', - 'ssh2_sftp_unlink', - 'ssh2_shell', - 'ssh2_tunnel'], - 'tidy': ['ob_tidyhandler', - 'tidy_access_count', - 'tidy_clean_repair', - 'tidy_config_count', - 'tidy_diagnose', - 'tidy_error_count', - 'tidy_get_body', - 'tidy_get_config', - 'tidy_get_error_buffer', - 'tidy_get_head', - 'tidy_get_html', - 'tidy_get_html_ver', - 'tidy_get_output', - 'tidy_get_release', - 'tidy_get_root', - 'tidy_get_status', - 'tidy_getopt', - 'tidy_is_xhtml', - 'tidy_is_xml', - 'tidy_load_config', - 'tidy_parse_file', - 'tidy_parse_string', - 'tidy_repair_file', - 'tidy_repair_string', - 'tidy_reset_config', - 'tidy_save_config', - 'tidy_set_encoding', - 'tidy_setopt', - 'tidy_warning_count'], - 'unknown': ['bcompile_write_file', - 'com', - 'dir', - 'dotnet', - 'hw_api_attribute', - 'hw_api_content', - 'hw_api_object', - 'imagepscopyfont', - 'mcve_adduser', - 'mcve_adduserarg', - 'mcve_bt', - 'mcve_checkstatus', - 'mcve_chkpwd', - 'mcve_chngpwd', - 'mcve_completeauthorizations', - 'mcve_connect', - 'mcve_connectionerror', - 'mcve_deleteresponse', - 'mcve_deletetrans', - 'mcve_deleteusersetup', - 'mcve_deluser', - 'mcve_destroyconn', - 'mcve_destroyengine', - 'mcve_disableuser', - 'mcve_edituser', - 'mcve_enableuser', - 'mcve_force', - 'mcve_getcell', - 'mcve_getcellbynum', - 'mcve_getcommadelimited', - 'mcve_getheader', - 'mcve_getuserarg', - 'mcve_getuserparam', - 'mcve_gft', - 'mcve_gl', - 'mcve_gut', - 'mcve_initconn', - 'mcve_initengine', - 'mcve_initusersetup', - 'mcve_iscommadelimited', - 'mcve_liststats', - 'mcve_listusers', - 'mcve_maxconntimeout', - 'mcve_monitor', - 'mcve_numcolumns', - 'mcve_numrows', - 'mcve_override', - 'mcve_parsecommadelimited', - 'mcve_ping', - 'mcve_preauth', - 'mcve_preauthcompletion', - 'mcve_qc', - 'mcve_responseparam', - 'mcve_return', - 'mcve_returncode', - 'mcve_returnstatus', - 'mcve_sale', - 'mcve_setblocking', - 'mcve_setdropfile', - 'mcve_setip', - 'mcve_setssl', - 'mcve_setssl_files', - 'mcve_settimeout', - 'mcve_settle', - 'mcve_text_avs', - 'mcve_text_code', - 'mcve_text_cv', - 'mcve_transactionauth', - 'mcve_transactionavs', - 'mcve_transactionbatch', - 'mcve_transactioncv', - 'mcve_transactionid', - 'mcve_transactionitem', - 'mcve_transactionssent', - 'mcve_transactiontext', - 'mcve_transinqueue', - 'mcve_transnew', - 'mcve_transparam', - 'mcve_transsend', - 'mcve_ub', - 'mcve_uwait', - 'mcve_verifyconnection', - 'mcve_verifysslcert', - 'mcve_void', - 'mysqli()', - 'pdf_open', - 'pdf_open_png', - 'pdf_set_font', - 'php_register_url_stream_wrapper', - 'php_stream_can_cast', - 'php_stream_cast', - 'php_stream_close', - 'php_stream_closedir', - 'php_stream_copy_to_mem', - 'php_stream_copy_to_stream', - 'php_stream_eof', - 'php_stream_filter_register_factory', - 'php_stream_filter_unregister_factory', - 'php_stream_flush', - 'php_stream_fopen_from_file', - 'php_stream_fopen_temporary_file', - 'php_stream_fopen_tmpfile', - 'php_stream_getc', - 'php_stream_gets', - 'php_stream_is', - 'php_stream_is_persistent', - 'php_stream_make_seekable', - 'php_stream_open_wrapper', - 'php_stream_open_wrapper_as_file', - 'php_stream_open_wrapper_ex', - 'php_stream_opendir', - 'php_stream_passthru', - 'php_stream_read', - 'php_stream_readdir', - 'php_stream_rewinddir', - 'php_stream_seek', - 'php_stream_sock_open_from_socket', - 'php_stream_sock_open_host', - 'php_stream_sock_open_unix', - 'php_stream_stat', - 'php_stream_stat_path', - 'php_stream_tell', - 'php_stream_write', - 'php_unregister_url_stream_wrapper', - 'swfbutton_keypress', - 'swfdisplayitem', - 'variant'], - 'vpopmail': ['vpopmail_add_alias_domain', - 'vpopmail_add_alias_domain_ex', - 'vpopmail_add_domain', + 'runkit': ['runkit_class_adopt', + 'runkit_class_emancipate', + 'runkit_constant_add', + 'runkit_constant_redefine', + 'runkit_constant_remove', + 'runkit_function_add', + 'runkit_function_copy', + 'runkit_function_redefine', + 'runkit_function_remove', + 'runkit_function_rename', + 'runkit_import', + 'runkit_lint_file', + 'runkit_lint', + 'runkit_method_add', + 'runkit_method_copy', + 'runkit_method_redefine', + 'runkit_method_remove', + 'runkit_method_rename', + 'runkit_return_value_used', + 'runkit_sandbox_output_handler', + 'runkit_superglobals'], + 'ssdeep': ['ssdeep_fuzzy_compare', + 'ssdeep_fuzzy_hash_filename', + 'ssdeep_fuzzy_hash'], + 'vpopmail': ['vpopmail_add_alias_domain_ex', + 'vpopmail_add_alias_domain', 'vpopmail_add_domain_ex', + 'vpopmail_add_domain', 'vpopmail_add_user', 'vpopmail_alias_add', - 'vpopmail_alias_del', 'vpopmail_alias_del_domain', - 'vpopmail_alias_get', + 'vpopmail_alias_del', 'vpopmail_alias_get_all', + 'vpopmail_alias_get', 'vpopmail_auth_user', - 'vpopmail_del_domain', 'vpopmail_del_domain_ex', + 'vpopmail_del_domain', 'vpopmail_del_user', 'vpopmail_error', 'vpopmail_passwd', 'vpopmail_set_user_quota'], + 'win32ps': ['win32_ps_list_procs', 'win32_ps_stat_mem', 'win32_ps_stat_proc'], + 'win32service': ['win32_continue_service', + 'win32_create_service', + 'win32_delete_service', + 'win32_get_last_control_message', + 'win32_pause_service', + 'win32_query_service_status', + 'win32_set_service_status', + 'win32_start_service_ctrl_dispatcher', + 'win32_start_service', + 'win32_stop_service'], 'xattr': ['xattr_get', 'xattr_list', 'xattr_remove', 'xattr_set', 'xattr_supported'], - 'xdiff': ['xdiff_file_diff', + 'xdiff': ['xdiff_file_bdiff_size', + 'xdiff_file_bdiff', + 'xdiff_file_bpatch', 'xdiff_file_diff_binary', + 'xdiff_file_diff', 'xdiff_file_merge3', - 'xdiff_file_patch', 'xdiff_file_patch_binary', - 'xdiff_string_diff', + 'xdiff_file_patch', + 'xdiff_file_rabdiff', + 'xdiff_string_bdiff_size', + 'xdiff_string_bdiff', + 'xdiff_string_bpatch', 'xdiff_string_diff_binary', + 'xdiff_string_diff', 'xdiff_string_merge3', + 'xdiff_string_patch_binary', 'xdiff_string_patch', - 'xdiff_string_patch_binary']} - + 'xdiff_string_rabdiff']} if __name__ == '__main__': + import glob + import os import pprint import re + import shutil + import tarfile import urllib - _function_re = re.compile('<B\s+CLASS="function"\s*>(.*?)\(\)</B\s*>(?uism)') + + PHP_MANUAL_URL = 'http://us3.php.net/distributions/manual/php_manual_en.tar.gz' + PHP_MANUAL_DIR = './php-chunked-xhtml/' + PHP_REFERENCE_GLOB = 'ref.*' + PHP_FUNCTION_RE = '<a href="function\..*?\.html">(.*?)</a>' + PHP_MODULE_RE = '<title>(.*?) Functions</title>' def get_php_functions(): - uf = urllib.urlopen('http://de.php.net/manual/en/index.functions.php') - data = uf.read() - uf.close() - results = set() - for match in _function_re.finditer(data): - fn = match.group(1) - if '->' not in fn and '::' not in fn: - results.add(fn) - # PY24: use sorted() - results = list(results) - results.sort() - return results + function_re = re.compile(PHP_FUNCTION_RE) + module_re = re.compile(PHP_MODULE_RE) + modules = {} + + for file in get_php_references(): + module = '' + for line in open(file): + if not module: + search = module_re.search(line) + if search: + module = search.group(1) + modules[module] = [] - def get_function_module(func_name): - fn = func_name.replace('_', '-') - uf = urllib.urlopen('http://de.php.net/manual/en/function.%s.php' % fn) - regex = re.compile('<li class="header up">' - '<a href="ref\..*?\.php">([a-zA-Z0-9\s]+)</a></li>') - for line in uf: - match = regex.search(line) - if match: - return match.group(1) + elif '<h2>Table of Contents</h2>' in line: + for match in function_re.finditer(line): + fn = match.group(1) + if '->' not in fn and '::' not in fn: + modules[module].append(fn) - print '>> Downloading Function Index' - functions = get_php_functions() - total = len(functions) - print '%d functions found' % total - modules = {} - idx = 1 - for function_name in get_php_functions(): - print '>> %r (%d/%d)' % (function_name, idx, total) - m = get_function_module(function_name) - if m is None: - print 'NOT_FOUND' - m = 'unknown' - else: - print repr(m) - modules.setdefault(m, []).append(function_name) - idx += 1 + # These are dummy manual pages, not actual functions + if module == 'PHP Options/Info': + modules[module].remove('main') + elif module == 'Filesystem': + modules[module].remove('delete') - # extract useful sourcecode from this file - f = open(__file__) - try: - content = f.read() - finally: + if not modules[module]: + del modules[module] + + break + return modules + + def get_php_references(): + download = urllib.urlretrieve(PHP_MANUAL_URL) + tar = tarfile.open(download[0]) + tar.extractall() + tar.close() + for file in glob.glob("%s%s" % (PHP_MANUAL_DIR, PHP_REFERENCE_GLOB)): + yield file + os.remove(download[0]) + + def regenerate(filename, modules): + f = open(filename) + try: + content = f.read() + finally: + f.close() + + header = content[:content.find('MODULES = {')] + footer = content[content.find("if __name__ == '__main__':"):] + + f = open(filename, 'w') + f.write(header) + f.write('MODULES = %s\n\n' % pprint.pformat(modules)) + f.write(footer) f.close() - header = content[:content.find('MODULES = {')] - footer = content[content.find("if __name__ == '__main__':"):] - # write new file - f = open(__file__, 'w') - f.write(header) - f.write('MODULES = %s\n\n' % pprint.pformat(modules)) - f.write(footer) - f.close() + def run(): + print '>> Downloading Function Index' + modules = get_php_functions() + total = sum(len(v) for v in modules.itervalues()) + print '%d functions found' % total + regenerate(__file__, modules) + shutil.rmtree(PHP_MANUAL_DIR) + + run()
\ No newline at end of file diff --git a/pygments/lexers/_postgres_builtins.py b/pygments/lexers/_postgres_builtins.py index 076a4cf3..0100bc2d 100644 --- a/pygments/lexers/_postgres_builtins.py +++ b/pygments/lexers/_postgres_builtins.py @@ -9,7 +9,7 @@ """ import re -import urllib2 +import urllib # One man's constant is another man's variable. SOURCE_URL = 'https://github.com/postgres/postgres/raw/master' @@ -96,7 +96,7 @@ def parse_pseudos(f): return dt def fetch(url): - return urllib2.urlopen(url) + return urllib.urlopen(url) def update_consts(filename, constname, content): f = open(filename) diff --git a/pygments/lexers/agile.py b/pygments/lexers/agile.py index 7f3c2340..12b914c2 100644 --- a/pygments/lexers/agile.py +++ b/pygments/lexers/agile.py @@ -5,14 +5,14 @@ Lexers for agile languages. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import Lexer, RegexLexer, ExtendedRegexLexer, \ - LexerContext, include, combined, do_insertions, bygroups, using + LexerContext, include, combined, do_insertions, bygroups, using, this from pygments.token import Error, Text, Other, \ Comment, Operator, Keyword, Name, String, Number, Generic, Punctuation from pygments.util import get_bool_opt, get_list_opt, shebang_matches @@ -22,7 +22,8 @@ from pygments import unistring as uni __all__ = ['PythonLexer', 'PythonConsoleLexer', 'PythonTracebackLexer', 'RubyLexer', 'RubyConsoleLexer', 'PerlLexer', 'LuaLexer', 'MiniDLexer', 'IoLexer', 'TclLexer', 'ClojureLexer', - 'Python3Lexer', 'Python3TracebackLexer', 'FactorLexer', 'IokeLexer'] + 'Python3Lexer', 'Python3TracebackLexer', 'FactorLexer', + 'IokeLexer', 'FancyLexer', 'GroovyLexer'] # b/w compatibility from pygments.lexers.functional import SchemeLexer @@ -55,8 +56,10 @@ class PythonLexer(RegexLexer): include('keywords'), (r'(def)((?:\s|\\\s)+)', bygroups(Keyword, Text), 'funcname'), (r'(class)((?:\s|\\\s)+)', bygroups(Keyword, Text), 'classname'), - (r'(from)((?:\s|\\\s)+)', bygroups(Keyword.Namespace, Text), 'fromimport'), - (r'(import)((?:\s|\\\s)+)', bygroups(Keyword.Namespace, Text), 'import'), + (r'(from)((?:\s|\\\s)+)', bygroups(Keyword.Namespace, Text), + 'fromimport'), + (r'(import)((?:\s|\\\s)+)', bygroups(Keyword.Namespace, Text), + 'import'), include('builtins'), include('backtick'), ('(?:[rR]|[uU][rR]|[rR][uU])"""', String, 'tdqs'), @@ -123,14 +126,15 @@ class PythonLexer(RegexLexer): ('[a-zA-Z_][a-zA-Z0-9_]*', Name.Class, '#pop') ], 'import': [ - (r'((?:\s|\\\s)+)(as)((?:\s|\\\s)+)', - bygroups(Text, Keyword.Namespace, Text)), + (r'(?:[ \t]|\\\n)+', Text), + (r'as\b', Keyword.Namespace), + (r',', Operator), (r'[a-zA-Z_][a-zA-Z0-9_.]*', Name.Namespace), - (r'(\s*)(,)(\s*)', bygroups(Text, Operator, Text)), (r'', Text, '#pop') # all else: go back ], 'fromimport': [ - (r'((?:\s|\\\s)+)(import)\b', bygroups(Text, Keyword.Namespace), '#pop'), + (r'(?:[ \t]|\\\n)+', Text), + (r'import\b', Keyword.Namespace, '#pop'), (r'[a-zA-Z_.][a-zA-Z0-9_.]*', Name.Namespace), ], 'stringescape': [ @@ -173,7 +177,7 @@ class PythonLexer(RegexLexer): } def analyse_text(text): - return shebang_matches(text, r'pythonw?(2\.\d)?') + return shebang_matches(text, r'pythonw?(2(\.\d)?)?') class Python3Lexer(RegexLexer): @@ -483,11 +487,11 @@ class RubyLexer(ExtendedRegexLexer): def gen_rubystrings_rules(): def intp_regex_callback(self, match, ctx): - yield match.start(1), String.Regex, match.group(1) # begin + yield match.start(1), String.Regex, match.group(1) # begin nctx = LexerContext(match.group(3), 0, ['interpolated-regex']) for i, t, v in self.get_tokens_unprocessed(context=nctx): yield match.start(3)+i, t, v - yield match.start(4), String.Regex, match.group(4) # end[mixounse]* + yield match.start(4), String.Regex, match.group(4) # end[mixounse]* ctx.pos = match.end() def intp_string_callback(self, match, ctx): @@ -495,13 +499,13 @@ class RubyLexer(ExtendedRegexLexer): nctx = LexerContext(match.group(3), 0, ['interpolated-string']) for i, t, v in self.get_tokens_unprocessed(context=nctx): yield match.start(3)+i, t, v - yield match.start(4), String.Other, match.group(4) # end + yield match.start(4), String.Other, match.group(4) # end ctx.pos = match.end() states = {} states['strings'] = [ # easy ones - (r'\:([a-zA-Z_][\w_]*[\!\?]?|\*\*?|[-+]@?|' + (r'\:@{0,2}([a-zA-Z_][\w_]*[\!\?]?|\*\*?|[-+]@?|' r'[/%&|^`~]|\[\]=?|<<|>>|<=?>|>=?|===?)', String.Symbol), (r":'(\\\\|\\'|[^'])*'", String.Symbol), (r"'(\\\\|\\'|[^'])*'", String.Single), @@ -657,10 +661,11 @@ class RubyLexer(ExtendedRegexLexer): r'(?<=^if\s)|' r'(?<=^elsif\s)' r')(\s*)(/)', bygroups(Text, String.Regex), 'multiline-regex'), - # multiline regex (in method calls) - (r'(?<=\(|,)/', String.Regex, 'multiline-regex'), + # multiline regex (in method calls or subscripts) + (r'(?<=\(|,|\[)/', String.Regex, 'multiline-regex'), # multiline regex (this time the funny no whitespace rule) - (r'(\s+)(/[^\s=])', String.Regex, 'multiline-regex'), + (r'(\s+)(/)(?![\s=])', bygroups(Text, String.Regex), + 'multiline-regex'), # lex numbers and ignore following regular expressions which # are division operators in fact (grrrr. i hate that. any # better ideas?) @@ -1043,7 +1048,6 @@ class LuaLexer(RegexLexer): (r'(true|false|nil)\b', Keyword.Constant), (r'(function)(\s+)', bygroups(Keyword, Text), 'funcname'), - (r'(class)(\s+)', bygroups(Keyword, Text), 'classname'), (r'[A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)?', Name), @@ -1058,10 +1062,6 @@ class LuaLexer(RegexLexer): ('\(', Punctuation, '#pop'), ], - 'classname': [ - ('[A-Za-z_][A-Za-z0-9_]*', Name.Class, '#pop') - ], - # if I understand correctly, every character is valid in a lua string, # so this state is only for later corrections 'string': [ @@ -1154,7 +1154,7 @@ class MiniDLexer(RegexLexer): ), # StringLiteral # -- WysiwygString - (r'@"(""|.)*"', String), + (r'@"(""|[^"])*"', String), # -- AlternateWysiwygString (r'`(``|.)*`', String), # -- DoubleQuotedString @@ -1957,3 +1957,150 @@ class IokeLexer(RegexLexer): (r'[a-z_][a-zA-Z0-9_!:?]*', Name) ] } + + +class FancyLexer(RegexLexer): + """ + Pygments Lexer For `Fancy <http://www.fancy-lang.org/>`_. + + Fancy is a self-hosted, pure object-oriented, dynamic, + class-based, concurrent general-purpose programming language + running on Rubinius, the Ruby VM. + + *New in Pygments 1.5.* + """ + name = 'Fancy' + filenames = ['*.fy', '*.fancypack'] + aliases = ['fancy', 'fy'] + mimetypes = ['text/x-fancysrc'] + + tokens = { + # copied from PerlLexer: + 'balanced-regex': [ + (r'/(\\\\|\\/|[^/])*/[egimosx]*', String.Regex, '#pop'), + (r'!(\\\\|\\!|[^!])*![egimosx]*', String.Regex, '#pop'), + (r'\\(\\\\|[^\\])*\\[egimosx]*', String.Regex, '#pop'), + (r'{(\\\\|\\}|[^}])*}[egimosx]*', String.Regex, '#pop'), + (r'<(\\\\|\\>|[^>])*>[egimosx]*', String.Regex, '#pop'), + (r'\[(\\\\|\\\]|[^\]])*\][egimosx]*', String.Regex, '#pop'), + (r'\((\\\\|\\\)|[^\)])*\)[egimosx]*', String.Regex, '#pop'), + (r'@(\\\\|\\\@|[^\@])*@[egimosx]*', String.Regex, '#pop'), + (r'%(\\\\|\\\%|[^\%])*%[egimosx]*', String.Regex, '#pop'), + (r'\$(\\\\|\\\$|[^\$])*\$[egimosx]*', String.Regex, '#pop'), + ], + 'root': [ + (r'\s+', Text), + + # balanced delimiters (copied from PerlLexer): + (r's{(\\\\|\\}|[^}])*}\s*', String.Regex, 'balanced-regex'), + (r's<(\\\\|\\>|[^>])*>\s*', String.Regex, 'balanced-regex'), + (r's\[(\\\\|\\\]|[^\]])*\]\s*', String.Regex, 'balanced-regex'), + (r's\((\\\\|\\\)|[^\)])*\)\s*', String.Regex, 'balanced-regex'), + (r'm?/(\\\\|\\/|[^/\n])*/[gcimosx]*', String.Regex), + (r'm(?=[/!\\{<\[\(@%\$])', String.Regex, 'balanced-regex'), + + # Comments + (r'#(.*?)\n', Comment.Single), + # Symbols + (r'\'([^\'\s\[\]\(\)\{\}]+|\[\])', String.Symbol), + # Multi-line DoubleQuotedString + (r'"""(\\\\|\\"|[^"])*"""', String), + # DoubleQuotedString + (r'"(\\\\|\\"|[^"])*"', String), + # keywords + (r'(def|class|try|catch|finally|retry|return|return_local|match|' + r'case|->|=>)\b', Keyword), + # constants + (r'(self|super|nil|false|true)\b', Name.Constant), + (r'[(){};,/?\|:\\]', Punctuation), + # names + (r'(Object|Array|Hash|Directory|File|Class|String|Number|' + r'Enumerable|FancyEnumerable|Block|TrueClass|NilClass|' + r'FalseClass|Tuple|Symbol|Stack|Set|FancySpec|Method|Package|' + r'Range)\b', Name.Builtin), + # functions + (r'[a-zA-Z]([a-zA-Z0-9_]|[-+?!=*/^><%])*:', Name.Function), + # operators, must be below functions + (r'[-+*/~,<>=&!?%^\[\]\.$]+', Operator), + ('[A-Z][a-zA-Z0-9_]*', Name.Constant), + ('@[a-zA-Z_][a-zA-Z0-9_]*', Name.Variable.Instance), + ('@@[a-zA-Z_][a-zA-Z0-9_]*', Name.Variable.Class), + ('(@|@@)', Operator), + ('[a-zA-Z_][a-zA-Z0-9_]*', Name), + # numbers - / checks are necessary to avoid mismarking regexes, + # see comment in RubyLexer + (r'(0[oO]?[0-7]+(?:_[0-7]+)*)(\s*)([/?])?', + bygroups(Number.Oct, Text, Operator)), + (r'(0[xX][0-9A-Fa-f]+(?:_[0-9A-Fa-f]+)*)(\s*)([/?])?', + bygroups(Number.Hex, Text, Operator)), + (r'(0[bB][01]+(?:_[01]+)*)(\s*)([/?])?', + bygroups(Number.Bin, Text, Operator)), + (r'([\d]+(?:_\d+)*)(\s*)([/?])?', + bygroups(Number.Integer, Text, Operator)), + (r'\d+([eE][+-]?[0-9]+)|\d+\.\d+([eE][+-]?[0-9]+)?', Number.Float), + (r'\d+', Number.Integer) + ] + } + + +class GroovyLexer(RegexLexer): + """ + For `Groovy <http://groovy.codehaus.org/>`_ source code. + + *New in Pygments 1.5.* + """ + + name = 'Groovy' + aliases = ['groovy'] + filenames = ['*.groovy'] + mimetypes = ['text/x-groovy'] + + flags = re.MULTILINE | re.DOTALL + + #: optional Comment or Whitespace + _ws = r'(?:\s|//.*?\n|/[*].*?[*]/)+' + + tokens = { + 'root': [ + # method names + (r'^(\s*(?:[a-zA-Z_][a-zA-Z0-9_\.\[\]]*\s+)+?)' # return arguments + r'([a-zA-Z_][a-zA-Z0-9_]*)' # method name + r'(\s*)(\()', # signature start + bygroups(using(this), Name.Function, Text, Operator)), + (r'[^\S\n]+', Text), + (r'//.*?\n', Comment.Single), + (r'/\*.*?\*/', Comment.Multiline), + (r'@[a-zA-Z_][a-zA-Z0-9_\.]*', Name.Decorator), + (r'(assert|break|case|catch|continue|default|do|else|finally|for|' + r'if|goto|instanceof|new|return|switch|this|throw|try|while|in|as)\b', + Keyword), + (r'(abstract|const|enum|extends|final|implements|native|private|' + r'protected|public|static|strictfp|super|synchronized|throws|' + r'transient|volatile)\b', Keyword.Declaration), + (r'(def|boolean|byte|char|double|float|int|long|short|void)\b', + Keyword.Type), + (r'(package)(\s+)', bygroups(Keyword.Namespace, Text)), + (r'(true|false|null)\b', Keyword.Constant), + (r'(class|interface)(\s+)', bygroups(Keyword.Declaration, Text), 'class'), + (r'(import)(\s+)', bygroups(Keyword.Namespace, Text), 'import'), + (r'"(\\\\|\\"|[^"])*"', String.Double), + (r"'(\\\\|\\'|[^'])*'", String.Single), + (r'\$/((?!/\$).)*/\$', String), + (r'/(\\\\|\\"|[^/])*/', String), + (r"'\\.'|'[^\\]'|'\\u[0-9a-f]{4}'", String.Char), + (r'(\.)([a-zA-Z_][a-zA-Z0-9_]*)', bygroups(Operator, Name.Attribute)), + (r'[a-zA-Z_][a-zA-Z0-9_]*:', Name.Label), + (r'[a-zA-Z_\$][a-zA-Z0-9_]*', Name), + (r'[~\^\*!%&\[\]\(\)\{\}<>\|+=:;,./?-]', Operator), + (r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float), + (r'0x[0-9a-f]+', Number.Hex), + (r'[0-9]+L?', Number.Integer), + (r'\n', Text) + ], + 'class': [ + (r'[a-zA-Z_][a-zA-Z0-9_]*', Name.Class, '#pop') + ], + 'import': [ + (r'[a-zA-Z0-9_.]+\*?', Name.Namespace, '#pop') + ], + } diff --git a/pygments/lexers/asm.py b/pygments/lexers/asm.py index 4740569c..82933bc8 100644 --- a/pygments/lexers/asm.py +++ b/pygments/lexers/asm.py @@ -5,7 +5,7 @@ Lexers for assembly languages. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -88,7 +88,11 @@ class GasLexer(RegexLexer): } def analyse_text(text): - return re.match(r'^\.\w+', text, re.M) + if re.match(r'^\.(text|data|section)', text, re.M): + return True + elif re.match(r'^\.\w+', text, re.M): + return 0.1 + class ObjdumpLexer(RegexLexer): """ diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py index 5c10a785..5da2b875 100644 --- a/pygments/lexers/compiled.py +++ b/pygments/lexers/compiled.py @@ -5,7 +5,7 @@ Lexers for compiled languages. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -22,11 +22,12 @@ from pygments.token import \ # backwards compatibility from pygments.lexers.functional import OcamlLexer -__all__ = ['CLexer', 'CppLexer', 'DLexer', 'DelphiLexer', 'JavaLexer', +__all__ = ['CLexer', 'CppLexer', 'DLexer', 'DelphiLexer', 'ECLexer', 'JavaLexer', 'ScalaLexer', 'DylanLexer', 'OcamlLexer', 'ObjectiveCLexer', 'FortranLexer', 'GLShaderLexer', 'PrologLexer', 'CythonLexer', 'ValaLexer', 'OocLexer', 'GoLexer', 'FelixLexer', 'AdaLexer', - 'Modula2Lexer', 'BlitzMaxLexer'] + 'Modula2Lexer', 'BlitzMaxLexer', 'NimrodLexer', 'GosuLexer', + 'GosuTemplateLexer'] class CLexer(RegexLexer): @@ -35,7 +36,7 @@ class CLexer(RegexLexer): """ name = 'C' aliases = ['c'] - filenames = ['*.c', '*.h'] + filenames = ['*.c', '*.h', '*.idc'] mimetypes = ['text/x-chdr', 'text/x-csrc'] #: optional Comment or Whitespace @@ -250,6 +251,156 @@ class CppLexer(RegexLexer): } +class ECLexer(RegexLexer): + """ + For eC source code with preprocessor directives. + + *New in Pygments 1.5.* + """ + name = 'eC' + aliases = ['ec'] + filenames = ['*.ec', '*.eh'] + mimetypes = ['text/x-echdr', 'text/x-ecsrc'] + + #: optional Comment or Whitespace + _ws = r'(?:\s|//.*?\n|/[*].*?[*]/)+' + + tokens = { + 'whitespace': [ + # preprocessor directives: without whitespace + ('^#if\s+0', Comment.Preproc, 'if0'), + ('^#', Comment.Preproc, 'macro'), + # or with whitespace + ('^' + _ws + r'#if\s+0', Comment.Preproc, 'if0'), + ('^' + _ws + '#', Comment.Preproc, 'macro'), + (r'^(\s*)([a-zA-Z_][a-zA-Z0-9_]*:(?!:))', bygroups(Text, Name.Label)), + (r'\n', Text), + (r'\s+', Text), + (r'\\\n', Text), # line continuation + (r'//(\n|(.|\n)*?[^\\]\n)', Comment.Single), + (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline), + ], + 'statements': [ + (r'L?"', String, 'string'), + (r"L?'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'", String.Char), + (r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*', Number.Float), + (r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float), + (r'0x[0-9a-fA-F]+[LlUu]*', Number.Hex), + (r'0[0-7]+[LlUu]*', Number.Oct), + (r'\d+[LlUu]*', Number.Integer), + (r'\*/', Error), + (r'[~!%^&*+=|?:<>/-]', Operator), + (r'[()\[\],.]', Punctuation), + (r'\b(case)(.+?)(:)', bygroups(Keyword, using(this), Text)), + (r'(auto|break|case|const|continue|default|do|else|enum|extern|' + r'for|goto|if|register|restricted|return|sizeof|static|struct|' + r'switch|typedef|union|volatile|virtual|while|class|private|public|' + r'property|import|delete|new|new0|renew|renew0|define|get|set|remote|dllexport|dllimport|stdcall|' + r'subclass|__on_register_module|namespace|using|typed_object|any_object|incref|register|watch|' + r'stopwatching|firewatchers|watchable|class_designer|class_fixed|class_no_expansion|isset|' + r'class_default_property|property_category|class_data|class_property|virtual|thisclass|' + r'dbtable|dbindex|database_open|dbfield)\b', Keyword), + (r'(int|long|float|short|double|char|unsigned|signed|void)\b', + Keyword.Type), + (r'(uint|uint16|uint32|uint64|bool|byte|unichar|int64)\b', + Keyword.Type), + (r'(class)(\s+)', bygroups(Keyword, Text), 'classname'), + (r'(_{0,2}inline|naked|restrict|thread|typename)\b', Keyword.Reserved), + (r'__(asm|int8|based|except|int16|stdcall|cdecl|fastcall|int32|' + r'declspec|finally|int64|try|leave)\b', Keyword.Reserved), + (r'(true|false|null|value|this|NULL)\b', Name.Builtin), + ('[a-zA-Z_][a-zA-Z0-9_]*', Name), + ], + 'root': [ + include('whitespace'), + # functions + (r'((?:[a-zA-Z0-9_*\s])+?(?:\s|[*]))' # return arguments + r'([a-zA-Z_][a-zA-Z0-9_]*)' # method name + r'(\s*\([^;]*?\))' # signature + r'(' + _ws + r')({)', + bygroups(using(this), Name.Function, using(this), using(this), + Punctuation), + 'function'), + # function declarations + (r'((?:[a-zA-Z0-9_*\s])+?(?:\s|[*]))' # return arguments + r'([a-zA-Z_][a-zA-Z0-9_]*)' # method name + r'(\s*\([^;]*?\))' # signature + r'(' + _ws + r')(;)', + bygroups(using(this), Name.Function, using(this), using(this), + Punctuation)), + ('', Text, 'statement'), + ], + 'classname': [ + (r'[a-zA-Z_][a-zA-Z0-9_]*', Name.Class, '#pop'), + # template specification + (r'\s*(?=>)', Text, '#pop'), + ], + 'statement' : [ + include('whitespace'), + include('statements'), + ('[{}]', Punctuation), + (';', Punctuation, '#pop'), + ], + 'function': [ + include('whitespace'), + include('statements'), + (';', Punctuation), + ('{', Punctuation, '#push'), + ('}', Punctuation, '#pop'), + ], + 'string': [ + (r'"', String, '#pop'), + (r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})', String.Escape), + (r'[^\\"\n]+', String), # all other characters + (r'\\\n', String), # line continuation + (r'\\', String), # stray backslash + ], + 'macro': [ + (r'[^/\n]+', Comment.Preproc), + (r'/[*](.|\n)*?[*]/', Comment.Multiline), + (r'//.*?\n', Comment.Single, '#pop'), + (r'/', Comment.Preproc), + (r'(?<=\\)\n', Comment.Preproc), + (r'\n', Comment.Preproc, '#pop'), + ], + 'if0': [ + (r'^\s*#if.*?(?<!\\)\n', Comment.Preproc, '#push'), + (r'^\s*#el(?:se|if).*\n', Comment.Preproc, '#pop'), + (r'^\s*#endif.*?(?<!\\)\n', Comment.Preproc, '#pop'), + (r'.*?\n', Comment), + ] + } + + stdlib_types = ['size_t', 'ssize_t', 'off_t', 'wchar_t', 'ptrdiff_t', + 'sig_atomic_t', 'fpos_t', 'clock_t', 'time_t', 'va_list', + 'jmp_buf', 'FILE', 'DIR', 'div_t', 'ldiv_t', 'mbstate_t', + 'wctrans_t', 'wint_t', 'wctype_t'] + c99_types = ['_Bool', '_Complex', 'int8_t', 'int16_t', 'int32_t', 'int64_t', + 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', 'int_least8_t', + 'int_least16_t', 'int_least32_t', 'int_least64_t', + 'uint_least8_t', 'uint_least16_t', 'uint_least32_t', + 'uint_least64_t', 'int_fast8_t', 'int_fast16_t', 'int_fast32_t', + 'int_fast64_t', 'uint_fast8_t', 'uint_fast16_t', 'uint_fast32_t', + 'uint_fast64_t', 'intptr_t', 'uintptr_t', 'intmax_t', 'uintmax_t'] + + def __init__(self, **options): + self.stdlibhighlighting = get_bool_opt(options, + 'stdlibhighlighting', True) + self.c99highlighting = get_bool_opt(options, + 'c99highlighting', True) + RegexLexer.__init__(self, **options) + + def get_tokens_unprocessed(self, text): + for index, token, value in \ + RegexLexer.get_tokens_unprocessed(self, text): + if token is Name: + if self.stdlibhighlighting and value in self.stdlib_types: + token = Keyword.Type + elif self.c99highlighting and value in self.c99_types: + token = Keyword.Type + yield index, token, value + + class DLexer(RegexLexer): """ For D source. @@ -986,7 +1137,7 @@ class ScalaLexer(RegexLexer): (r'(true|false|null)\b', Keyword.Constant), (r'(import|package)(\s+)', bygroups(Keyword, Text), 'import'), (r'(type)(\s+)', bygroups(Keyword, Text), 'type'), - (r'"""(?:.|\n)*?"""', String), + (r'""".*?"""', String), (r'"(\\\\|\\"|[^"])*"', String), (ur"'\\.'|'[^\\]'|'\\u[0-9a-f]{4}'", String.Char), # (ur'(\.)(%s|%s|`[^`]+`)' % (idrest, op), bygroups(Operator, @@ -994,7 +1145,7 @@ class ScalaLexer(RegexLexer): (idrest, Name), (r'`[^`]+`', Name), (r'\[', Operator, 'typeparam'), - (r'[\(\)\{\};,.]', Operator), + (r'[\(\)\{\};,.#]', Operator), (op, Operator), (ur'([0-9][0-9]*\.[0-9]*|\.[0-9]+)([eE][+-]?[0-9]+)?[fFdD]?', Number.Float), @@ -1159,6 +1310,13 @@ class ObjectiveCLexer(RegexLexer): bygroups(using(this), Name.Function, using(this), Text, Punctuation), 'function'), + # methods + (r'^([-+])(\s*)' # method marker + r'(\(.*?\))?(\s*)' # return type + r'([a-zA-Z$_][a-zA-Z0-9$_]*:?)', # begin of method name + bygroups(Keyword, Text, using(this), + Text, Name.Function), + 'method'), # function declarations (r'((?:[a-zA-Z0-9_*\s])+?(?:\s|[*]))' # return arguments r'([a-zA-Z$_][a-zA-Z0-9$_]*)' # method name @@ -1202,6 +1360,15 @@ class ObjectiveCLexer(RegexLexer): ('{', Punctuation, '#push'), ('}', Punctuation, '#pop'), ], + 'method': [ + include('whitespace'), + (r'(\(.*?\))([a-zA-Z$_][a-zA-Z0-9$_]*)', bygroups(using(this), + Name.Variable)), + (r'[a-zA-Z$_][a-zA-Z0-9$_]*:', Name.Function), + (';', Punctuation, '#pop'), + ('{', Punctuation, 'function'), + ('', Text, '#pop'), + ], 'string': [ (r'"', String, '#pop'), (r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})', String.Escape), @@ -1239,7 +1406,7 @@ class FortranLexer(RegexLexer): ''' name = 'Fortran' aliases = ['fortran'] - filenames = ['*.f', '*.f90'] + filenames = ['*.f', '*.f90', '*.F', '*.F90'] mimetypes = ['text/x-fortran'] flags = re.IGNORECASE @@ -2480,3 +2647,241 @@ class BlitzMaxLexer(RegexLexer): (r'[^"]+', String.Double), ], } + + +class NimrodLexer(RegexLexer): + """ + For `Nimrod <http://nimrod-code.org/>`_ source code. + + *New in Pygments 1.5.* + """ + + name = 'Nimrod' + aliases = ['nimrod', 'nim'] + filenames = ['*.nim', '*.nimrod'] + mimetypes = ['text/x-nimrod'] + + flags = re.MULTILINE | re.IGNORECASE | re.UNICODE + + def underscorize(words): + newWords = [] + new = "" + for word in words: + for ch in word: + new += (ch + "_?") + newWords.append(new) + new = "" + return "|".join(newWords) + + keywords = [ + 'addr', 'and', 'as', 'asm', 'atomic', 'bind', 'block', 'break', + 'case', 'cast', 'const', 'continue', 'converter', 'discard', + 'distinct', 'div', 'elif', 'else', 'end', 'enum', 'except', 'finally', + 'for', 'generic', 'if', 'implies', 'in', 'yield', + 'is', 'isnot', 'iterator', 'lambda', 'let', 'macro', 'method', + 'mod', 'not', 'notin', 'object', 'of', 'or', 'out', 'proc', + 'ptr', 'raise', 'ref', 'return', 'shl', 'shr', 'template', 'try', + 'tuple', 'type' , 'when', 'while', 'with', 'without', 'xor' + ] + + keywordsPseudo = [ + 'nil', 'true', 'false' + ] + + opWords = [ + 'and', 'or', 'not', 'xor', 'shl', 'shr', 'div', 'mod', 'in', + 'notin', 'is', 'isnot' + ] + + types = [ + 'int', 'int8', 'int16', 'int32', 'int64', 'float', 'float32', 'float64', + 'bool', 'char', 'range', 'array', 'seq', 'set', 'string' + ] + + tokens = { + 'root': [ + (r'##.*$', String.Doc), + (r'#.*$', Comment), + (r'\*|=|>|<|\+|-|/|@|\$|~|&|%|\!|\?|\||\\|\[|\]', Operator), + (r'\.\.|\.|,|[\.|\.]|{\.|\.}|\(\.|\.\)|{|}|\(|\)|:|\^|`|;', + Punctuation), + + # Strings + (r'(?:[\w]+)"', String, 'rdqs'), + (r'"""', String, 'tdqs'), + ('"', String, 'dqs'), + + # Char + ("'", String.Char, 'chars'), + + # Keywords + (r'(%s)\b' % underscorize(opWords), Operator.Word), + (r'(p_?r_?o_?c_?\s)(?![\(\[\]])', Keyword, 'funcname'), + (r'(%s)\b' % underscorize(keywords), Keyword), + (r'(%s)\b' % underscorize(['from', 'import', 'include']), + Keyword.Namespace), + (r'(v_?a_?r)\b', Keyword.Declaration), + (r'(%s)\b' % underscorize(types), Keyword.Type), + (r'(%s)\b' % underscorize(keywordsPseudo), Keyword.Pseudo), + # Identifiers + (r'\b((?![_\d])\w)(((?!_)\w)|(_(?!_)\w))*', Name), + # Numbers + (r'[0-9][0-9_]*(?=([eE.]|\'[fF](32|64)))', + Number.Float, ('float-suffix', 'float-number')), + (r'0[xX][a-fA-F0-9][a-fA-F0-9_]*', Number.Hex, 'int-suffix'), + (r'0[bB][01][01_]*', Number, 'int-suffix'), + (r'0o[0-7][0-7_]*', Number.Oct, 'int-suffix'), + (r'[0-9][0-9_]*', Number.Integer, 'int-suffix'), + # Whitespace + (r'\s+', Text), + (r'.+$', Error), + ], + 'chars': [ + (r'\\([\\abcefnrtvl"\']|x[a-fA-F0-9]{2}|[0-9]{1,3})', String.Escape), + (r"'", String.Char, '#pop'), + (r".", String.Char) + ], + 'strings': [ + (r'(?<!\$)\$(\d+|#|\w+)+', String.Interpol), + (r'[^\\\'"\$\n]+', String), + # quotes, dollars and backslashes must be parsed one at a time + (r'[\'"\\]', String), + # unhandled string formatting sign + (r'\$', String) + # newlines are an error (use "nl" state) + ], + 'dqs': [ + (r'\\([\\abcefnrtvl"\']|\n|x[a-fA-F0-9]{2}|[0-9]{1,3})', + String.Escape), + (r'"', String, '#pop'), + include('strings') + ], + 'rdqs': [ + (r'"(?!")', String, '#pop'), + (r'""', String.Escape), + include('strings') + ], + 'tdqs': [ + (r'"""(?!")', String, '#pop'), + include('strings'), + include('nl') + ], + 'funcname': [ + (r'((?![\d_])\w)(((?!_)\w)|(_(?!_)\w))*', Name.Function, '#pop'), + (r'`.+`', Name.Function, '#pop') + ], + 'nl': [ + (r'\n', String) + ], + 'float-number': [ + (r'\.(?!\.)[0-9_]*', Number.Float), + (r'[eE][+-]?[0-9][0-9_]*', Number.Float), + (r'', Text, '#pop') + ], + 'float-suffix': [ + (r'\'[fF](32|64)', Number.Float), + (r'', Text, '#pop') + ], + 'int-suffix': [ + (r'\'[iI](32|64)', Number.Integer.Long), + (r'\'[iI](8|16)', Number.Integer), + (r'', Text, '#pop') + ], + } + + +class GosuLexer(RegexLexer): + """ + For Gosu source code. + + *New in Pygments 1.5.* + """ + + name = 'Gosu' + aliases = ['gosu'] + filenames = ['*.gs', '*.gsx', '*.gsp', '*.vark'] + mimetypes = ['text/x-gosu'] + + flags = re.MULTILINE | re.DOTALL + + #: optional Comment or Whitespace + _ws = r'(?:\s|//.*?\n|/[*].*?[*]/)+' + + tokens = { + 'root': [ + # method names + (r'^(\s*(?:[a-zA-Z_][a-zA-Z0-9_\.\[\]]*\s+)+?)' # modifiers etc. + r'([a-zA-Z_][a-zA-Z0-9_]*)' # method name + r'(\s*)(\()', # signature start + bygroups(using(this), Name.Function, Text, Operator)), + (r'[^\S\n]+', Text), + (r'//.*?\n', Comment.Single), + (r'/\*.*?\*/', Comment.Multiline), + (r'@[a-zA-Z_][a-zA-Z0-9_\.]*', Name.Decorator), + (r'(in|as|typeof|statictypeof|typeis|typeas|if|else|foreach|' + r'for|index|while|do|continue|break|return|try|catch|finally|this|throw|' + r'new|switch|case|default|eval|super|outer|classpath|using)\b', + Keyword), + (r'(var|delegate|construct|function|private|internal|protected|public|' + r'abstract|override|final|static|extends|transient|implements|represents|' + r'readonly)\b', Keyword.Declaration), + (r'(property\s+)(get|set|)', Keyword.Declaration), + (r'(boolean|byte|char|double|float|int|long|short|void|block)\b', + Keyword.Type), + (r'(package)(\s+)', bygroups(Keyword.Namespace, Text)), + (r'(true|false|null|NaN|Infinity)\b', Keyword.Constant), + (r'(class|interface|enhancement|enum)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)', bygroups(Keyword.Declaration, Text, Name.Class)), + (r'(uses)(\s+)([a-zA-Z0-9_.]+\*?)', bygroups(Keyword.Namespace, Text, Name.Namespace)), + (r'"', String, 'string'), + (r'(\??[\.#])([a-zA-Z_][a-zA-Z0-9_]*)', bygroups(Operator, Name.Attribute)), + (r'(:)([a-zA-Z_][a-zA-Z0-9_]*)', bygroups(Operator, Name.Attribute)), + (r'[a-zA-Z_\$][a-zA-Z0-9_]*', Name), + (r'and|or|not|[\\~\^\*!%&\[\]\(\)\{\}<>\|+=:;,./?-]', Operator), + (r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float), + (r'[0-9]+', Number.Integer), + (r'\n', Text) + ], + 'templateText': [ + (r'(\\<)|(\\\$)', String), + (r'(<%@\s+)(extends|params)', bygroups(Operator, Name.Decorator), 'stringTemplate'), + (r'<%!--.*?--%>', Comment.Multiline), + (r'(<%)|(<%=)', Operator, 'stringTemplate'), + (r'\$\{', Operator, 'stringTemplateShorthand'), + (r'.', String) + ], + 'string': [ + (r'"', String, '#pop'), + include('templateText') + ], + 'stringTemplate': [ + (r'"', String, 'string'), + (r'%>', Operator, '#pop'), + include('root') + ], + 'stringTemplateShorthand': [ + (r'"', String, 'string'), + (r'\{', Operator, 'stringTemplateShorthand'), + (r'\}', Operator, '#pop'), + include('root') + ], + } + + +class GosuTemplateLexer(Lexer): + """ + For Gosu templates. + + *New in Pygments 1.5.* + """ + + name = 'Gosu Template' + aliases = ['gst'] + filenames = ['*.gst'] + mimetypes = ['text/x-gosu-template'] + lexer = GosuLexer() + + def get_tokens_unprocessed(self, text): + stack = ['templateText'] + for item in self.lexer.get_tokens_unprocessed(text, stack): + yield item + diff --git a/pygments/lexers/dotnet.py b/pygments/lexers/dotnet.py index 48feeb85..f78df352 100644 --- a/pygments/lexers/dotnet.py +++ b/pygments/lexers/dotnet.py @@ -5,12 +5,13 @@ Lexers for .net languages. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re -from pygments.lexer import RegexLexer, DelegatingLexer, bygroups, using, this +from pygments.lexer import RegexLexer, DelegatingLexer, bygroups, include, \ + using, this from pygments.token import Punctuation, \ Text, Comment, Operator, Keyword, Name, String, Number, Literal, Other from pygments.util import get_choice_opt @@ -18,8 +19,8 @@ from pygments import unistring as uni from pygments.lexers.web import XmlLexer -__all__ = ['CSharpLexer', 'BooLexer', 'VbNetLexer', 'CSharpAspxLexer', - 'VbNetAspxLexer'] +__all__ = ['CSharpLexer', 'NemerleLexer', 'BooLexer', 'VbNetLexer', + 'CSharpAspxLexer', 'VbNetAspxLexer', 'FSharpLexer'] def _escape(st): @@ -138,6 +139,164 @@ class CSharpLexer(RegexLexer): RegexLexer.__init__(self, **options) +class NemerleLexer(RegexLexer): + """ + For `Nemerle <http://nemerle.org>`_ source code. + + Additional options accepted: + + `unicodelevel` + Determines which Unicode characters this lexer allows for identifiers. + The possible values are: + + * ``none`` -- only the ASCII letters and numbers are allowed. This + is the fastest selection. + * ``basic`` -- all Unicode characters from the specification except + category ``Lo`` are allowed. + * ``full`` -- all Unicode characters as specified in the C# specs + are allowed. Note that this means a considerable slowdown since the + ``Lo`` category has more than 40,000 characters in it! + + The default value is ``basic``. + + *New in Pygments 1.5.* + """ + + name = 'Nemerle' + aliases = ['nemerle'] + filenames = ['*.n'] + mimetypes = ['text/x-nemerle'] # inferred + + flags = re.MULTILINE | re.DOTALL | re.UNICODE + + # for the range of allowed unicode characters in identifiers, + # see http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-334.pdf + + levels = { + 'none': '@?[_a-zA-Z][a-zA-Z0-9_]*', + 'basic': ('@?[_' + uni.Lu + uni.Ll + uni.Lt + uni.Lm + uni.Nl + ']' + + '[' + uni.Lu + uni.Ll + uni.Lt + uni.Lm + uni.Nl + + uni.Nd + uni.Pc + uni.Cf + uni.Mn + uni.Mc + ']*'), + 'full': ('@?(?:_|[^' + + _escape(uni.allexcept('Lu', 'Ll', 'Lt', 'Lm', 'Lo', 'Nl')) + '])' + + '[^' + _escape(uni.allexcept('Lu', 'Ll', 'Lt', 'Lm', 'Lo', + 'Nl', 'Nd', 'Pc', 'Cf', 'Mn', + 'Mc')) + ']*'), + } + + tokens = {} + token_variants = True + + for levelname, cs_ident in levels.items(): + tokens[levelname] = { + 'root': [ + # method names + (r'^([ \t]*(?:' + cs_ident + r'(?:\[\])?\s+)+?)' # return type + r'(' + cs_ident + ')' # method name + r'(\s*)(\()', # signature start + bygroups(using(this), Name.Function, Text, Punctuation)), + (r'^\s*\[.*?\]', Name.Attribute), + (r'[^\S\n]+', Text), + (r'\\\n', Text), # line continuation + (r'//.*?\n', Comment.Single), + (r'/[*](.|\n)*?[*]/', Comment.Multiline), + (r'\n', Text), + (r'\$\s*"', String, 'splice-string'), + (r'\$\s*<#', String, 'splice-string2'), + (r'<#', String, 'recursive-string'), + + (r'(<\[)\s*(' + cs_ident + ':)?', Keyword), + (r'\]\>', Keyword), + + # quasiquotation only + (r'\$' + cs_ident, Name), + (r'(\$)(\()', bygroups(Name, Punctuation), 'splice-string-content'), + + (r'[~!%^&*()+=|\[\]:;,.<>/?-]', Punctuation), + (r'[{}]', Punctuation), + (r'@"(\\\\|\\"|[^"])*"', String), + (r'"(\\\\|\\"|[^"\n])*["\n]', String), + (r"'\\.'|'[^\\]'", String.Char), + (r"0[xX][0-9a-fA-F]+[Ll]?", Number), + (r"[0-9](\.[0-9]*)?([eE][+-][0-9]+)?[flFLdD]?", Number), + (r'#[ \t]*(if|endif|else|elif|define|undef|' + r'line|error|warning|region|endregion|pragma)\b.*?\n', + Comment.Preproc), + (r'\b(extern)(\s+)(alias)\b', bygroups(Keyword, Text, + Keyword)), + (r'(abstract|and|as|base|catch|def|delegate|' + r'enum|event|extern|false|finally|' + r'fun|implements|interface|internal|' + r'is|macro|match|matches|module|mutable|new|' + r'null|out|override|params|partial|private|' + r'protected|public|ref|sealed|static|' + r'syntax|this|throw|true|try|type|typeof|' + r'virtual|volatile|when|where|with|' + r'assert|assert2|async|break|checked|continue|do|else|' + r'ensures|for|foreach|if|late|lock|new|nolate|' + r'otherwise|regexp|repeat|requires|return|surroundwith|' + r'unchecked|unless|using|while|yield)\b', Keyword), + (r'(global)(::)', bygroups(Keyword, Punctuation)), + (r'(bool|byte|char|decimal|double|float|int|long|object|sbyte|' + r'short|string|uint|ulong|ushort|void|array|list)\b\??', + Keyword.Type), + (r'(:>?)\s*(' + cs_ident + r'\??)', + bygroups(Punctuation, Keyword.Type)), + (r'(class|struct|variant|module)(\s+)', + bygroups(Keyword, Text), 'class'), + (r'(namespace|using)(\s+)', bygroups(Keyword, Text), + 'namespace'), + (cs_ident, Name), + ], + 'class': [ + (cs_ident, Name.Class, '#pop') + ], + 'namespace': [ + (r'(?=\()', Text, '#pop'), # using (resource) + ('(' + cs_ident + r'|\.)+', Name.Namespace, '#pop') + ], + 'splice-string': [ + (r'[^"$]', String), + (r'\$' + cs_ident, Name), + (r'(\$)(\()', bygroups(Name, Punctuation), + 'splice-string-content'), + (r'\\"', String), + (r'"', String, '#pop') + ], + 'splice-string2': [ + (r'[^#<>$]', String), + (r'\$' + cs_ident, Name), + (r'(\$)(\()', bygroups(Name, Punctuation), + 'splice-string-content'), + (r'<#', String, '#push'), + (r'#>', String, '#pop') + ], + 'recursive-string': [ + (r'[^#<>]', String), + (r'<#', String, '#push'), + (r'#>', String, '#pop') + ], + 'splice-string-content': [ + (r'if|match', Keyword), + (r'[~!%^&*+=|\[\]:;,.<>/?-]', Punctuation), + (cs_ident, Name), + (r'\(', Punctuation, '#push'), + (r'\)', Punctuation, '#pop') + ] + } + + def __init__(self, **options): + level = get_choice_opt(options, 'unicodelevel', self.tokens.keys(), + 'basic') + if level not in self._all_tokens: + # compile the regexes now + self._tokens = self.__class__.process_tokendef(level) + else: + self._tokens = self._all_tokens[level] + + RegexLexer.__init__(self, **options) + + class BooLexer(RegexLexer): """ For `Boo <http://boo.codehaus.org/>`_ source code. @@ -365,3 +524,107 @@ class VbNetAspxLexer(DelegatingLexer): return 0.2 elif re.search(r'script[^>]+language=["\']vb', text, re.I) is not None: return 0.15 + + +# Very close to functional.OcamlLexer +class FSharpLexer(RegexLexer): + """ + For the F# language. + + *New in Pygments 1.5.* + """ + + name = 'FSharp' + aliases = ['fsharp'] + filenames = ['*.fs', '*.fsi'] + mimetypes = ['text/x-fsharp'] + + keywords = [ + 'abstract', 'and', 'as', 'assert', 'base', 'begin', 'class', + 'default', 'delegate', 'do', 'do!', 'done', 'downcast', + 'downto', 'elif', 'else', 'end', 'exception', 'extern', + 'false', 'finally', 'for', 'fun', 'function', 'global', 'if', + 'in', 'inherit', 'inline', 'interface', 'internal', 'lazy', + 'let', 'let!', 'match', 'member', 'module', 'mutable', + 'namespace', 'new', 'null', 'of', 'open', 'or', 'override', + 'private', 'public', 'rec', 'return', 'return!', 'sig', + 'static', 'struct', 'then', 'to', 'true', 'try', 'type', + 'upcast', 'use', 'use!', 'val', 'void', 'when', 'while', + 'with', 'yield', 'yield!' + ] + keyopts = [ + '!=','#','&','&&','\(','\)','\*','\+',',','-', + '-\.','->','\.','\.\.',':','::',':=',':>',';',';;','<', + '<-','>','>]','\?','\?\?','\[','\[<','\[>','\[\|', + ']','_','`','{','\|','\|]','}','~','<@','=','@>' + ] + + operators = r'[!$%&*+\./:<=>?@^|~-]' + word_operators = ['and', 'asr', 'land', 'lor', 'lsl', 'lxor', 'mod', 'not', 'or'] + prefix_syms = r'[!?~]' + infix_syms = r'[=<>@^|&+\*/$%-]' + primitives = ['unit', 'int', 'float', 'bool', 'string', 'char', 'list', 'array', + 'byte', 'sbyte', 'int16', 'uint16', 'uint32', 'int64', 'uint64' + 'nativeint', 'unativeint', 'decimal', 'void', 'float32', 'single', + 'double'] + + tokens = { + 'escape-sequence': [ + (r'\\[\\\"\'ntbr]', String.Escape), + (r'\\[0-9]{3}', String.Escape), + (r'\\x[0-9a-fA-F]{2}', String.Escape), + ], + 'root': [ + (r'\s+', Text), + (r'false|true|\(\)|\[\]', Name.Builtin.Pseudo), + (r'\b([A-Z][A-Za-z0-9_\']*)(?=\s*\.)', + Name.Namespace, 'dotted'), + (r'\b([A-Z][A-Za-z0-9_\']*)', Name.Class), + (r'//.*?\n', Comment.Single), + (r'\(\*', Comment, 'comment'), + (r'\b(%s)\b' % '|'.join(keywords), Keyword), + (r'(%s)' % '|'.join(keyopts), Operator), + (r'(%s|%s)?%s' % (infix_syms, prefix_syms, operators), Operator), + (r'\b(%s)\b' % '|'.join(word_operators), Operator.Word), + (r'\b(%s)\b' % '|'.join(primitives), Keyword.Type), + + (r'#[ \t]*(if|endif|else|line|nowarn|light)\b.*?\n', + Comment.Preproc), + + (r"[^\W\d][\w']*", Name), + + (r'\d[\d_]*', Number.Integer), + (r'0[xX][\da-fA-F][\da-fA-F_]*', Number.Hex), + (r'0[oO][0-7][0-7_]*', Number.Oct), + (r'0[bB][01][01_]*', Number.Binary), + (r'-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)', Number.Float), + + (r"'(?:(\\[\\\"'ntbr ])|(\\[0-9]{3})|(\\x[0-9a-fA-F]{2}))'", + String.Char), + (r"'.'", String.Char), + (r"'", Keyword), # a stray quote is another syntax element + + (r'"', String.Double, 'string'), + + (r'[~?][a-z][\w\']*:', Name.Variable), + ], + 'comment': [ + (r'[^(*)]+', Comment), + (r'\(\*', Comment, '#push'), + (r'\*\)', Comment, '#pop'), + (r'[(*)]', Comment), + ], + 'string': [ + (r'[^\\"]+', String.Double), + include('escape-sequence'), + (r'\\\n', String.Double), + (r'"', String.Double, '#pop'), + ], + 'dotted': [ + (r'\s+', Text), + (r'\.', Punctuation), + (r'[A-Z][A-Za-z0-9_\']*(?=\s*\.)', Name.Namespace), + (r'[A-Z][A-Za-z0-9_\']*', Name.Class, '#pop'), + (r'[a-z_][A-Za-z0-9_\']*', Name, '#pop'), + ], + } diff --git a/pygments/lexers/functional.py b/pygments/lexers/functional.py index e6d16b19..204f44c5 100644 --- a/pygments/lexers/functional.py +++ b/pygments/lexers/functional.py @@ -5,7 +5,7 @@ Lexers for functional languages. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -13,11 +13,12 @@ import re from pygments.lexer import Lexer, RegexLexer, bygroups, include, do_insertions from pygments.token import Text, Comment, Operator, Keyword, Name, \ - String, Number, Punctuation, Literal, Generic + String, Number, Punctuation, Literal, Generic, Error -__all__ = ['SchemeLexer', 'CommonLispLexer', 'HaskellLexer', 'LiterateHaskellLexer', - 'OcamlLexer', 'ErlangLexer', 'ErlangShellLexer'] +__all__ = ['SchemeLexer', 'CommonLispLexer', 'HaskellLexer', + 'LiterateHaskellLexer', 'SMLLexer', 'OcamlLexer', 'ErlangLexer', + 'ErlangShellLexer'] class SchemeLexer(RegexLexer): @@ -36,7 +37,7 @@ class SchemeLexer(RegexLexer): """ name = 'Scheme' aliases = ['scheme', 'scm'] - filenames = ['*.scm'] + filenames = ['*.scm', '*.ss', '*.rkt'] mimetypes = ['text/x-scheme', 'application/x-scheme'] # list of known keywords and builtins taken form vim 6.4 scheme.vim @@ -406,7 +407,7 @@ class HaskellLexer(RegexLexer): 'funclist': [ (r'\s+', Text), (r'[A-Z][a-zA-Z0-9_]*', Keyword.Type), - (r'[_a-z][\w\']+', Name.Function), + (r'(_[\w\']+|[a-z][\w\']*)', Name.Function), (r'--.*$', Comment.Single), (r'{-', Comment.Multiline, 'comment'), (r',', Punctuation), @@ -515,6 +516,328 @@ class LiterateHaskellLexer(Lexer): yield item +class SMLLexer(RegexLexer): + """ + For the Standard ML language. + + *New in Pygments 1.5.* + """ + + name = 'Standard ML' + aliases = ['sml'] + filenames = ['*.sml', '*.sig', '*.fun',] + mimetypes = ['text/x-standardml', 'application/x-standardml'] + + alphanumid_reserved = [ + # Core + 'abstype', 'and', 'andalso', 'as', 'case', 'datatype', 'do', 'else', + 'end', 'exception', 'fn', 'fun', 'handle', 'if', 'in', 'infix', + 'infixr', 'let', 'local', 'nonfix', 'of', 'op', 'open', 'orelse', + 'raise', 'rec', 'then', 'type', 'val', 'with', 'withtype', 'while', + # Modules + 'eqtype', 'functor', 'include', 'sharing', 'sig', 'signature', + 'struct', 'structure', 'where', + ] + + symbolicid_reserved = [ + # Core + ':', '\|', '=', '=>', '->', '#', + # Modules + ':>', + ] + + nonid_reserved = [ '(', ')', '[', ']', '{', '}', ',', ';', '...', '_' ] + + alphanumid_re = r"[a-zA-Z][a-zA-Z0-9_']*" + symbolicid_re = r"[!%&$#+\-/:<=>?@\\~`^|*]+" + + # A character constant is a sequence of the form #s, where s is a string + # constant denoting a string of size one character. This setup just parses + # the entire string as either a String.Double or a String.Char (depending + # on the argument), even if the String.Char is an erronous + # multiple-character string. + def stringy (whatkind): + return [ + (r'[^"\\]', whatkind), + (r'\\[\\\"abtnvfr]', String.Escape), + (r'\\\^[@-^]', String.Escape), + (r'\\[0-9]{3}', String.Escape), + (r'\\u[0-9a-fA-F]{4}', String.Escape), + (r'\\\s+\\', String.Interpol), + (r'"', whatkind, '#pop'), + ] + + # Callbacks for distinguishing tokens and reserved words + def long_id_callback(self, match): + if match.group(1) in self.alphanumid_reserved: token = Error + else: token = Name.Namespace + yield match.start(1), token, match.group(1) + yield match.start(2), Punctuation, match.group(2) + + def end_id_callback(self, match): + if match.group(1) in self.alphanumid_reserved: token = Error + elif match.group(1) in self.symbolicid_reserved: token = Error + else: token = Name + yield match.start(1), token, match.group(1) + + def id_callback(self, match): + str = match.group(1) + if str in self.alphanumid_reserved: token = Keyword.Reserved + elif str in self.symbolicid_reserved: token = Punctuation + else: token = Name + yield match.start(1), token, str + + tokens = { + # Whitespace and comments are (almost) everywhere + 'whitespace': [ + (r'\s+', Text), + (r'\(\*', Comment.Multiline, 'comment'), + ], + + 'delimiters': [ + # This lexer treats these delimiters specially: + # Delimiters define scopes, and the scope is how the meaning of + # the `|' is resolved - is it a case/handle expression, or function + # definition by cases? (This is not how the Definition works, but + # it's how MLton behaves, see http://mlton.org/SMLNJDeviations) + (r'\(|\[|{', Punctuation, 'main'), + (r'\)|\]|}', Punctuation, '#pop'), + (r'\b(let|if|local)\b(?!\')', Keyword.Reserved, ('main', 'main')), + (r'\b(struct|sig|while)\b(?!\')', Keyword.Reserved, 'main'), + (r'\b(do|else|end|in|then)\b(?!\')', Keyword.Reserved, '#pop'), + ], + + 'core': [ + # Punctuation that doesn't overlap symbolic identifiers + (r'(%s)' % '|'.join([re.escape(z) for z in nonid_reserved]), + Punctuation), + + # Special constants: strings, floats, numbers in decimal and hex + (r'#"', String.Char, 'char'), + (r'"', String.Double, 'string'), + (r'~?0x[0-9a-fA-F]+', Number.Hex), + (r'0wx[0-9a-fA-F]+', Number.Hex), + (r'0w\d+', Number.Integer), + (r'~?\d+\.\d+[eE]~?\d+', Number.Float), + (r'~?\d+\.\d+', Number.Float), + (r'~?\d+[eE]~?\d+', Number.Float), + (r'~?\d+', Number.Integer), + + # Labels + (r'#\s*[1-9][0-9]*', Name.Label), + (r'#\s*(%s)' % alphanumid_re, Name.Label), + (r'#\s+(%s)' % symbolicid_re, Name.Label), + # Some reserved words trigger a special, local lexer state change + (r'\b(datatype|abstype)\b(?!\')', Keyword.Reserved, 'dname'), + (r'(?=\b(exception)\b(?!\'))', Text, ('ename')), + (r'\b(functor|include|open|signature|structure)\b(?!\')', + Keyword.Reserved, 'sname'), + (r'\b(type|eqtype)\b(?!\')', Keyword.Reserved, 'tname'), + + # Regular identifiers, long and otherwise + (r'\'[0-9a-zA-Z_\']*', Name.Decorator), + (r'(%s)(\.)' % alphanumid_re, long_id_callback, "dotted"), + (r'(%s)' % alphanumid_re, id_callback), + (r'(%s)' % symbolicid_re, id_callback), + ], + 'dotted': [ + (r'(%s)(\.)' % alphanumid_re, long_id_callback), + (r'(%s)' % alphanumid_re, end_id_callback, "#pop"), + (r'(%s)' % symbolicid_re, end_id_callback, "#pop"), + (r'\s+', Error), + (r'\S+', Error), + ], + + + # Main parser (prevents errors in files that have scoping errors) + 'root': [ (r'', Text, 'main') ], + + # In this scope, I expect '|' to not be followed by a function name, + # and I expect 'and' to be followed by a binding site + 'main': [ + include('whitespace'), + + # Special behavior of val/and/fun + (r'\b(val|and)\b(?!\')', Keyword.Reserved, 'vname'), + (r'\b(fun)\b(?!\')', Keyword.Reserved, + ('#pop', 'main-fun', 'fname')), + + include('delimiters'), + include('core'), + (r'\S+', Error), + ], + + # In this scope, I expect '|' and 'and' to be followed by a function + 'main-fun': [ + include('whitespace'), + + (r'\s', Text), + (r'\(\*', Comment.Multiline, 'comment'), + + # Special behavior of val/and/fun + (r'\b(fun|and)\b(?!\')', Keyword.Reserved, 'fname'), + (r'\b(val)\b(?!\')', Keyword.Reserved, + ('#pop', 'main', 'vname')), + + # Special behavior of '|' and '|'-manipulating keywords + (r'\|', Punctuation, 'fname'), + (r'\b(case|handle)\b(?!\')', Keyword.Reserved, + ('#pop', 'main')), + + include('delimiters'), + include('core'), + (r'\S+', Error), + ], + + # Character and string parsers + 'char': stringy(String.Char), + 'string': stringy(String.Double), + + 'breakout': [ + (r'(?=\b(%s)\b(?!\'))' % '|'.join(alphanumid_reserved), Text, '#pop'), + ], + + # Dealing with what comes after module system keywords + 'sname': [ + include('whitespace'), + include('breakout'), + + (r'(%s)' % alphanumid_re, Name.Namespace), + (r'', Text, '#pop'), + ], + + # Dealing with what comes after the 'fun' (or 'and' or '|') keyword + 'fname': [ + include('whitespace'), + (r'\'[0-9a-zA-Z_\']*', Name.Decorator), + (r'\(', Punctuation, 'tyvarseq'), + + (r'(%s)' % alphanumid_re, Name.Function, '#pop'), + (r'(%s)' % symbolicid_re, Name.Function, '#pop'), + + # Ignore interesting function declarations like "fun (x + y) = ..." + (r'', Text, '#pop'), + ], + + # Dealing with what comes after the 'val' (or 'and') keyword + 'vname': [ + include('whitespace'), + (r'\'[0-9a-zA-Z_\']*', Name.Decorator), + (r'\(', Punctuation, 'tyvarseq'), + + (r'(%s)(\s*)(=(?!%s))' % (alphanumid_re, symbolicid_re), + bygroups(Name.Variable, Text, Punctuation), '#pop'), + (r'(%s)(\s*)(=(?!%s))' % (symbolicid_re, symbolicid_re), + bygroups(Name.Variable, Text, Punctuation), '#pop'), + (r'(%s)' % alphanumid_re, Name.Variable, '#pop'), + (r'(%s)' % symbolicid_re, Name.Variable, '#pop'), + + # Ignore interesting patterns like 'val (x, y)' + (r'', Text, '#pop'), + ], + + # Dealing with what comes after the 'type' (or 'and') keyword + 'tname': [ + include('whitespace'), + include('breakout'), + + (r'\'[0-9a-zA-Z_\']*', Name.Decorator), + (r'\(', Punctuation, 'tyvarseq'), + (r'=(?!%s)' % symbolicid_re, Punctuation, ('#pop', 'typbind')), + + (r'(%s)' % alphanumid_re, Keyword.Type), + (r'(%s)' % symbolicid_re, Keyword.Type), + (r'\S+', Error, '#pop'), + ], + + # A type binding includes most identifiers + 'typbind': [ + include('whitespace'), + + (r'\b(and)\b(?!\')', Keyword.Reserved, ('#pop', 'tname')), + + include('breakout'), + include('core'), + (r'\S+', Error, '#pop'), + ], + + # Dealing with what comes after the 'datatype' (or 'and') keyword + 'dname': [ + include('whitespace'), + include('breakout'), + + (r'\'[0-9a-zA-Z_\']*', Name.Decorator), + (r'\(', Punctuation, 'tyvarseq'), + (r'(=)(\s*)(datatype)', + bygroups(Punctuation, Text, Keyword.Reserved), '#pop'), + (r'=(?!%s)' % symbolicid_re, Punctuation, + ('#pop', 'datbind', 'datcon')), + + (r'(%s)' % alphanumid_re, Keyword.Type), + (r'(%s)' % symbolicid_re, Keyword.Type), + (r'\S+', Error, '#pop'), + ], + + # common case - A | B | C of int + 'datbind': [ + include('whitespace'), + + (r'\b(and)\b(?!\')', Keyword.Reserved, ('#pop', 'dname')), + (r'\b(withtype)\b(?!\')', Keyword.Reserved, ('#pop', 'tname')), + (r'\b(of)\b(?!\')', Keyword.Reserved), + + (r'(\|)(\s*)(%s)' % alphanumid_re, + bygroups(Punctuation, Text, Name.Class)), + (r'(\|)(\s+)(%s)' % symbolicid_re, + bygroups(Punctuation, Text, Name.Class)), + + include('breakout'), + include('core'), + (r'\S+', Error), + ], + + # Dealing with what comes after an exception + 'ename': [ + include('whitespace'), + + (r'(exception|and)\b(\s+)(%s)' % alphanumid_re, + bygroups(Keyword.Reserved, Text, Name.Class)), + (r'(exception|and)\b(\s*)(%s)' % symbolicid_re, + bygroups(Keyword.Reserved, Text, Name.Class)), + (r'\b(of)\b(?!\')', Keyword.Reserved), + + include('breakout'), + include('core'), + (r'\S+', Error), + ], + + 'datcon': [ + include('whitespace'), + (r'(%s)' % alphanumid_re, Name.Class, '#pop'), + (r'(%s)' % symbolicid_re, Name.Class, '#pop'), + (r'\S+', Error, '#pop'), + ], + + # Series of type variables + 'tyvarseq': [ + (r'\s', Text), + (r'\(\*', Comment.Multiline, 'comment'), + + (r'\'[0-9a-zA-Z_\']*', Name.Decorator), + (r',', Punctuation), + (r'\)', Punctuation, '#pop'), + (r'', Error, '#pop'), + ], + + 'comment': [ + (r'[^(*)]', Comment.Multiline), + (r'\(\*', Comment.Multiline, '#push'), + (r'\*\)', Comment.Multiline, '#pop'), + (r'[(*)]', Comment.Multiline), + ], + } + + class OcamlLexer(RegexLexer): """ For the OCaml language. @@ -570,11 +893,11 @@ class OcamlLexer(RegexLexer): (r"[^\W\d][\w']*", Name), - (r'\d[\d_]*', Number.Integer), + (r'-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)', Number.Float), (r'0[xX][\da-fA-F][\da-fA-F_]*', Number.Hex), (r'0[oO][0-7][0-7_]*', Number.Oct), (r'0[bB][01][01_]*', Number.Binary), - (r'-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)', Number.Float), + (r'\d[\d_]*', Number.Integer), (r"'(?:(\\[\\\"'ntbr ])|(\\[0-9]{3})|(\\x[0-9a-fA-F]{2}))'", String.Char), @@ -656,7 +979,7 @@ class ErlangLexer(RegexLexer): 'universaltime_to_localtime', 'unlink', 'unregister', 'whereis' ] - operators = r'(\+|-|\*|/|<|>|=|==|/=|=:=|=/=|=<|>=|\+\+|--|<-|!)' + operators = r'(\+|-|\*|/|<|>|=|==|/=|=:=|=/=|=<|>=|\+\+|--|<-|!|\?)' word_operators = [ 'and', 'andalso', 'band', 'bnot', 'bor', 'bsl', 'bsr', 'bxor', 'div', 'not', 'or', 'orelse', 'rem', 'xor' diff --git a/pygments/lexers/math.py b/pygments/lexers/math.py index 5f00c08e..de804aa9 100644 --- a/pygments/lexers/math.py +++ b/pygments/lexers/math.py @@ -5,7 +5,7 @@ Lexers for math languages. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -17,8 +17,8 @@ from pygments.token import Comment, String, Punctuation, Keyword, Name, \ from pygments.lexers.agile import PythonLexer -__all__ = ['MuPADLexer', 'MatlabLexer', 'MatlabSessionLexer', 'NumPyLexer', - 'RConsoleLexer', 'SLexer'] +__all__ = ['MuPADLexer', 'MatlabLexer', 'MatlabSessionLexer', 'OctaveLexer', + 'NumPyLexer', 'RConsoleLexer', 'SLexer'] class MuPADLexer(RegexLexer): @@ -94,13 +94,13 @@ class MuPADLexer(RegexLexer): class MatlabLexer(RegexLexer): """ - For Matlab (or GNU Octave) source code. + For Matlab source code. Contributed by Ken Schutte <kschutte@csail.mit.edu>. *New in Pygments 0.10.* """ name = 'Matlab' - aliases = ['matlab', 'octave'] + aliases = ['matlab'] filenames = ['*.m'] mimetypes = ['text/matlab'] @@ -195,11 +195,12 @@ class MatlabLexer(RegexLexer): return 0.9 return 0.1 + line_re = re.compile('.*?\n') class MatlabSessionLexer(Lexer): """ - For Matlab (or GNU Octave) sessions. Modeled after PythonConsoleLexer. + For Matlab sessions. Modeled after PythonConsoleLexer. Contributed by Ken Schutte <kschutte@csail.mit.edu>. *New in Pygments 0.10.* @@ -246,12 +247,404 @@ class MatlabSessionLexer(Lexer): yield item +class OctaveLexer(RegexLexer): + """ + For GNU Octave source code. + + *New in Pygments 1.5.* + """ + name = 'Octave' + aliases = ['octave'] + filenames = ['*.m'] + mimetypes = ['text/octave'] + + # These lists are generated automatically. + # Run the following in bash shell: + # + # First dump all of the Octave manual into a plain text file: + # + # $ info octave --subnodes -o octave-manual + # + # Now grep through it: + + # for i in \ + # "Built-in Function" "Command" "Function File" \ + # "Loadable Function" "Mapping Function"; + # do + # perl -e '@name = qw('"$i"'); + # print lc($name[0]),"_kw = [\n"'; + # + # perl -n -e 'print "\"$1\",\n" if /-- '"$i"': .* (\w*) \(/;' \ + # octave-manual | sort | uniq ; + # echo "]" ; + # echo; + # done + + # taken from Octave Mercurial changeset 8cc154f45e37 (30-jan-2011) + + builtin_kw = [ "addlistener", "addpath", "addproperty", "all", + "and", "any", "argnames", "argv", "assignin", + "atexit", "autoload", + "available_graphics_toolkits", "beep_on_error", + "bitand", "bitmax", "bitor", "bitshift", "bitxor", + "cat", "cell", "cellstr", "char", "class", "clc", + "columns", "command_line_path", + "completion_append_char", "completion_matches", + "complex", "confirm_recursive_rmdir", "cputime", + "crash_dumps_octave_core", "ctranspose", "cumprod", + "cumsum", "debug_on_error", "debug_on_interrupt", + "debug_on_warning", "default_save_options", + "dellistener", "diag", "diff", "disp", + "doc_cache_file", "do_string_escapes", "double", + "drawnow", "e", "echo_executing_commands", "eps", + "eq", "errno", "errno_list", "error", "eval", + "evalin", "exec", "exist", "exit", "eye", "false", + "fclear", "fclose", "fcntl", "fdisp", "feof", + "ferror", "feval", "fflush", "fgetl", "fgets", + "fieldnames", "file_in_loadpath", "file_in_path", + "filemarker", "filesep", "find_dir_in_path", + "fixed_point_format", "fnmatch", "fopen", "fork", + "formula", "fprintf", "fputs", "fread", "freport", + "frewind", "fscanf", "fseek", "fskipl", "ftell", + "functions", "fwrite", "ge", "genpath", "get", + "getegid", "getenv", "geteuid", "getgid", + "getpgrp", "getpid", "getppid", "getuid", "glob", + "gt", "gui_mode", "history_control", + "history_file", "history_size", + "history_timestamp_format_string", "home", + "horzcat", "hypot", "ifelse", + "ignore_function_time_stamp", "inferiorto", + "info_file", "info_program", "inline", "input", + "intmax", "intmin", "ipermute", + "is_absolute_filename", "isargout", "isbool", + "iscell", "iscellstr", "ischar", "iscomplex", + "isempty", "isfield", "isfloat", "isglobal", + "ishandle", "isieee", "isindex", "isinteger", + "islogical", "ismatrix", "ismethod", "isnull", + "isnumeric", "isobject", "isreal", + "is_rooted_relative_filename", "issorted", + "isstruct", "isvarname", "kbhit", "keyboard", + "kill", "lasterr", "lasterror", "lastwarn", + "ldivide", "le", "length", "link", "linspace", + "logical", "lstat", "lt", "make_absolute_filename", + "makeinfo_program", "max_recursion_depth", "merge", + "methods", "mfilename", "minus", "mislocked", + "mkdir", "mkfifo", "mkstemp", "mldivide", "mlock", + "mouse_wheel_zoom", "mpower", "mrdivide", "mtimes", + "munlock", "nargin", "nargout", + "native_float_format", "ndims", "ne", "nfields", + "nnz", "norm", "not", "numel", "nzmax", + "octave_config_info", "octave_core_file_limit", + "octave_core_file_name", + "octave_core_file_options", "ones", "or", + "output_max_field_width", "output_precision", + "page_output_immediately", "page_screen_output", + "path", "pathsep", "pause", "pclose", "permute", + "pi", "pipe", "plus", "popen", "power", + "print_empty_dimensions", "printf", + "print_struct_array_contents", "prod", + "program_invocation_name", "program_name", + "putenv", "puts", "pwd", "quit", "rats", "rdivide", + "readdir", "readlink", "read_readline_init_file", + "realmax", "realmin", "rehash", "rename", + "repelems", "re_read_readline_init_file", "reset", + "reshape", "resize", "restoredefaultpath", + "rethrow", "rmdir", "rmfield", "rmpath", "rows", + "save_header_format_string", "save_precision", + "saving_history", "scanf", "set", "setenv", + "shell_cmd", "sighup_dumps_octave_core", + "sigterm_dumps_octave_core", "silent_functions", + "single", "size", "size_equal", "sizemax", + "sizeof", "sleep", "source", "sparse_auto_mutate", + "split_long_rows", "sprintf", "squeeze", "sscanf", + "stat", "stderr", "stdin", "stdout", "strcmp", + "strcmpi", "string_fill_char", "strncmp", + "strncmpi", "struct", "struct_levels_to_print", + "strvcat", "subsasgn", "subsref", "sum", "sumsq", + "superiorto", "suppress_verbose_help_message", + "symlink", "system", "tic", "tilde_expand", + "times", "tmpfile", "tmpnam", "toc", "toupper", + "transpose", "true", "typeinfo", "umask", "uminus", + "uname", "undo_string_escapes", "unlink", "uplus", + "upper", "usage", "usleep", "vec", "vectorize", + "vertcat", "waitpid", "warning", "warranty", + "whos_line_format", "yes_or_no", "zeros", + "inf", "Inf", "nan", "NaN"] + + command_kw = [ "close", "load", "who", "whos", ] + + function_kw = [ "accumarray", "accumdim", "acosd", "acotd", + "acscd", "addtodate", "allchild", "ancestor", + "anova", "arch_fit", "arch_rnd", "arch_test", + "area", "arma_rnd", "arrayfun", "ascii", "asctime", + "asecd", "asind", "assert", "atand", + "autoreg_matrix", "autumn", "axes", "axis", "bar", + "barh", "bartlett", "bartlett_test", "beep", + "betacdf", "betainv", "betapdf", "betarnd", + "bicgstab", "bicubic", "binary", "binocdf", + "binoinv", "binopdf", "binornd", "bitcmp", + "bitget", "bitset", "blackman", "blanks", + "blkdiag", "bone", "box", "brighten", "calendar", + "cast", "cauchy_cdf", "cauchy_inv", "cauchy_pdf", + "cauchy_rnd", "caxis", "celldisp", "center", "cgs", + "chisquare_test_homogeneity", + "chisquare_test_independence", "circshift", "cla", + "clabel", "clf", "clock", "cloglog", "closereq", + "colon", "colorbar", "colormap", "colperm", + "comet", "common_size", "commutation_matrix", + "compan", "compare_versions", "compass", + "computer", "cond", "condest", "contour", + "contourc", "contourf", "contrast", "conv", + "convhull", "cool", "copper", "copyfile", "cor", + "corrcoef", "cor_test", "cosd", "cotd", "cov", + "cplxpair", "cross", "cscd", "cstrcat", "csvread", + "csvwrite", "ctime", "cumtrapz", "curl", "cut", + "cylinder", "date", "datenum", "datestr", + "datetick", "datevec", "dblquad", "deal", + "deblank", "deconv", "delaunay", "delaunayn", + "delete", "demo", "detrend", "diffpara", "diffuse", + "dir", "discrete_cdf", "discrete_inv", + "discrete_pdf", "discrete_rnd", "display", + "divergence", "dlmwrite", "dos", "dsearch", + "dsearchn", "duplication_matrix", "durbinlevinson", + "ellipsoid", "empirical_cdf", "empirical_inv", + "empirical_pdf", "empirical_rnd", "eomday", + "errorbar", "etime", "etreeplot", "example", + "expcdf", "expinv", "expm", "exppdf", "exprnd", + "ezcontour", "ezcontourf", "ezmesh", "ezmeshc", + "ezplot", "ezpolar", "ezsurf", "ezsurfc", "factor", + "factorial", "fail", "fcdf", "feather", "fftconv", + "fftfilt", "fftshift", "figure", "fileattrib", + "fileparts", "fill", "findall", "findobj", + "findstr", "finv", "flag", "flipdim", "fliplr", + "flipud", "fpdf", "fplot", "fractdiff", "freqz", + "freqz_plot", "frnd", "fsolve", + "f_test_regression", "ftp", "fullfile", "fzero", + "gamcdf", "gaminv", "gampdf", "gamrnd", "gca", + "gcbf", "gcbo", "gcf", "genvarname", "geocdf", + "geoinv", "geopdf", "geornd", "getfield", "ginput", + "glpk", "gls", "gplot", "gradient", + "graphics_toolkit", "gray", "grid", "griddata", + "griddatan", "gtext", "gunzip", "gzip", "hadamard", + "hamming", "hankel", "hanning", "hggroup", + "hidden", "hilb", "hist", "histc", "hold", "hot", + "hotelling_test", "housh", "hsv", "hurst", + "hygecdf", "hygeinv", "hygepdf", "hygernd", + "idivide", "ifftshift", "image", "imagesc", + "imfinfo", "imread", "imshow", "imwrite", "index", + "info", "inpolygon", "inputname", "interpft", + "interpn", "intersect", "invhilb", "iqr", "isa", + "isdefinite", "isdir", "is_duplicate_entry", + "isequal", "isequalwithequalnans", "isfigure", + "ishermitian", "ishghandle", "is_leap_year", + "isletter", "ismac", "ismember", "ispc", "isprime", + "isprop", "isscalar", "issquare", "isstrprop", + "issymmetric", "isunix", "is_valid_file_id", + "isvector", "jet", "kendall", + "kolmogorov_smirnov_cdf", + "kolmogorov_smirnov_test", "kruskal_wallis_test", + "krylov", "kurtosis", "laplace_cdf", "laplace_inv", + "laplace_pdf", "laplace_rnd", "legend", "legendre", + "license", "line", "linkprop", "list_primes", + "loadaudio", "loadobj", "logistic_cdf", + "logistic_inv", "logistic_pdf", "logistic_rnd", + "logit", "loglog", "loglogerr", "logm", "logncdf", + "logninv", "lognpdf", "lognrnd", "logspace", + "lookfor", "ls_command", "lsqnonneg", "magic", + "mahalanobis", "manova", "matlabroot", + "mcnemar_test", "mean", "meansq", "median", "menu", + "mesh", "meshc", "meshgrid", "meshz", "mexext", + "mget", "mkpp", "mode", "moment", "movefile", + "mpoles", "mput", "namelengthmax", "nargchk", + "nargoutchk", "nbincdf", "nbininv", "nbinpdf", + "nbinrnd", "nchoosek", "ndgrid", "newplot", "news", + "nonzeros", "normcdf", "normest", "norminv", + "normpdf", "normrnd", "now", "nthroot", "null", + "ocean", "ols", "onenormest", "optimget", + "optimset", "orderfields", "orient", "orth", + "pack", "pareto", "parseparams", "pascal", "patch", + "pathdef", "pcg", "pchip", "pcolor", "pcr", + "peaks", "periodogram", "perl", "perms", "pie", + "pink", "planerot", "playaudio", "plot", + "plotmatrix", "plotyy", "poisscdf", "poissinv", + "poisspdf", "poissrnd", "polar", "poly", + "polyaffine", "polyarea", "polyderiv", "polyfit", + "polygcd", "polyint", "polyout", "polyreduce", + "polyval", "polyvalm", "postpad", "powerset", + "ppder", "ppint", "ppjumps", "ppplot", "ppval", + "pqpnonneg", "prepad", "primes", "print", + "print_usage", "prism", "probit", "qp", "qqplot", + "quadcc", "quadgk", "quadl", "quadv", "quiver", + "qzhess", "rainbow", "randi", "range", "rank", + "ranks", "rat", "reallog", "realpow", "realsqrt", + "record", "rectangle_lw", "rectangle_sw", + "rectint", "refresh", "refreshdata", + "regexptranslate", "repmat", "residue", "ribbon", + "rindex", "roots", "rose", "rosser", "rotdim", + "rref", "run", "run_count", "rundemos", "run_test", + "runtests", "saveas", "saveaudio", "saveobj", + "savepath", "scatter", "secd", "semilogx", + "semilogxerr", "semilogy", "semilogyerr", + "setaudio", "setdiff", "setfield", "setxor", + "shading", "shift", "shiftdim", "sign_test", + "sinc", "sind", "sinetone", "sinewave", "skewness", + "slice", "sombrero", "sortrows", "spaugment", + "spconvert", "spdiags", "spearman", "spectral_adf", + "spectral_xdf", "specular", "speed", "spencer", + "speye", "spfun", "sphere", "spinmap", "spline", + "spones", "sprand", "sprandn", "sprandsym", + "spring", "spstats", "spy", "sqp", "stairs", + "statistics", "std", "stdnormal_cdf", + "stdnormal_inv", "stdnormal_pdf", "stdnormal_rnd", + "stem", "stft", "strcat", "strchr", "strjust", + "strmatch", "strread", "strsplit", "strtok", + "strtrim", "strtrunc", "structfun", "studentize", + "subplot", "subsindex", "subspace", "substr", + "substruct", "summer", "surf", "surface", "surfc", + "surfl", "surfnorm", "svds", "swapbytes", + "sylvester_matrix", "symvar", "synthesis", "table", + "tand", "tar", "tcdf", "tempdir", "tempname", + "test", "text", "textread", "textscan", "tinv", + "title", "toeplitz", "tpdf", "trace", "trapz", + "treelayout", "treeplot", "triangle_lw", + "triangle_sw", "tril", "trimesh", "triplequad", + "triplot", "trisurf", "triu", "trnd", "tsearchn", + "t_test", "t_test_regression", "type", "unidcdf", + "unidinv", "unidpdf", "unidrnd", "unifcdf", + "unifinv", "unifpdf", "unifrnd", "union", "unique", + "unix", "unmkpp", "unpack", "untabify", "untar", + "unwrap", "unzip", "u_test", "validatestring", + "vander", "var", "var_test", "vech", "ver", + "version", "view", "voronoi", "voronoin", + "waitforbuttonpress", "wavread", "wavwrite", + "wblcdf", "wblinv", "wblpdf", "wblrnd", "weekday", + "welch_test", "what", "white", "whitebg", + "wienrnd", "wilcoxon_test", "wilkinson", "winter", + "xlabel", "xlim", "ylabel", "yulewalker", "zip", + "zlabel", "z_test", ] + + loadable_kw = [ "airy", "amd", "balance", "besselh", "besseli", + "besselj", "besselk", "bessely", "bitpack", + "bsxfun", "builtin", "ccolamd", "cellfun", + "cellslices", "chol", "choldelete", "cholinsert", + "cholinv", "cholshift", "cholupdate", "colamd", + "colloc", "convhulln", "convn", "csymamd", + "cummax", "cummin", "daspk", "daspk_options", + "dasrt", "dasrt_options", "dassl", "dassl_options", + "dbclear", "dbdown", "dbstack", "dbstatus", + "dbstop", "dbtype", "dbup", "dbwhere", "det", + "dlmread", "dmperm", "dot", "eig", "eigs", + "endgrent", "endpwent", "etree", "fft", "fftn", + "fftw", "filter", "find", "full", "gcd", + "getgrent", "getgrgid", "getgrnam", "getpwent", + "getpwnam", "getpwuid", "getrusage", "givens", + "gmtime", "gnuplot_binary", "hess", "ifft", + "ifftn", "inv", "isdebugmode", "issparse", "kron", + "localtime", "lookup", "lsode", "lsode_options", + "lu", "luinc", "luupdate", "matrix_type", "max", + "min", "mktime", "pinv", "qr", "qrdelete", + "qrinsert", "qrshift", "qrupdate", "quad", + "quad_options", "qz", "rand", "rande", "randg", + "randn", "randp", "randperm", "rcond", "regexp", + "regexpi", "regexprep", "schur", "setgrent", + "setpwent", "sort", "spalloc", "sparse", "spparms", + "sprank", "sqrtm", "strfind", "strftime", + "strptime", "strrep", "svd", "svd_driver", "syl", + "symamd", "symbfact", "symrcm", "time", "tsearch", + "typecast", "urlread", "urlwrite", ] + + mapping_kw = [ "abs", "acos", "acosh", "acot", "acoth", "acsc", + "acsch", "angle", "arg", "asec", "asech", "asin", + "asinh", "atan", "atanh", "beta", "betainc", + "betaln", "bincoeff", "cbrt", "ceil", "conj", "cos", + "cosh", "cot", "coth", "csc", "csch", "erf", "erfc", + "erfcx", "erfinv", "exp", "finite", "fix", "floor", + "fmod", "gamma", "gammainc", "gammaln", "imag", + "isalnum", "isalpha", "isascii", "iscntrl", + "isdigit", "isfinite", "isgraph", "isinf", + "islower", "isna", "isnan", "isprint", "ispunct", + "isspace", "isupper", "isxdigit", "lcm", "lgamma", + "log", "lower", "mod", "real", "rem", "round", + "roundb", "sec", "sech", "sign", "sin", "sinh", + "sqrt", "tan", "tanh", "toascii", "tolower", "xor", + ] + + builtin_consts = [ "EDITOR", "EXEC_PATH", "I", "IMAGE_PATH", "NA", + "OCTAVE_HOME", "OCTAVE_VERSION", "PAGER", + "PAGER_FLAGS", "SEEK_CUR", "SEEK_END", "SEEK_SET", + "SIG", "S_ISBLK", "S_ISCHR", "S_ISDIR", "S_ISFIFO", + "S_ISLNK", "S_ISREG", "S_ISSOCK", "WCONTINUE", + "WCOREDUMP", "WEXITSTATUS", "WIFCONTINUED", + "WIFEXITED", "WIFSIGNALED", "WIFSTOPPED", "WNOHANG", + "WSTOPSIG", "WTERMSIG", "WUNTRACED", ] + + tokens = { + 'root': [ + #We should look into multiline comments + (r'[%#].*$', Comment), + (r'^\s*function', Keyword, 'deffunc'), + + # from 'iskeyword' on hg changeset 8cc154f45e37 + (r'(__FILE__|__LINE__|break|case|catch|classdef|continue|do|else|' + r'elseif|end|end_try_catch|end_unwind_protect|endclassdef|' + r'endevents|endfor|endfunction|endif|endmethods|endproperties|' + r'endswitch|endwhile|events|for|function|get|global|if|methods|' + r'otherwise|persistent|properties|return|set|static|switch|try|' + r'until|unwind_protect|unwind_protect_cleanup|while)\b', Keyword), + + ("(" + "|".join( builtin_kw + command_kw + + function_kw + loadable_kw + + mapping_kw) + r')\b', Name.Builtin), + + ("(" + "|".join(builtin_consts) + r')\b', Name.Constant), + + # operators in Octave but not Matlab: + (r'-=|!=|!|/=|--', Operator), + # operators: + (r'-|==|~=|<|>|<=|>=|&&|&|~|\|\|?', Operator), + # operators in Octave but not Matlab requiring escape for re: + (r'\*=|\+=|\^=|\/=|\\=|\*\*|\+\+|\.\*\*',Operator), + # operators requiring escape for re: + (r'\.\*|\*|\+|\.\^|\.\\|\.\/|\/|\\', Operator), + + + # punctuation: + (r'\[|\]|\(|\)|\{|\}|:|@|\.|,', Punctuation), + (r'=|:|;', Punctuation), + + (r'"[^"]*"', String), + + # quote can be transpose, instead of string: + # (not great, but handles common cases...) + (r'(?<=[\w\)\]])\'', Operator), + (r'(?<![\w\)\]])\'', String, 'string'), + + ('[a-zA-Z_][a-zA-Z0-9_]*', Name), + (r'.', Text), + ], + 'string': [ + (r"[^']*'", String, '#pop'), + ], + 'deffunc': [ + (r'(\s*)(?:(.+)(\s*)(=)(\s*))?(.+)(\()(.*)(\))(\s*)', + bygroups(Text.Whitespace, Text, Text.Whitespace, Punctuation, + Text.Whitespace, Name.Function, Punctuation, Text, + Punctuation, Text.Whitespace), '#pop'), + ], + } + + def analyse_text(text): + if re.match('^\s*[%#]', text, re.M): #Comment + return 0.9 + return 0.1 + + class NumPyLexer(PythonLexer): - ''' + """ A Python lexer recognizing Numerical Python builtins. *New in Pygments 0.10.* - ''' + """ name = 'NumPy' aliases = ['numpy'] diff --git a/pygments/lexers/other.py b/pygments/lexers/other.py index 69e4ccb7..c211f07d 100644 --- a/pygments/lexers/other.py +++ b/pygments/lexers/other.py @@ -5,14 +5,14 @@ Lexers for other languages. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import Lexer, RegexLexer, include, bygroups, using, \ - this, do_insertions + this, do_insertions, combined from pygments.token import Error, Punctuation, Literal, Token, \ Text, Comment, Operator, Keyword, Name, String, Number, Generic from pygments.util import shebang_matches @@ -26,7 +26,7 @@ __all__ = ['SqlLexer', 'MySqlLexer', 'SqliteConsoleLexer', 'BrainfuckLexer', 'BashSessionLexer', 'ModelicaLexer', 'RebolLexer', 'ABAPLexer', 'NewspeakLexer', 'GherkinLexer', 'AsymptoteLexer', 'PostScriptLexer', 'AutohotkeyLexer', 'GoodDataCLLexer', - 'MaqlLexer', 'ProtoBufLexer', 'HybrisLexer'] + 'MaqlLexer', 'ProtoBufLexer', 'HybrisLexer', 'AwkLexer'] line_re = re.compile('.*?\n') @@ -817,7 +817,7 @@ class LogtalkLexer(RegexLexer): Keyword), (r'(object|protocol|category)_property(?=[(])', Keyword), # Entity relations - (r'complements_object(?=[(])', Keyword), + (r'co(mplements_object|nforms_to_protocol)(?=[(])', Keyword), (r'extends_(object|protocol|category)(?=[(])', Keyword), (r'imp(lements_protocol|orts_category)(?=[(])', Keyword), (r'(instantiat|specializ)es_class(?=[(])', Keyword), @@ -826,11 +826,12 @@ class LogtalkLexer(RegexLexer): # Flags (r'(current|set)_logtalk_flag(?=[(])', Keyword), # Compiling, loading, and library paths - (r'logtalk_(compile|l(ibrary_path|oad))(?=[(])', Keyword), + (r'logtalk_(compile|l(ibrary_path|oad_context|oad))(?=[(])', + Keyword), # Database (r'(clause|retract(all)?)(?=[(])', Keyword), (r'a(bolish|ssert(a|z))(?=[(])', Keyword), - # Control + # Control constructs (r'(ca(ll|tch)|throw)(?=[(])', Keyword), (r'(fail|true)\b', Keyword), # All solutions @@ -841,7 +842,7 @@ class LogtalkLexer(RegexLexer): # Term unification (r'unify_with_occurs_check(?=[(])', Keyword), # Term creation and decomposition - (r'(functor|arg|copy_term)(?=[(])', Keyword), + (r'(functor|arg|copy_term|numbervars)(?=[(])', Keyword), # Evaluable functors (r'(rem|mod|abs|sign)(?=[(])', Keyword), (r'float(_(integer|fractional)_part)?(?=[(])', Keyword), @@ -849,8 +850,10 @@ class LogtalkLexer(RegexLexer): # Other arithmetic functors (r'(cos|atan|exp|log|s(in|qrt))(?=[(])', Keyword), # Term testing - (r'(var|atom(ic)?|integer|float|compound|n(onvar|umber))(?=[(])', - Keyword), + (r'(var|atom(ic)?|integer|float|c(allable|ompound)|n(onvar|umber)|' + r'ground)(?=[(])', Keyword), + # Term comparison + (r'compare(?=[(])', Keyword), # Stream selection and control (r'(curren|se)t_(in|out)put(?=[(])', Keyword), (r'(open|close)(?=[(])', Keyword), @@ -879,8 +882,10 @@ class LogtalkLexer(RegexLexer): # External call (r'[{}]', Keyword), # Logic and control - (r'\bonce(?=[(])', Keyword), + (r'\b(ignore|once)(?=[(])', Keyword), (r'\brepeat\b', Keyword), + # Sorting + (r'(key)?sort(?=[(])', Keyword), # Bitwise functors (r'(>>|<<|/\\|\\\\|\\)', Operator), # Arithemtic evaluation @@ -895,7 +900,7 @@ class LogtalkLexer(RegexLexer): (r'(==|\\==|@=<|@<|@>=|@>)', Operator), # Evaluable functors (r'(//|[-+*/])', Operator), - (r'\b(mod|rem)\b', Operator), + (r'\b(e|pi|mod|rem)\b', Operator), # Other arithemtic functors (r'\b\*\*\b', Operator), # DCG rules @@ -906,6 +911,8 @@ class LogtalkLexer(RegexLexer): (r'\\+', Operator), # Mode operators (r'[?@]', Operator), + # Existential quantifier + (r'\^', Operator), # Strings (r'"(\\\\|\\"|[^"])*"', String), # Ponctuation @@ -937,16 +944,18 @@ class LogtalkLexer(RegexLexer): (r'in(fo|itialization)(?=[(])', Keyword, 'root'), (r'(dynamic|synchronized|threaded)[.]', Keyword, 'root'), (r'(alias|d(ynamic|iscontiguous)|m(eta_predicate|ode|ultifile)|' - r's(et_(logtalk|prolog)_flag|ynchronized))(?=[(])', Keyword, 'root'), + r's(et_(logtalk|prolog)_flag|ynchronized))(?=[(])', + Keyword, 'root'), (r'op(?=[(])', Keyword, 'root'), - (r'(calls|reexport|use(s|_module))(?=[(])', Keyword, 'root'), + (r'(c(alls|oinductive)|reexport|use(s|_module))(?=[(])', + Keyword, 'root'), (r'[a-z][a-zA-Z0-9_]*(?=[(])', Text, 'root'), (r'[a-z][a-zA-Z0-9_]*[.]', Text, 'root'), ], 'entityrelations': [ - (r'(extends|i(nstantiates|mp(lements|orts))|specializes)(?=[(])', - Keyword), + (r'(complements|extends|i(nstantiates|mp(lements|orts))|specializes)' + r'(?=[(])', Keyword), # Numbers (r"0'.", Number), (r'0b[01]+', Number), @@ -2419,198 +2428,177 @@ class AutohotkeyLexer(RegexLexer): filenames = ['*.ahk', '*.ahkl'] mimetypes = ['text/x-autohotkey'] - flags = re.IGNORECASE | re.DOTALL | re.MULTILINE - tokens = { 'root': [ - include('whitespace'), - (r'^\(', String, 'continuation'), - include('comments'), - (r'(^\s*)(\w+)(\s*)(=)', - bygroups(Text.Whitespace, Name, Text.Whitespace, Operator), - 'command'), - (r'([\w#@$?\[\]]+)(\s*)(\()', - bygroups(Name.Function, Text.Whitespace, Punctuation), - 'parameters'), - include('directives'), - include('labels'), + (r'^(\s*)(/\*)', bygroups(Text, Comment.Multiline), + 'incomment'), + (r'^(\s*)(\()', bygroups(Text, Generic), 'incontinuation'), + (r'\s+;.*?$', Comment.Singleline), + (r'^;.*?$', Comment.Singleline), + (r'[]{}(),;[]', Punctuation), + (r'(in|is|and|or|not)\b', Operator.Word), + (r'\%[a-zA-Z_#@$][a-zA-Z0-9_#@$]*\%', Name.Variable), + (r'!=|==|:=|\.=|<<|>>|[-~+/*%=<>&^|?:!.]', Operator), include('commands'), - include('expressions'), + include('labels'), + include('builtInFunctions'), + include('builtInVariables'), + (r'"', String, combined('stringescape', 'dqs')), include('numbers'), - include('literals'), - include('keynames'), - include('keywords'), + (r'[a-zA-Z_#@$][a-zA-Z0-9_#@$]*', Name), + (r'\\|\'', Text), + (r'\`([\,\%\`abfnrtv\-\+;])', String.Escape), + include('garbage'), ], - 'command': [ - include('comments'), - include('whitespace'), - (r'^\(', String, 'continuation'), - (r'[^\n]*?(?=;*|$)', String, '#pop'), - include('numbers'), - include('literals'), + 'incomment': [ + (r'^\s*\*/', Comment.Multiline, '#pop'), + (r'[^*/]', Comment.Multiline), + (r'[*/]', Comment.Multiline) ], - - 'expressions': [ - include('comments'), - include('whitespace'), - include('numbers'), - include('literals'), - (r'([]\w#@$?[]+)(\s*)(\()', - bygroups(Name.Function, Text.Whitespace, Punctuation), - 'parameters'), - (r'A_\w+', Name.Builtin), - (r'%[]\w#@$?[]+?%', Name.Variable), - # blocks: if, else, function definitions - (r'{', Punctuation, 'block'), - # parameters in function calls - ], - 'literals': [ - (r'"', String, 'string'), - (r'A_\w+', Name.Builtin), - (r'%[]\w#@$?[]+?%', Name.Variable), - (r'[-~!%^&*+|?:<>/=]=?', Operator, 'expressions'), - (r'==', Operator, 'expressions'), - ('[{()},.%#`;]', Punctuation), - (r'\\', Punctuation), - include('keywords'), - (r'\w+', Text), - ], - 'string': [ - (r'"', String, '#pop'), - (r'""|`.', String.Escape), - (r'[^\`"\n]+', String), # all other characters + 'incontinuation': [ + (r'^\s*\)', Generic, '#pop'), + (r'[^)]', Generic), + (r'[)]', Generic), ], - 'block': [ - include('root'), - ('{', Punctuation, '#push'), - ('}', Punctuation, '#pop'), - ], - 'parameters': [ - (r'\)', Punctuation, '#pop'), - (r'\(', Punctuation, '#push'), - include('numbers'), - include('literals'), - include('whitespace'), + 'commands': [ + (r'(?i)^(\s*)(global|local|static|' + r'#AllowSameLineComments|#ClipboardTimeout|#CommentFlag|' + r'#ErrorStdOut|#EscapeChar|#HotkeyInterval|#HotkeyModifierTimeout|' + r'#Hotstring|#IfWinActive|#IfWinExist|#IfWinNotActive|' + r'#IfWinNotExist|#IncludeAgain|#Include|#InstallKeybdHook|' + r'#InstallMouseHook|#KeyHistory|#LTrim|#MaxHotkeysPerInterval|' + r'#MaxMem|#MaxThreads|#MaxThreadsBuffer|#MaxThreadsPerHotkey|' + r'#NoEnv|#NoTrayIcon|#Persistent|#SingleInstance|#UseHook|' + r'#WinActivateForce|AutoTrim|BlockInput|Break|Click|ClipWait|' + r'Continue|Control|ControlClick|ControlFocus|ControlGetFocus|' + r'ControlGetPos|ControlGetText|ControlGet|ControlMove|ControlSend|' + r'ControlSendRaw|ControlSetText|CoordMode|Critical|' + r'DetectHiddenText|DetectHiddenWindows|Drive|DriveGet|' + r'DriveSpaceFree|Edit|Else|EnvAdd|EnvDiv|EnvGet|EnvMult|EnvSet|' + r'EnvSub|EnvUpdate|Exit|ExitApp|FileAppend|' + r'FileCopy|FileCopyDir|FileCreateDir|FileCreateShortcut|' + r'FileDelete|FileGetAttrib|FileGetShortcut|FileGetSize|' + r'FileGetTime|FileGetVersion|FileInstall|FileMove|FileMoveDir|' + r'FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|' + r'FileRemoveDir|FileSelectFile|FileSelectFolder|FileSetAttrib|' + r'FileSetTime|FormatTime|GetKeyState|Gosub|Goto|GroupActivate|' + r'GroupAdd|GroupClose|GroupDeactivate|Gui|GuiControl|' + r'GuiControlGet|Hotkey|IfEqual|IfExist|IfGreaterOrEqual|IfGreater|' + r'IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|' + r'IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|' + r'IfWinNotExist|If |ImageSearch|IniDelete|IniRead|IniWrite|' + r'InputBox|Input|KeyHistory|KeyWait|ListHotkeys|ListLines|' + r'ListVars|Loop|Menu|MouseClickDrag|MouseClick|MouseGetPos|' + r'MouseMove|MsgBox|OnExit|OutputDebug|Pause|PixelGetColor|' + r'PixelSearch|PostMessage|Process|Progress|Random|RegDelete|' + r'RegRead|RegWrite|Reload|Repeat|Return|RunAs|RunWait|Run|' + r'SendEvent|SendInput|SendMessage|SendMode|SendPlay|SendRaw|Send|' + r'SetBatchLines|SetCapslockState|SetControlDelay|' + r'SetDefaultMouseSpeed|SetEnv|SetFormat|SetKeyDelay|' + r'SetMouseDelay|SetNumlockState|SetScrollLockState|' + r'SetStoreCapslockMode|SetTimer|SetTitleMatchMode|' + r'SetWinDelay|SetWorkingDir|Shutdown|Sleep|Sort|SoundBeep|' + r'SoundGet|SoundGetWaveVolume|SoundPlay|SoundSet|' + r'SoundSetWaveVolume|SplashImage|SplashTextOff|SplashTextOn|' + r'SplitPath|StatusBarGetText|StatusBarWait|StringCaseSense|' + r'StringGetPos|StringLeft|StringLen|StringLower|StringMid|' + r'StringReplace|StringRight|StringSplit|StringTrimLeft|' + r'StringTrimRight|StringUpper|Suspend|SysGet|Thread|ToolTip|' + r'Transform|TrayTip|URLDownloadToFile|While|WinActivate|' + r'WinActivateBottom|WinClose|WinGetActiveStats|WinGetActiveTitle|' + r'WinGetClass|WinGetPos|WinGetText|WinGetTitle|WinGet|WinHide|' + r'WinKill|WinMaximize|WinMenuSelectItem|WinMinimizeAllUndo|' + r'WinMinimizeAll|WinMinimize|WinMove|WinRestore|WinSetTitle|' + r'WinSet|WinShow|WinWaitActive|WinWaitClose|WinWaitNotActive|' + r'WinWait)\b', bygroups(Text, Name.Builtin)), + ], + 'builtInFunctions': [ + (r'(?i)(Abs|ACos|Asc|ASin|ATan|Ceil|Chr|Cos|DllCall|Exp|FileExist|' + r'Floor|GetKeyState|IL_Add|IL_Create|IL_Destroy|InStr|IsFunc|' + r'IsLabel|Ln|Log|LV_Add|LV_Delete|LV_DeleteCol|LV_GetCount|' + r'LV_GetNext|LV_GetText|LV_Insert|LV_InsertCol|LV_Modify|' + r'LV_ModifyCol|LV_SetImageList|Mod|NumGet|NumPut|OnMessage|' + r'RegExMatch|RegExReplace|RegisterCallback|Round|SB_SetIcon|' + r'SB_SetParts|SB_SetText|Sin|Sqrt|StrLen|SubStr|Tan|TV_Add|' + r'TV_Delete|TV_GetChild|TV_GetCount|TV_GetNext|TV_Get|' + r'TV_GetParent|TV_GetPrev|TV_GetSelection|TV_GetText|TV_Modify|' + r'VarSetCapacity|WinActive|WinExist|Object|ComObjActive|' + r'ComObjArray|ComObjEnwrap|ComObjUnwrap|ComObjParameter|' + r'ComObjType|ComObjConnect|ComObjCreate|ComObjGet|ComObjError|' + r'ComObjValue|Insert|MinIndex|MaxIndex|Remove|SetCapacity|' + r'GetCapacity|GetAddress|_NewEnum|FileOpen|Read|Write|ReadLine|' + r'WriteLine|ReadNumType|WriteNumType|RawRead|RawWrite|Seek|Tell|' + r'Close|Next|IsObject|StrPut|StrGet|Trim|LTrim|RTrim)\b', + Name.Function), + ], + 'builtInVariables': [ + (r'(?i)(A_AhkPath|A_AhkVersion|A_AppData|A_AppDataCommon|' + r'A_AutoTrim|A_BatchLines|A_CaretX|A_CaretY|A_ComputerName|' + r'A_ControlDelay|A_Cursor|A_DDDD|A_DDD|A_DD|A_DefaultMouseSpeed|' + r'A_Desktop|A_DesktopCommon|A_DetectHiddenText|' + r'A_DetectHiddenWindows|A_EndChar|A_EventInfo|A_ExitReason|' + r'A_FormatFloat|A_FormatInteger|A_Gui|A_GuiEvent|A_GuiControl|' + r'A_GuiControlEvent|A_GuiHeight|A_GuiWidth|A_GuiX|A_GuiY|A_Hour|' + r'A_IconFile|A_IconHidden|A_IconNumber|A_IconTip|A_Index|' + r'A_IPAddress1|A_IPAddress2|A_IPAddress3|A_IPAddress4|A_ISAdmin|' + r'A_IsCompiled|A_IsCritical|A_IsPaused|A_IsSuspended|A_KeyDelay|' + r'A_Language|A_LastError|A_LineFile|A_LineNumber|A_LoopField|' + r'A_LoopFileAttrib|A_LoopFileDir|A_LoopFileExt|A_LoopFileFullPath|' + r'A_LoopFileLongPath|A_LoopFileName|A_LoopFileShortName|' + r'A_LoopFileShortPath|A_LoopFileSize|A_LoopFileSizeKB|' + r'A_LoopFileSizeMB|A_LoopFileTimeAccessed|A_LoopFileTimeCreated|' + r'A_LoopFileTimeModified|A_LoopReadLine|A_LoopRegKey|' + r'A_LoopRegName|A_LoopRegSubkey|A_LoopRegTimeModified|' + r'A_LoopRegType|A_MDAY|A_Min|A_MM|A_MMM|A_MMMM|A_Mon|A_MouseDelay|' + r'A_MSec|A_MyDocuments|A_Now|A_NowUTC|A_NumBatchLines|A_OSType|' + r'A_OSVersion|A_PriorHotkey|A_ProgramFiles|A_Programs|' + r'A_ProgramsCommon|A_ScreenHeight|A_ScreenWidth|A_ScriptDir|' + r'A_ScriptFullPath|A_ScriptName|A_Sec|A_Space|A_StartMenu|' + r'A_StartMenuCommon|A_Startup|A_StartupCommon|A_StringCaseSense|' + r'A_Tab|A_Temp|A_ThisFunc|A_ThisHotkey|A_ThisLabel|A_ThisMenu|' + r'A_ThisMenuItem|A_ThisMenuItemPos|A_TickCount|A_TimeIdle|' + r'A_TimeIdlePhysical|A_TimeSincePriorHotkey|A_TimeSinceThisHotkey|' + r'A_TitleMatchMode|A_TitleMatchModeSpeed|A_UserName|A_WDay|' + r'A_WinDelay|A_WinDir|A_WorkingDir|A_YDay|A_YEAR|A_YWeek|A_YYYY|' + r'Clipboard|ClipboardAll|ComSpec|ErrorLevel|ProgramFiles|True|' + r'False|A_IsUnicode|A_FileEncoding|A_OSVersion|A_PtrSize)\b', + Name.Variable), ], - 'keywords': [ - (r'(static|global|local)\b', Keyword.Type), - (r'(if|else|and|or)\b', Keyword.Reserved), - ], - 'directives': [ - (r'#\w+?\s', Keyword), - ], 'labels': [ # hotkeys and labels # technically, hotkey names are limited to named keys and buttons - (r'(^\s*)([^:\s]+?:{1,2})', bygroups(Text.Whitespace, Name.Label)), - # hotstrings - (r'(^\s*)(::[]\w#@$?[]+?::)', bygroups(Text.Whitespace, Name.Label)), - ], - 'comments': [ - (r'^;+.*?$', Comment.Single), # beginning of line comments - (r'(?<=\s);+.*?$', Comment.Single), # end of line comments - (r'^/\*.*?\n\*/', Comment.Multiline), - (r'(?<!\n)/\*.*?\n\*/', Error), # must be at start of line - ], - 'whitespace': [ - (r'[ \t]+', Text.Whitespace), - ], + (r'(^\s*)([^:\s\(\"]+?:{1,2})', bygroups(Text, Name.Label)), + (r'(^\s*)(::[^:\s]+?::)', bygroups(Text, Name.Label)), + ], 'numbers': [ (r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number.Float), (r'\d+[eE][+-]?[0-9]+', Number.Float), - (r'0[0-7]+', Number.Oct), + (r'0\d+', Number.Oct), (r'0[xX][a-fA-F0-9]+', Number.Hex), (r'\d+L', Number.Integer.Long), (r'\d+', Number.Integer) ], - 'continuation': [ - (r'\n\)', Punctuation, '#pop'), - (r'\s[^\n\)]+', String), + 'stringescape': [ + (r'\"\"|\`([\,\%\`abfnrtv])', String.Escape), ], - 'keynames': [ - (r'\[[^\]]+\]', Keyword, 'keynames') + 'strings': [ + (r'[^"\n]+', String), ], - 'commands': [ - (r'(autotrim|blockinput|break|click|' - r'clipwait|continue|control|' - r'controlclick|controlfocus|controlget|' - r'controlgetfocus|controlgetpos|controlgettext|' - r'controlmove|controlsend|controlsendraw|' - r'controlsettext|coordmode|critical|' - r'detecthiddentext|detecthiddenwindows|' - r'dllcall|drive|' - r'driveget|drivespacefree|' - r'else|envadd|envdiv|' - r'envget|envmult|envset|' - r'envsub|envupdate|exit|' - r'exitapp|fileappend|filecopy|' - r'filecopydir|filecreatedir|filecreateshortcut|' - r'filedelete|filegetattrib|filegetshortcut|' - r'filegetsize|filegettime|filegetversion|' - r'fileinstall|filemove|filemovedir|' - r'fileread|filereadline|filerecycle|' - r'filerecycleempty|fileremovedir|fileselectfile|' - r'fileselectfolder|filesetattrib|filesettime|' - r'formattime|gosub|' - r'goto|groupactivate|groupadd|' - r'groupclose|groupdeactivate|gui|' - r'guicontrol|guicontrolget|hotkey|' - r'ifexist|ifgreater|ifgreaterorequal|' - r'ifinstring|ifless|iflessorequal|' - r'ifmsgbox|ifnotequal|ifnotexist|' - r'ifnotinstring|ifwinactive|ifwinexist|' - r'ifwinnotactive|ifwinnotexist|imagesearch|' - r'inidelete|iniread|iniwrite|' - r'input|inputbox|keyhistory|' - r'keywait|listhotkeys|listlines|' - r'listvars|loop|' - r'menu|mouseclick|mouseclickdrag|' - r'mousegetpos|mousemove|msgbox|' - r'onmessage|onexit|outputdebug|' - r'pixelgetcolor|pixelsearch|postmessage|' - r'process|progress|random|' - r'regexmatch|regexreplace|registercallback|' - r'regdelete|regread|regwrite|' - r'reload|repeat|return|' - r'run|runas|runwait|' - r'send|sendevent|sendinput|' - r'sendmessage|sendmode|sendplay|' - r'sendraw|setbatchlines|setcapslockstate|' - r'setcontroldelay|setdefaultmousespeed|setenv|' - r'setformat|setkeydelay|setmousedelay|' - r'setnumlockstate|setscrolllockstate|' - r'setstorecapslockmode|' - r'settimer|settitlematchmode|setwindelay|' - r'setworkingdir|shutdown|sleep|' - r'sort|soundbeep|soundget|' - r'soundgetwavevolume|soundplay|soundset|' - r'soundsetwavevolume|splashimage|splashtextoff|' - r'splashtexton|splitpath|statusbargettext|' - r'statusbarwait|stringcasesense|stringgetpos|' - r'stringleft|stringlen|stringlower|' - r'stringmid|stringreplace|stringright|' - r'stringsplit|stringtrimleft|stringtrimright|' - r'stringupper|suspend|sysget|' - r'thread|tooltip|transform|' - r'traytip|urldownloadtofile|while|' - r'varsetcapacity|' - r'winactivate|winactivatebottom|winclose|' - r'winget|wingetactivestats|wingetactivetitle|' - r'wingetclass|wingetpos|wingettext|' - r'wingettitle|winhide|winkill|' - r'winmaximize|winmenuselectitem|winminimize|' - r'winminimizeall|winminimizeallundo|winmove|' - r'winrestore|winset|winsettitle|' - r'winshow|winwait|winwaitactive|' - r'winwaitclose|winwaitnotactive' - r'true|false|NULL)\b', Keyword, 'command'), - ], + 'dqs': [ + (r'"', String, '#pop'), + include('strings') + ], + 'garbage': [ + (r'[^\S\n]', Text), + # (r'.', Text), # no cheating + ], + } - } class MaqlLexer(RegexLexer): """ - Lexer for `GoodData MAQL <https://secure.gooddata.com/docs/html/advanced.metric.tutorial.html>`_ + Lexer for `GoodData MAQL + <https://secure.gooddata.com/docs/html/advanced.metric.tutorial.html>`_ scripts. *New in Pygments 1.4.* @@ -2841,3 +2829,57 @@ class HybrisLexer(RegexLexer): (r'[a-zA-Z0-9_.]+\*?', Name.Namespace, '#pop') ], } + + +class AwkLexer(RegexLexer): + """ + For Awk scripts. + + *New in Pygments 1.5.* + """ + + name = 'Awk' + aliases = ['awk', 'gawk', 'mawk', 'nawk'] + filenames = ['*.awk'] + mimetypes = ['application/x-awk'] + + tokens = { + 'commentsandwhitespace': [ + (r'\s+', Text), + (r'#.*$', Comment.Single) + ], + 'slashstartsregex': [ + include('commentsandwhitespace'), + (r'/(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/' + r'\B', String.Regex, '#pop'), + (r'(?=/)', Text, ('#pop', 'badregex')), + (r'', Text, '#pop') + ], + 'badregex': [ + ('\n', Text, '#pop') + ], + 'root': [ + (r'^(?=\s|/)', Text, 'slashstartsregex'), + include('commentsandwhitespace'), + (r'\+\+|--|\|\||&&|in|\$|!?~|' + r'(\*\*|[-<>+*%\^/!=])=?', Operator, 'slashstartsregex'), + (r'[{(\[;,]', Punctuation, 'slashstartsregex'), + (r'[})\].]', Punctuation), + (r'(break|continue|do|while|exit|for|if|' + r'return)\b', Keyword, 'slashstartsregex'), + (r'function\b', Keyword.Declaration, 'slashstartsregex'), + (r'(atan2|cos|exp|int|log|rand|sin|sqrt|srand|gensub|gsub|index|' + r'length|match|split|sprintf|sub|substr|tolower|toupper|close|' + r'fflush|getline|next|nextfile|print|printf|strftime|systime|' + r'delete|system)\b', Keyword.Reserved), + (r'(ARGC|ARGIND|ARGV|CONVFMT|ENVIRON|ERRNO|FIELDWIDTHS|FILENAME|FNR|FS|' + r'IGNORECASE|NF|NR|OFMT|OFS|ORFS|RLENGTH|RS|RSTART|RT|' + r'SUBSEP)\b', Name.Builtin), + (r'[$a-zA-Z_][a-zA-Z0-9_]*', Name.Other), + (r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float), + (r'0x[0-9a-fA-F]+', Number.Hex), + (r'[0-9]+', Number.Integer), + (r'"(\\\\|\\"|[^"])*"', String.Double), + (r"'(\\\\|\\'|[^'])*'", String.Single), + ] + } diff --git a/pygments/lexers/parsers.py b/pygments/lexers/parsers.py index 0ead39be..b2310488 100644 --- a/pygments/lexers/parsers.py +++ b/pygments/lexers/parsers.py @@ -5,7 +5,7 @@ Lexers for parser generators. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/lexers/postgres.py b/pygments/lexers/postgres.py index 902edd5b..08bc92f9 100644 --- a/pygments/lexers/postgres.py +++ b/pygments/lexers/postgres.py @@ -1,14 +1,10 @@ +# -*- coding: utf-8 -*- """ pygments.lexers.postgres ~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for PostgreSQL-specific SQL and psql interactive session. - :copyright: Copyright 2011 by Daniele Varrazzo. - :license: BSD, see LICENSE for details. - - The module contains lexers related to PostgreSQL languages. - `PostgresLexer` A SQL lexer for the PostgreSQL dialect. Differences w.r.t. the SQL lexer are: @@ -36,23 +32,23 @@ The ``tests/examplefiles`` contains a few test files with data to be parsed by these lexers. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. """ import re -import sys from copy import deepcopy -from pygments.lexer import Lexer, RegexLexer, include, bygroups, using, \ - this, do_insertions -from pygments.token import Error, Punctuation, Literal, Token, \ +from pygments.lexer import Lexer, RegexLexer, do_insertions +from pygments.token import Punctuation, \ Text, Comment, Operator, Keyword, Name, String, Number, Generic from pygments.lexers import get_lexer_by_name, ClassNotFound -from pygments.lexers._postgres_builtins import ( - KEYWORDS, DATATYPES, PSEUDO_TYPES, PLPGSQL_KEYWORDS) +from pygments.lexers._postgres_builtins import KEYWORDS, DATATYPES, \ + PSEUDO_TYPES, PLPGSQL_KEYWORDS -__all__ = [ 'PostgresLexer', 'PlPgsqlLexer', 'PostgresConsoleLexer' ] +__all__ = ['PostgresLexer', 'PlPgsqlLexer', 'PostgresConsoleLexer'] line_re = re.compile('.*?\n') @@ -85,6 +81,7 @@ def language_callback(lexer, match): else: yield (match.start(), String, match.group()) + class PostgresBase(object): """Base class for Postgres-related lexers. @@ -125,9 +122,12 @@ class PostgresBase(object): # print >>sys.stderr, "language not found:", lang return None + class PostgresLexer(PostgresBase, RegexLexer): """ Lexer for the PostgreSQL dialect of SQL. + + *New in Pygments 1.5.* """ name = 'PostgreSQL SQL dialect' @@ -171,6 +171,8 @@ class PostgresLexer(PostgresBase, RegexLexer): class PlPgsqlLexer(PostgresBase, RegexLexer): """ Handle the extra syntax in Pl/pgSQL language. + + *New in Pygments 1.5.* """ name = 'PL/pgSQL' aliases = ['plpgsql'] @@ -206,6 +208,7 @@ class PsqlRegexLexer(PostgresBase, RegexLexer): This is not a complete psql lexer yet as it lacks prompt support and output rendering. """ + name = 'PostgreSQL console - regexp based lexer' aliases = [] # not public @@ -246,6 +249,8 @@ def lookahead(x): class PostgresConsoleLexer(Lexer): """ Lexer for psql sessions. + + *New in Pygments 1.5.* """ name = 'PostgreSQL console (psql)' @@ -319,5 +324,3 @@ class PostgresConsoleLexer(Lexer): yield (mmsg.start(2), out_token, mmsg.group(2)) else: yield (0, out_token, line) - - diff --git a/pygments/lexers/pypylog.py b/pygments/lexers/pypylog.py new file mode 100644 index 00000000..c3af3387 --- /dev/null +++ b/pygments/lexers/pypylog.py @@ -0,0 +1,85 @@ +# -*- coding: utf-8 -*- +""" + pygments.lexers.pypylog + ~~~~~~~~~~~~~~~~~~~~~~~ + + Lexer for pypy log files. + + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, bygroups, include +from pygments.token import Text, Keyword, Number, Comment, Punctuation, Name, \ + String + + +__all__ = ["PyPyLogLexer"] + + +class PyPyLogLexer(RegexLexer): + """ + Lexer for PyPy log files. + + *New in Pygments 1.5.* + """ + name = "PyPy Log" + aliases = ["pypylog", "pypy"] + filenames = ["*.pypylog"] + mimetypes = ['application/x-pypylog'] + + tokens = { + "root": [ + (r"\[\w+\] {jit-log-.*?$", Keyword, "jit-log"), + (r"\[\w+\] {jit-backend-counts$", Keyword, "jit-backend-counts"), + include("extra-stuff"), + ], + "jit-log": [ + (r"\[\w+\] jit-log-.*?}$", Keyword, "#pop"), + + (r"[ifp]\d+", Name), + (r"ptr\d+", Name), + (r"(\()([\w_]+(?:\.[\w_]+)?)(\))", + bygroups(Punctuation, Name.Builtin, Punctuation)), + (r"[\[\]=,()]", Punctuation), + (r"(\d+\.\d+|inf|-inf)", Number.Float), + (r"-?\d+", Number.Integer), + (r"'.*'", String), + (r"(None|descr|ConstClass|ConstPtr)", Name), + (r"<.*?>", Name.Builtin), + (r"(debug_merge_point|jump|finish)", Name.Class), + (r"(int_add_ovf|int_add|int_sub_ovf|int_sub|int_mul_ovf|int_mul|" + r"int_floordiv|int_mod|int_lshift|int_rshift|int_and|int_or|" + r"int_xor|int_eq|int_ne|int_ge|int_gt|int_le|int_lt|int_is_zero|" + r"int_is_true|" + r"uint_floordiv|uint_ge|uint_lt|" + r"float_add|float_sub|float_mul|float_truediv|" + r"float_eq|float_ne|float_ge|float_gt|float_le|float_lt|float_abs|" + r"ptr_eq|" + r"cast_int_to_float|cast_float_to_int|cast_opaque_ptr|" + r"force_token|quasiimmut_field|same_as|virtual_ref_finish|virtual_ref|" + r"call_may_force|call_assembler|call_loopinvariant|call_release_gil|call_pure|call|" + r"new_with_vtable|new_array|newstr|newunicode|new|" + r"arraylen_gc|" + r"getarrayitem_gc_pure|getarrayitem_gc|setarrayitem_gc|" + r"getarrayitem_raw|setarrayitem_raw|getfield_gc_pure|getfield_gc|" + r"getfield_raw|setfield_gc|setfield_raw|" + r"strgetitem|strsetitem|strlen|copystrcontent|" + r"unicodegetitem|unicodesetitem|unicodelen|" + r"guard_true|guard_false|guard_value|guard_isnull|" + r"guard_nonnull_class|guard_nonnull|guard_class|guard_no_overflow|" + r"guard_not_forced|guard_no_exception|guard_not_invalidated)", + Name.Builtin), + include("extra-stuff"), + ], + "jit-backend-counts": [ + (r"\[\w+\] jit-backend-counts}$", Keyword, "#pop"), + (r"[:]", Punctuation), + (r"\d+", Number), + include("extra-stuff"), + ], + "extra-stuff": [ + (r"[\n\s]+", Text), + (r"#.*?$", Comment), + ], + } diff --git a/pygments/lexers/special.py b/pygments/lexers/special.py index bd200a72..61cbc2c1 100644 --- a/pygments/lexers/special.py +++ b/pygments/lexers/special.py @@ -5,7 +5,7 @@ Special lexers. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/lexers/templates.py b/pygments/lexers/templates.py index 458bcaa4..77656bfa 100644 --- a/pygments/lexers/templates.py +++ b/pygments/lexers/templates.py @@ -5,7 +5,7 @@ Lexers for various template engines' markup. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/lexers/text.py b/pygments/lexers/text.py index 5a63e503..cfe5c2e7 100644 --- a/pygments/lexers/text.py +++ b/pygments/lexers/text.py @@ -5,7 +5,7 @@ Lexers for non-source code file types. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -171,7 +171,7 @@ class BaseMakefileLexer(RegexLexer): *New in Pygments 0.10.* """ - name = 'Makefile' + name = 'Base Makefile' aliases = ['basemake'] filenames = [] mimetypes = [] @@ -653,6 +653,13 @@ class RstLexer(RegexLexer): for item in do_insertions(ins, lexer.get_tokens_unprocessed(code)): yield item + # from docutils.parsers.rst.states + closers = u'\'")]}>\u2019\u201d\xbb!?' + unicode_delimiters = u'\u2010\u2011\u2012\u2013\u2014\u00a0' + end_string_suffix = (r'((?=$)|(?=[-/:.,; \n\x00%s%s]))' + % (re.escape(unicode_delimiters), + re.escape(closers))) + tokens = { 'root': [ # Heading with overline @@ -689,9 +696,9 @@ class RstLexer(RegexLexer): bygroups(Punctuation, Text, Operator.Word, Punctuation, Text, using(this, state='inline'))), # A reference target - (r'^( *\.\.)(\s*)([\w\t ]+:)(.*?)$', + (r'^( *\.\.)(\s*)(_(?:[^:\\]|\\.)+:)(.*?)$', bygroups(Punctuation, Text, Name.Tag, using(this, state='inline'))), - # A footnote target + # A footnote/citation target (r'^( *\.\.)(\s*)(\[.+\])(.*?)$', bygroups(Punctuation, Text, Name.Tag, using(this, state='inline'))), # A substitution def @@ -730,10 +737,9 @@ class RstLexer(RegexLexer): (r'.', Text), ], 'literal': [ - (r'[^`\\]+', String), - (r'\\.', String), - (r'``', String, '#pop'), - (r'[`\\]', String), + (r'[^`]+', String), + (r'``' + end_string_suffix, String, '#pop'), + (r'`', String), ] } @@ -761,7 +767,8 @@ class VimLexer(RegexLexer): """ name = 'VimL' aliases = ['vim'] - filenames = ['*.vim', '.vimrc'] + filenames = ['*.vim', '.vimrc', '.exrc', '.gvimrc', + '_vimrc', '_exrc', '_gvimrc'] mimetypes = ['text/x-vim'] flags = re.MULTILINE @@ -876,7 +883,7 @@ class SquidConfLexer(RegexLexer): mimetypes = ['text/x-squidconf'] flags = re.IGNORECASE - keywords = [ "acl", "always_direct", "announce_host", + keywords = [ "access_log", "acl", "always_direct", "announce_host", "announce_period", "announce_port", "announce_to", "anonymize_headers", "append_domain", "as_whois_server", "auth_param_basic", "authenticate_children", @@ -901,7 +908,7 @@ class SquidConfLexer(RegexLexer): "ftpget_options", "ftpget_program", "ftp_list_width", "ftp_passive", "ftp_user", "half_closed_clients", "header_access", "header_replace", "hierarchy_stoplist", - "high_response_time_warning", "high_page_fault_warning", + "high_response_time_warning", "high_page_fault_warning", "hosts_file", "htcp_port", "http_access", "http_anonymizer", "httpd_accel", "httpd_accel_host", "httpd_accel_port", "httpd_accel_uses_host_header", "httpd_accel_with_proxy", @@ -968,14 +975,14 @@ class SquidConfLexer(RegexLexer): "snmp_community", ] - ip_re = r'\b(?:\d{1,3}\.){3}\d{1,3}\b' + ip_re = r'(?:(?:(?:[3-9]\d?|2(?:5[0-5]|[0-4]?\d)?|1\d{0,2}|0x0*[0-9a-f]{1,2}|0+[1-3]?[0-7]{0,2})(?:\.(?:[3-9]\d?|2(?:5[0-5]|[0-4]?\d)?|1\d{0,2}|0x0*[0-9a-f]{1,2}|0+[1-3]?[0-7]{0,2})){3})|(?!.*::.*::)(?:(?!:)|:(?=:))(?:[0-9a-f]{0,4}(?:(?<=::)|(?<!::):)){6}(?:[0-9a-f]{0,4}(?:(?<=::)|(?<!::):)[0-9a-f]{0,4}(?:(?<=::)|(?<!:)|(?<=:)(?<!::):)|(?:25[0-4]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-4]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))' def makelistre(list): - return r'\b(?:'+'|'.join(list)+r')\b' + return r'\b(?:' + '|'.join(list) + r')\b' tokens = { 'root': [ - (r'\s+', Text), + (r'\s+', Whitespace), (r'#', Comment, 'comment'), (makelistre(keywords), Keyword), (makelistre(opts), Name.Constant), @@ -984,8 +991,8 @@ class SquidConfLexer(RegexLexer): (r'stats/'+makelistre(actions), String), (r'log/'+makelistre(actions)+r'=', String), (makelistre(acls), Keyword), - (ip_re+r'(?:/(?:'+ip_re+r')|\d+)?', Number), - (r'\b\d+\b', Number), + (ip_re + r'(?:/(?:' + ip_re + r'|\b\d+\b))?', Number.Float), + (r'(?:\b\d+\b(?:-\b\d+|%)?)', Number), (r'\S+', Text), ], 'comment': [ diff --git a/pygments/lexers/web.py b/pygments/lexers/web.py index 11bc2175..148762fd 100644 --- a/pygments/lexers/web.py +++ b/pygments/lexers/web.py @@ -5,7 +5,7 @@ Lexers for web-related languages and markup. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -26,7 +26,7 @@ __all__ = ['HtmlLexer', 'XmlLexer', 'JavascriptLexer', 'CssLexer', 'PhpLexer', 'ActionScriptLexer', 'XsltLexer', 'ActionScript3Lexer', 'MxmlLexer', 'HaxeLexer', 'HamlLexer', 'SassLexer', 'ScssLexer', 'ObjectiveJLexer', 'CoffeeScriptLexer', 'DuelLexer', 'ScamlLexer', - 'JadeLexer', 'XQueryLexer'] + 'JadeLexer', 'XQueryLexer', 'DtdLexer'] class JavascriptLexer(RegexLexer): @@ -36,9 +36,9 @@ class JavascriptLexer(RegexLexer): name = 'JavaScript' aliases = ['js', 'javascript'] - filenames = ['*.js'] + filenames = ['*.js', '*.json'] mimetypes = ['application/javascript', 'application/x-javascript', - 'text/x-javascript', 'text/javascript'] + 'text/x-javascript', 'text/javascript', 'application/json'] flags = re.DOTALL tokens = { @@ -68,7 +68,7 @@ class JavascriptLexer(RegexLexer): (r'(for|in|while|do|break|return|continue|switch|case|default|if|else|' r'throw|try|catch|finally|new|delete|typeof|instanceof|void|' r'this)\b', Keyword, 'slashstartsregex'), - (r'(var|with|function)\b', Keyword.Declaration, 'slashstartsregex'), + (r'(var|let|with|function)\b', Keyword.Declaration, 'slashstartsregex'), (r'(abstract|boolean|byte|char|class|const|debugger|double|enum|export|' r'extends|final|float|goto|implements|import|int|interface|long|native|' r'package|private|protected|public|short|static|super|synchronized|throws|' @@ -99,8 +99,8 @@ class ActionScriptLexer(RegexLexer): name = 'ActionScript' aliases = ['as', 'actionscript'] filenames = ['*.as'] - mimetypes = ['application/x-actionscript', 'text/x-actionscript', - 'text/actionscript'] + mimetypes = ['application/x-actionscript3', 'text/x-actionscript3', + 'text/actionscript3'] flags = re.DOTALL tokens = { @@ -172,9 +172,6 @@ class ActionScriptLexer(RegexLexer): ] } - def analyse_text(text): - return 0.05 - class ActionScript3Lexer(RegexLexer): """ @@ -190,6 +187,7 @@ class ActionScript3Lexer(RegexLexer): 'text/actionscript'] identifier = r'[$a-zA-Z_][a-zA-Z0-9_]*' + typeidentifier = identifier + '(?:\.<\w+>)?' flags = re.DOTALL | re.MULTILINE tokens = { @@ -198,12 +196,13 @@ class ActionScript3Lexer(RegexLexer): (r'(function\s+)(' + identifier + r')(\s*)(\()', bygroups(Keyword.Declaration, Name.Function, Text, Operator), 'funcparams'), - (r'(var|const)(\s+)(' + identifier + r')(\s*)(:)(\s*)(' + identifier + r')', + (r'(var|const)(\s+)(' + identifier + r')(\s*)(:)(\s*)(' + + typeidentifier + r')', bygroups(Keyword.Declaration, Text, Name, Text, Punctuation, Text, Keyword.Type)), (r'(import|package)(\s+)((?:' + identifier + r'|\.)+)(\s*)', bygroups(Keyword, Text, Name.Namespace, Text)), - (r'(new)(\s+)(' + identifier + r')(\s*)(\()', + (r'(new)(\s+)(' + typeidentifier + r')(\s*)(\()', bygroups(Keyword, Text, Keyword.Type, Text, Operator)), (r'//.*?\n', Comment.Single), (r'/\*.*?\*/', Comment.Multiline), @@ -234,13 +233,13 @@ class ActionScript3Lexer(RegexLexer): 'funcparams': [ (r'\s+', Text), (r'(\s*)(\.\.\.)?(' + identifier + r')(\s*)(:)(\s*)(' + - identifier + r'|\*)(\s*)', + typeidentifier + r'|\*)(\s*)', bygroups(Text, Punctuation, Name, Text, Operator, Text, Keyword.Type, Text), 'defval'), (r'\)', Operator, 'type') ], 'type': [ - (r'(\s*)(:)(\s*)(' + identifier + r'|\*)', + (r'(\s*)(:)(\s*)(' + typeidentifier + r'|\*)', bygroups(Text, Operator, Text, Keyword.Type), '#pop:2'), (r'\s*', Text, '#pop:2') ], @@ -252,8 +251,9 @@ class ActionScript3Lexer(RegexLexer): } def analyse_text(text): - if re.match(r'\w+\s*:\s*\w', text): return 0.3 - return 0.1 + if re.match(r'\w+\s*:\s*\w', text): + return 0.3 + return 0 class CssLexer(RegexLexer): @@ -826,6 +826,92 @@ class PhpLexer(RegexLexer): return rv +class DtdLexer(RegexLexer): + """ + A lexer for DTDs (Document Type Definitions). + + *New in Pygments 1.5.* + """ + + flags = re.MULTILINE | re.DOTALL + + name = 'DTD' + aliases = ['dtd'] + filenames = ['*.dtd'] + mimetypes = ['application/xml-dtd'] + + tokens = { + 'root': [ + include('common'), + + (r'(<!ELEMENT)(\s+)([^\s]+)', + bygroups(Keyword, Text, Name.Tag), 'element'), + (r'(<!ATTLIST)(\s+)([^\s]+)', + bygroups(Keyword, Text, Name.Tag), 'attlist'), + (r'(<!ENTITY)(\s+)([^\s]+)', + bygroups(Keyword, Text, Name.Entity), 'entity'), + (r'(<!NOTATION)(\s+)([^\s]+)', + bygroups(Keyword, Text, Name.Tag), 'notation'), + (r'(<!\[)([^\[\s]+)(\s*)(\[)', # conditional sections + bygroups(Keyword, Name.Entity, Text, Keyword)), + + (r'(<!DOCTYPE)(\s+)([^>\s]+)', + bygroups(Keyword, Text, Name.Tag)), + (r'PUBLIC|SYSTEM', Keyword.Constant), + (r'[\[\]>]', Keyword), + ], + + 'common': [ + (r'\s+', Text), + (r'(%|&)[^;]*;', Name.Entity), + ('<!--', Comment, 'comment'), + (r'[(|)*,?+]', Operator), + (r'"[^"]*"', String.Double), + (r'\'[^\']*\'', String.Single), + ], + + 'comment': [ + ('[^-]+', Comment), + ('-->', Comment, '#pop'), + ('-', Comment), + ], + + 'element': [ + include('common'), + (r'EMPTY|ANY|#PCDATA', Keyword.Constant), + (r'[^>\s\|()?+*,]+', Name.Tag), + (r'>', Keyword, '#pop'), + ], + + 'attlist': [ + include('common'), + (r'CDATA|IDREFS|IDREF|ID|NMTOKENS|NMTOKEN|ENTITIES|ENTITY|NOTATION', Keyword.Constant), + (r'#REQUIRED|#IMPLIED|#FIXED', Keyword.Constant), + (r'xml:space|xml:lang', Keyword.Reserved), + (r'[^>\s\|()?+*,]+', Name.Attribute), + (r'>', Keyword, '#pop'), + ], + + 'entity': [ + include('common'), + (r'SYSTEM|PUBLIC|NDATA', Keyword.Constant), + (r'[^>\s\|()?+*,]+', Name.Entity), + (r'>', Keyword, '#pop'), + ], + + 'notation': [ + include('common'), + (r'SYSTEM|PUBLIC', Keyword.Constant), + (r'[^>\s\|()?+*,]+', Name.Attribute), + (r'>', Keyword, '#pop'), + ], + } + + def analyse_text(text): + if not looks_like_xml(text) and \ + ('<!ELEMENT' in text or '<!ATTLIST' in text or '<!ENTITY' in text): + return 0.8 + class XmlLexer(RegexLexer): """ Generic lexer for XML (eXtensible Markup Language). @@ -837,8 +923,7 @@ class XmlLexer(RegexLexer): aliases = ['xml'] filenames = ['*.xml', '*.xsl', '*.rss', '*.xslt', '*.xsd', '*.wsdl'] mimetypes = ['text/xml', 'application/xml', 'image/svg+xml', - 'application/rss+xml', 'application/atom+xml', - 'application/xsl+xml', 'application/xslt+xml'] + 'application/rss+xml', 'application/atom+xml'] tokens = { 'root': [ @@ -884,6 +969,7 @@ class XsltLexer(XmlLexer): name = 'XSLT' aliases = ['xslt'] filenames = ['*.xsl', '*.xslt'] + mimetypes = ['application/xsl+xml', 'application/xslt+xml'] EXTRA_KEYWORDS = set([ 'apply-imports', 'apply-templates', 'attribute', @@ -1630,18 +1716,22 @@ class CoffeeScriptLexer(RegexLexer): tokens = { 'commentsandwhitespace': [ (r'\s+', Text), + (r'###.*?###', Comment.Multiline), (r'#.*?\n', Comment.Single), ], + 'multilineregex': [ + include('commentsandwhitespace'), + (r'///([gim]+\b|\B)', String.Regex, '#pop'), + (r'/', String.Regex), + (r'[^/#]+', String.Regex) + ], 'slashstartsregex': [ include('commentsandwhitespace'), + (r'///', String.Regex, ('#pop', 'multilineregex')), (r'/(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/' r'([gim]+\b|\B)', String.Regex, '#pop'), - (r'(?=/)', Text, ('#pop', 'badregex')), (r'', Text, '#pop'), ], - 'badregex': [ - ('\n', Text, '#pop'), - ], 'root': [ (r'^(?=\s|/|<!--)', Text, 'slashstartsregex'), include('commentsandwhitespace'), @@ -1665,13 +1755,46 @@ class CoffeeScriptLexer(RegexLexer): 'slashstartsregex'), (r'@[$a-zA-Z_][a-zA-Z0-9_\.:]*\s*[:=]\s', Name.Variable.Instance, 'slashstartsregex'), + (r'@', Name.Other, 'slashstartsregex'), (r'@?[$a-zA-Z_][a-zA-Z0-9_]*', Name.Other, 'slashstartsregex'), (r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float), (r'0x[0-9a-fA-F]+', Number.Hex), (r'[0-9]+', Number.Integer), - (r'"(\\\\|\\"|[^"])*"', String.Double), - (r"'(\\\\|\\'|[^'])*'", String.Single), - ] + ('"""', String, 'tdqs'), + ("'''", String, 'tsqs'), + ('"', String, 'dqs'), + ("'", String, 'sqs'), + ], + 'strings': [ + (r'[^#\\\'"]+', String) # note that all coffee script strings are multi-line. + # hashmarks, quotes and backslashes must be parsed one at a time + ], + 'interpoling_string' : [ + (r'}', String.Interpol, "#pop"), + include('root') + ], + 'dqs': [ + (r'"', String, '#pop'), + (r'\\.|\'', String), # double-quoted string don't need ' escapes + (r'#{', String.Interpol, "interpoling_string"), + include('strings') + ], + 'sqs': [ + (r"'", String, '#pop'), + (r'#|\\.|"', String), # single quoted strings don't need " escapses + include('strings') + ], + 'tdqs': [ + (r'"""', String, '#pop'), + (r'\\.|\'|"', String), # no need to escape quotes in triple-string + (r'#{', String.Interpol, "interpoling_string"), + include('strings'), + ], + 'tsqs': [ + (r"'''", String, '#pop'), + (r'#|\\.|\'|"', String), # no need to escape quotes in triple-strings + include('strings') + ], } class DuelLexer(RegexLexer): @@ -1986,6 +2109,12 @@ class XQueryLexer(ExtendedRegexLexer): flags = re.DOTALL | re.MULTILINE | re.UNICODE + def punctuation_root_callback(lexer, match, ctx): + yield match.start(), Punctuation, match.group(1) + # transition to root always - don't pop off stack + ctx.stack = ['root'] + ctx.pos = match.end() + def operator_root_callback(lexer, match, ctx): yield match.start(), Operator, match.group(1) # transition to root always - don't pop off stack @@ -2167,6 +2296,11 @@ class XQueryLexer(ExtendedRegexLexer): ctx.stack = ['root']#.append('root') ctx.pos = match.end() + def pushstate_operator_attribute_callback(lexer, match, ctx): + yield match.start(), Name.Attribute, match.group(1) + ctx.stack.append('operator') + ctx.pos = match.end() + def pushstate_operator_callback(lexer, match, ctx): yield match.start(), Keyword, match.group(1) yield match.start(), Text, match.group(2) @@ -2192,19 +2326,22 @@ class XQueryLexer(ExtendedRegexLexer): (r'(\{)', pushstate_root_callback), (r'then|else|external|at|div|except', Keyword, 'root'), + (r'order by', Keyword, 'root'), (r'is|mod|order\s+by|stable\s+order\s+by', Keyword, 'root'), (r'and|or', Operator.Word, 'root'), (r'(eq|ge|gt|le|lt|ne|idiv|intersect|in)(?=\b)', Operator.Word, 'root'), (r'return|satisfies|to|union|where|preserve\s+strip', Keyword, 'root'), - (r'(::|;|>=|>>|>|\[|<=|<<|<|-|\*|!=|\+|//|/|\||:=|,|=)', + (r'(>=|>>|>|<=|<<|<|-|\*|!=|\+|\||:=|=)', operator_root_callback), + (r'(::|;|\[|//|/|,)', + punctuation_root_callback), (r'(castable|cast)(\s+)(as)', bygroups(Keyword, Text, Keyword), 'singletype'), - (r'(instance)(\s+)(of)|(treat)(\s+)(as)', - bygroups(Keyword, Text, Keyword), 'itemtype'), - (r'(case)|(as)', Keyword, 'itemtype'), + (r'(instance)(\s+)(of)', bygroups(Keyword, Text, Keyword), 'itemtype'), + (r'(treat)(\s+)(as)', bygroups(Keyword, Text, Keyword), 'itemtype'), + (r'case|as', Keyword, 'itemtype'), (r'(\))(\s*)(as)', bygroups(Punctuation, Text, Keyword), 'itemtype'), (r'\$', Name.Variable, 'varname'), @@ -2262,10 +2399,10 @@ class XQueryLexer(ExtendedRegexLexer): include('whitespace'), (r'\(:', Comment, 'comment'), (r'\$', Punctuation, 'varname'), - (r'void\s*\(\s*\)', + (r'(void)(\s*)(\()(\s*)(\))', bygroups(Keyword, Text, Punctuation, Text, Punctuation), 'operator'), (r'(element|attribute|schema-element|schema-attribute|comment|text|' - r'node|binary|document-node)(\s*)(\()', + r'node|binary|document-node|empty-sequence)(\s*)(\()', pushstate_occurrenceindicator_kindtest_callback), # Marklogic specific type? (r'(processing-instruction)(\s*)(\()', @@ -2290,8 +2427,8 @@ class XQueryLexer(ExtendedRegexLexer): bygroups(Keyword, Text, Keyword, Text, Keyword), 'root'), (r'(castable|cast)(\s+)(as)', bygroups(Keyword, Text, Keyword), 'singletype'), - (r'(instance)(\s+)(of)|(treat)(\s+)(as)', - bygroups(Keyword, Text, Keyword)), + (r'(treat)(\s+)(as)', bygroups(Keyword, Text, Keyword)), + (r'(instance)(\s+)(of)', bygroups(Keyword, Text, Keyword)), (r'case|as', Keyword, 'itemtype'), (r'(\))(\s*)(as)', bygroups(Operator, Text, Keyword), 'itemtype'), (ncname + r'(:\*)', Keyword.Type, 'operator'), @@ -2480,7 +2617,7 @@ class XQueryLexer(ExtendedRegexLexer): (r'(\))(\s+)(as)', bygroups(Operator, Text, Keyword), 'itemtype'), (r'(element|attribute|schema-element|schema-attribute|comment|' - r'text|node|document-node)(\s+)(\()', + r'text|node|document-node|empty-sequence)(\s+)(\()', pushstate_operator_kindtest_callback), (r'(processing-instruction)(\s+)(\()', @@ -2557,9 +2694,9 @@ class XQueryLexer(ExtendedRegexLexer): (r'(catch)(\s*)(\()(\$)', bygroups(Keyword, Text, Punctuation, Name.Variable), 'varname'), - (r'@' + qname, Name.Attribute), - (r'@\*', Name.Attribute), - (r'@' + ncname, Name.Attribute), + (r'(@' + qname + ')', pushstate_operator_attribute_callback), + (r'(@\*)', pushstate_operator_attribute_callback), + (r'(@' + ncname + ')', pushstate_operator_attribute_callback), (r'//|/|\+|-|;|,|\(|\)', Punctuation), diff --git a/pygments/plugin.py b/pygments/plugin.py index cb59c9e6..3f0b6703 100644 --- a/pygments/plugin.py +++ b/pygments/plugin.py @@ -32,7 +32,7 @@ yourfilter = yourfilter:YourFilter - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ try: diff --git a/pygments/scanner.py b/pygments/scanner.py index a486f05b..337eb778 100644 --- a/pygments/scanner.py +++ b/pygments/scanner.py @@ -12,7 +12,7 @@ Have a look at the `DelphiLexer` to get an idea of how to use this scanner. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re diff --git a/pygments/style.py b/pygments/style.py index 7bb1f3f3..96a415ff 100644 --- a/pygments/style.py +++ b/pygments/style.py @@ -5,7 +5,7 @@ Basic style object. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/styles/__init__.py b/pygments/styles/__init__.py index d777c9c5..15503f28 100644 --- a/pygments/styles/__init__.py +++ b/pygments/styles/__init__.py @@ -5,7 +5,7 @@ Contains built-in styles. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/styles/autumn.py b/pygments/styles/autumn.py index c494ec42..61f2adb1 100644 --- a/pygments/styles/autumn.py +++ b/pygments/styles/autumn.py @@ -5,7 +5,7 @@ A colorful style, inspired by the terminal highlighting style. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/styles/borland.py b/pygments/styles/borland.py index 8d4ca082..b119ea72 100644 --- a/pygments/styles/borland.py +++ b/pygments/styles/borland.py @@ -5,7 +5,7 @@ Style similar to the style used in the Borland IDEs. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/styles/bw.py b/pygments/styles/bw.py index 805bcf8b..34930f17 100644 --- a/pygments/styles/bw.py +++ b/pygments/styles/bw.py @@ -5,7 +5,7 @@ Simple black/white only style. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/styles/colorful.py b/pygments/styles/colorful.py index e9fb60b9..e091d1d8 100644 --- a/pygments/styles/colorful.py +++ b/pygments/styles/colorful.py @@ -5,7 +5,7 @@ A colorful style, inspired by CodeRay. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/styles/default.py b/pygments/styles/default.py index a494dba2..1e0450c0 100644 --- a/pygments/styles/default.py +++ b/pygments/styles/default.py @@ -5,7 +5,7 @@ The default highlighting style. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/styles/emacs.py b/pygments/styles/emacs.py index 6283fedd..d165d6fd 100644 --- a/pygments/styles/emacs.py +++ b/pygments/styles/emacs.py @@ -5,7 +5,7 @@ A highlighting style for Pygments, inspired by Emacs. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/styles/friendly.py b/pygments/styles/friendly.py index d5393d27..92d2e3d6 100644 --- a/pygments/styles/friendly.py +++ b/pygments/styles/friendly.py @@ -5,7 +5,7 @@ A modern style based on the VIM pyte theme. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/styles/fruity.py b/pygments/styles/fruity.py index 5eb4dece..ce381f42 100644 --- a/pygments/styles/fruity.py +++ b/pygments/styles/fruity.py @@ -5,7 +5,7 @@ pygments version of my "fruity" vim theme. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/styles/manni.py b/pygments/styles/manni.py index 0537c9e6..39bb31ee 100644 --- a/pygments/styles/manni.py +++ b/pygments/styles/manni.py @@ -8,7 +8,7 @@ This is a port of the style used in the `php port`_ of pygments by Manni. The style is called 'default' there. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/styles/monokai.py b/pygments/styles/monokai.py index 90c36646..e80d8919 100644 --- a/pygments/styles/monokai.py +++ b/pygments/styles/monokai.py @@ -7,7 +7,7 @@ http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/ - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/styles/murphy.py b/pygments/styles/murphy.py index 01eeff31..c72d128e 100644 --- a/pygments/styles/murphy.py +++ b/pygments/styles/murphy.py @@ -5,7 +5,7 @@ Murphy's style from CodeRay. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/styles/native.py b/pygments/styles/native.py index 7c552ec1..f2b96588 100644 --- a/pygments/styles/native.py +++ b/pygments/styles/native.py @@ -5,7 +5,7 @@ pygments version of my "native" vim theme. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/styles/pastie.py b/pygments/styles/pastie.py index 2ca54233..c9cc126b 100644 --- a/pygments/styles/pastie.py +++ b/pygments/styles/pastie.py @@ -7,7 +7,7 @@ .. _pastie: http://pastie.caboo.se/ - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/styles/perldoc.py b/pygments/styles/perldoc.py index 89388adf..8542b855 100644 --- a/pygments/styles/perldoc.py +++ b/pygments/styles/perldoc.py @@ -7,7 +7,7 @@ .. _perldoc: http://perldoc.perl.org/ - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/styles/tango.py b/pygments/styles/tango.py index 933cdadf..dc6fd79e 100644 --- a/pygments/styles/tango.py +++ b/pygments/styles/tango.py @@ -33,7 +33,7 @@ have been chosen to have the same style. Similarly, keywords (Keyword.*), and Operator.Word (and, or, in) have been assigned the same style. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/styles/trac.py b/pygments/styles/trac.py index f8257136..f08d7eb2 100644 --- a/pygments/styles/trac.py +++ b/pygments/styles/trac.py @@ -5,7 +5,7 @@ Port of the default trac highlighter design. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/styles/vim.py b/pygments/styles/vim.py index 04562879..6ab93ea2 100644 --- a/pygments/styles/vim.py +++ b/pygments/styles/vim.py @@ -5,7 +5,7 @@ A highlighting style for Pygments, inspired by vim. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/styles/vs.py b/pygments/styles/vs.py index 7fbca3e7..a056c69b 100644 --- a/pygments/styles/vs.py +++ b/pygments/styles/vs.py @@ -5,7 +5,7 @@ Simple style with MS Visual Studio colors. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/token.py b/pygments/token.py index 1f513923..2c962c10 100644 --- a/pygments/token.py +++ b/pygments/token.py @@ -5,7 +5,7 @@ Basic token types and the standard tokens. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/unistring.py b/pygments/unistring.py index 8144a273..b6db21cf 100644 --- a/pygments/unistring.py +++ b/pygments/unistring.py @@ -8,7 +8,7 @@ Inspired by chartypes_create.py from the MoinMoin project. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.util import u_prefix diff --git a/pygments/util.py b/pygments/util.py index 46c5a125..429e40a1 100644 --- a/pygments/util.py +++ b/pygments/util.py @@ -5,7 +5,7 @@ Utility functions. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/scripts/check_sources.py b/scripts/check_sources.py index 798297b9..1816d2a7 100755 --- a/scripts/check_sources.py +++ b/scripts/check_sources.py @@ -7,7 +7,7 @@ Make sure each Python file has a correct file header including copyright and license information. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/scripts/find_codetags.py b/scripts/find_codetags.py index d78e4a73..69fa5798 100755 --- a/scripts/find_codetags.py +++ b/scripts/find_codetags.py @@ -7,7 +7,7 @@ Find code tags in specified files and/or directories and create a report in HTML format. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/scripts/find_error.py b/scripts/find_error.py index cb22ae89..199e9c5c 100755 --- a/scripts/find_error.py +++ b/scripts/find_error.py @@ -8,7 +8,7 @@ the text where Error tokens are being generated, along with some context. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -24,6 +24,7 @@ except ImportError: from pygments.lexer import RegexLexer from pygments.lexers import get_lexer_for_filename, get_lexer_by_name from pygments.token import Error, Text, _TokenType +from pygments.cmdline import _parse_options class DebuggingRegexLexer(RegexLexer): @@ -83,16 +84,16 @@ class DebuggingRegexLexer(RegexLexer): break -def main(fn, lexer=None): +def main(fn, lexer=None, options={}): if lexer is not None: lx = get_lexer_by_name(lexer) else: try: - lx = get_lexer_for_filename(os.path.basename(fn)) + lx = get_lexer_for_filename(os.path.basename(fn), **options) except ValueError: try: name, rest = fn.split('_', 1) - lx = get_lexer_by_name(name) + lx = get_lexer_by_name(name, **options) except ValueError: raise AssertionError('no lexer found for file %r' % fn) debug_lexer = False @@ -103,7 +104,6 @@ def main(fn, lexer=None): lno = 1 text = file(fn, 'U').read() text = text.strip('\n') + '\n' - text = text.decode('latin1') tokens = [] states = [] @@ -120,7 +120,7 @@ def main(fn, lexer=None): print 'Error parsing', fn, 'on line', lno print 'Previous tokens' + (debug_lexer and ' and states' or '') + ':' if showall: - for tok, state in zip(tokens, states): + for tok, state in map(None, tokens, states): show_token(tok, state) else: for i in range(len(tokens) - num, len(tokens)): @@ -140,7 +140,7 @@ def main(fn, lexer=None): else: states.append(None) if showall: - for tok, state in zip(tokens, states): + for tok, state in map(None, tokens, states): show_token(tok, state) return 0 @@ -148,10 +148,11 @@ def main(fn, lexer=None): num = 10 showall = False lexer = None +options = {} if __name__ == '__main__': import getopt - opts, args = getopt.getopt(sys.argv[1:], 'n:l:a') + opts, args = getopt.getopt(sys.argv[1:], 'n:l:aO:') for opt, val in opts: if opt == '-n': num = int(val) @@ -159,7 +160,9 @@ if __name__ == '__main__': showall = True elif opt == '-l': lexer = val + elif opt == '-O': + options = _parse_options([val]) ret = 0 for f in args: - ret += main(f, lexer) + ret += main(f, lexer, options) sys.exit(bool(ret)) @@ -23,7 +23,7 @@ .. _Pygments tip: http://bitbucket.org/birkenfeld/pygments-main/get/tip.zip#egg=Pygments-dev - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/examplefiles/as3_test.as b/tests/examplefiles/as3_test.as index 7e19f887..d6b08424 100644 --- a/tests/examplefiles/as3_test.as +++ b/tests/examplefiles/as3_test.as @@ -7,7 +7,7 @@ private static const ADD_SONG:uint = 1; private static const SONG_DETAIL:uint = 2; - private var playList:PlayList = new PlayList(); + private var playList:PlayList = new PlayList.<T>(); private function initApp():void { @@ -24,7 +24,7 @@ } - private function sortList(sortField:SortProperty):void + private function sortList(sortField:SortProperty.<T>):void { // Make all the sort type buttons enabled. // The active one will be grayed-out below diff --git a/tests/examplefiles/example.gs b/tests/examplefiles/example.gs new file mode 100644 index 00000000..eb8372d6 --- /dev/null +++ b/tests/examplefiles/example.gs @@ -0,0 +1,106 @@ +package example + +uses java.util.* + +uses java.io.File + +class Person extends Contact implements IEmailable { + + var _name : String + var _age : Integer as Age + var _relationship : Relationship as readonly RelationshipOfPerson + + delegate _emailHelper represents IEmailable + + enum Relationship { + FRIEND, + FAMILY, + BUSINESS_CONTACT + } + + // Map of names to people + static var ALL_PEOPLE = new HashMap<String, Person>() + + /* Constructs a new Person */ + construct( name : String, age : Integer, relationship : Relationship ) { + _name = name + _age = age + _relationship = relationship + _emailHelper = new EmailHelper( this ) + } + + property get Name():String{ + return _name + } + + property set Name(name : String){ + _name = name + } + + /* Implement IEmailable#getEmailName() */ + override function getEmailName():String{ + return Name + } + + function incrementAge() { + _age++ + } + + @Deprecated + function printPersonInfo() { + print( "Person { Name : ${Name}, Age : ${Age}, Relationship : ${RelationshipOfPerson} }" ) + } + + static function addPerson(p : Person){ + if(ALL_PEOPLE.containsKey(p?.Name)) { + throw new IllegalArgumentException( "There is already someone named '${p.Name}'." ) + } + ALL_PEOPLE[p.Name] = p + } + + static function addAllPeople( contacts : List<Contact> ) { + for( contact in contacts ) { + if( contact typeis Person and not ALL_PEOPLE.containsKey( contact.Name )) { + addPerson( contact ) + } + } + } + + static function getAllPeopleOlderThanNOrderedByName( age : int ) { + var allPeople = ALL_PEOPLE.Values + + return allPeople.where( \ p -> p.Age > age ).orderBy( \ p -> p.Name ) + } + + static function loadPersonFromDB( id : Integer ) { + using( var conn = DBConnectionManager.getConnection(), + var stmt = conn.prepareStatement( "SELECT name, age, relationship FROM PEOPLE WHERE ID=?") ){ + + stmt.setInt( 0, 0 ) + var result = stmt.executeQuery() + if( result.next() ) { + addPerson( new Person( result.getString( "name" ), + result.getInt( "age" ), + Relationship.valueOf( result.getString( "relationship" ) ) ) ) + + } + } + } + + /* Loads in people from a CSV */ + static function loadFromFile( file : File ) { + file.eachLine( \ line -> { + if( line.HasContent ) { + addPerson( line.toPerson() ) + } + }) + } + + /* Save people to a CSV */ + static function saveToFile( file : File ) { + using( var writer = new FileWriter( file ) ) { + print( PersonCSVTemplate.renderToString( ALL_PEOPLE.Values ) ) + PersonCSVTemplate.render( writer, ALL_PEOPLE.Values ) + } + } +}
\ No newline at end of file diff --git a/tests/examplefiles/example.gst b/tests/examplefiles/example.gst new file mode 100644 index 00000000..55fedb4f --- /dev/null +++ b/tests/examplefiles/example.gst @@ -0,0 +1,7 @@ +<%!-- defined in example/PersonCSVTemplate.gst --%> + +<%@ params( users : Collection <User> ) %> + +<% for( user in users ) { %> + +${user.LastName}, ${user.FirstName}, ${user.Department} <% } %>
\ No newline at end of file diff --git a/tests/examplefiles/example.nim b/tests/examplefiles/example.nim new file mode 100644 index 00000000..319da016 --- /dev/null +++ b/tests/examplefiles/example.nim @@ -0,0 +1,1010 @@ +import glib2, gtk2, gdk2, gtksourceview, dialogs, os, pango, osproc, strutils +import pegs, streams +import settings, types, cfg, search + +{.push callConv:cdecl.} + +const + NimrodProjectExt = ".nimprj" + +var win: types.MainWin +win.Tabs = @[] + +search.win = addr(win) + +var lastSession: seq[string] = @[] + +var confParseFail = False # This gets set to true + # When there is an error parsing the config + +# Load the settings +try: + win.settings = cfg.load(lastSession) +except ECFGParse: + # TODO: Make the dialog show the exception + confParseFail = True + win.settings = cfg.defaultSettings() +except EIO: + win.settings = cfg.defaultSettings() + +proc getProjectTab(): int = + for i in 0..high(win.tabs): + if win.tabs[i].filename.endswith(NimrodProjectExt): return i + +proc saveTab(tabNr: int, startpath: string) = + if tabNr < 0: return + if win.Tabs[tabNr].saved: return + var path = "" + if win.Tabs[tabNr].filename == "": + path = ChooseFileToSave(win.w, startpath) + # dialogs.nim STOCK_OPEN instead of STOCK_SAVE + else: + path = win.Tabs[tabNr].filename + + if path != "": + var buffer = PTextBuffer(win.Tabs[tabNr].buffer) + # Get the text from the TextView + var startIter: TTextIter + buffer.getStartIter(addr(startIter)) + + var endIter: TTextIter + buffer.getEndIter(addr(endIter)) + + var text = buffer.getText(addr(startIter), addr(endIter), False) + # Save it to a file + var f: TFile + if open(f, path, fmWrite): + f.write(text) + f.close() + + win.tempStuff.lastSaveDir = splitFile(path).dir + + # Change the tab name and .Tabs.filename etc. + win.Tabs[tabNr].filename = path + win.Tabs[tabNr].saved = True + var name = extractFilename(path) + + var cTab = win.Tabs[tabNr] + cTab.label.setText(name) + else: + error(win.w, "Unable to write to file") + +proc saveAllTabs() = + for i in 0..high(win.tabs): + saveTab(i, os.splitFile(win.tabs[i].filename).dir) + +# GTK Events +# -- w(PWindow) +proc destroy(widget: PWidget, data: pgpointer) {.cdecl.} = + # gather some settings + win.settings.VPanedPos = PPaned(win.sourceViewTabs.getParent()).getPosition() + win.settings.winWidth = win.w.allocation.width + win.settings.winHeight = win.w.allocation.height + + # save the settings + win.save() + # then quit + main_quit() + +proc delete_event(widget: PWidget, event: PEvent, user_data: pgpointer): bool = + var quit = True + for i in low(win.Tabs)..len(win.Tabs)-1: + if not win.Tabs[i].saved: + var askSave = dialogNewWithButtons("", win.w, 0, + STOCK_SAVE, RESPONSE_ACCEPT, STOCK_CANCEL, + RESPONSE_CANCEL, + "Close without saving", RESPONSE_REJECT, nil) + askSave.setTransientFor(win.w) + # TODO: Make this dialog look better + var label = labelNew(win.Tabs[i].filename & + " is unsaved, would you like to save it ?") + PBox(askSave.vbox).pack_start(label, False, False, 0) + label.show() + + var resp = askSave.run() + gtk2.destroy(PWidget(askSave)) + case resp + of RESPONSE_ACCEPT: + saveTab(i, os.splitFile(win.tabs[i].filename).dir) + quit = True + of RESPONSE_CANCEL: + quit = False + break + of RESPONSE_REJECT: + quit = True + else: + quit = False + break + + # If False is returned the window will close + return not quit + +proc windowState_Changed(widget: PWidget, event: PEventWindowState, + user_data: pgpointer) = + win.settings.winMaximized = (event.newWindowState and + WINDOW_STATE_MAXIMIZED) != 0 + +# -- SourceView(PSourceView) & SourceBuffer +proc updateStatusBar(buffer: PTextBuffer){.cdecl.} = + # Incase this event gets fired before + # bottomBar is initialized + if win.bottomBar != nil and not win.tempStuff.stopSBUpdates: + var iter: TTextIter + + win.bottomBar.pop(0) + buffer.getIterAtMark(addr(iter), buffer.getInsert()) + var row = getLine(addr(iter)) + 1 + var col = getLineOffset(addr(iter)) + discard win.bottomBar.push(0, "Line: " & $row & " Column: " & $col) + +proc cursorMoved(buffer: PTextBuffer, location: PTextIter, + mark: PTextMark, user_data: pgpointer){.cdecl.} = + updateStatusBar(buffer) + +proc onCloseTab(btn: PButton, user_data: PWidget) = + if win.sourceViewTabs.getNPages() > 1: + var tab = win.sourceViewTabs.pageNum(user_data) + win.sourceViewTabs.removePage(tab) + + win.Tabs.delete(tab) + +proc onSwitchTab(notebook: PNotebook, page: PNotebookPage, pageNum: guint, + user_data: pgpointer) = + if win.Tabs.len()-1 >= pageNum: + win.w.setTitle("Aporia IDE - " & win.Tabs[pageNum].filename) + +proc createTabLabel(name: string, t_child: PWidget): tuple[box: PWidget, + label: PLabel] = + var box = hboxNew(False, 0) + var label = labelNew(name) + var closebtn = buttonNew() + closeBtn.setLabel(nil) + var iconSize = iconSizeFromName("tabIconSize") + if iconSize == 0: + iconSize = iconSizeRegister("tabIconSize", 10, 10) + var image = imageNewFromStock(STOCK_CLOSE, iconSize) + discard gSignalConnect(closebtn, "clicked", G_Callback(onCloseTab), t_child) + closebtn.setImage(image) + gtk2.setRelief(closebtn, RELIEF_NONE) + box.packStart(label, True, True, 0) + box.packEnd(closebtn, False, False, 0) + box.showAll() + return (box, label) + +proc changed(buffer: PTextBuffer, user_data: pgpointer) = + # Update the 'Line & Column' + #updateStatusBar(buffer) + + # Change the tabs state to 'unsaved' + # and add '*' to the Tab Name + var current = win.SourceViewTabs.getCurrentPage() + var name = "" + if win.Tabs[current].filename == "": + win.Tabs[current].saved = False + name = "Untitled *" + else: + win.Tabs[current].saved = False + name = extractFilename(win.Tabs[current].filename) & " *" + + var cTab = win.Tabs[current] + cTab.label.setText(name) + +# Other(Helper) functions + +proc initSourceView(SourceView: var PWidget, scrollWindow: var PScrolledWindow, + buffer: var PSourceBuffer) = + # This gets called by addTab + # Each tabs creates a new SourceView + # SourceScrolledWindow(ScrolledWindow) + scrollWindow = scrolledWindowNew(nil, nil) + scrollWindow.setPolicy(POLICY_AUTOMATIC, POLICY_AUTOMATIC) + scrollWindow.show() + + # SourceView(gtkSourceView) + SourceView = sourceViewNew(buffer) + PSourceView(SourceView).setInsertSpacesInsteadOfTabs(True) + PSourceView(SourceView).setIndentWidth(win.settings.indentWidth) + PSourceView(SourceView).setShowLineNumbers(win.settings.showLineNumbers) + PSourceView(SourceView).setHighlightCurrentLine( + win.settings.highlightCurrentLine) + PSourceView(SourceView).setShowRightMargin(win.settings.rightMargin) + PSourceView(SourceView).setAutoIndent(win.settings.autoIndent) + + var font = font_description_from_string(win.settings.font) + SourceView.modifyFont(font) + + scrollWindow.add(SourceView) + SourceView.show() + + buffer.setHighlightMatchingBrackets( + win.settings.highlightMatchingBrackets) + + # UGLY workaround for yet another compiler bug: + discard gsignalConnect(buffer, "mark-set", + GCallback(aporia.cursorMoved), nil) + discard gsignalConnect(buffer, "changed", GCallback(aporia.changed), nil) + + # -- Set the syntax highlighter scheme + buffer.setScheme(win.scheme) + +proc addTab(name, filename: string) = + ## Adds a tab, if filename is not "" reads the file. And sets + ## the tabs SourceViews text to that files contents. + assert(win.nimLang != nil) + var buffer: PSourceBuffer = sourceBufferNew(win.nimLang) + + if filename != nil and filename != "": + var lang = win.langMan.guessLanguage(filename, nil) + if lang != nil: + buffer.setLanguage(lang) + else: + buffer.setHighlightSyntax(False) + + var nam = name + if nam == "": nam = "Untitled" + if filename == "": nam.add(" *") + elif filename != "" and name == "": + # Disable the undo/redo manager. + buffer.begin_not_undoable_action() + + # Load the file. + var file: string = readFile(filename) + if file != nil: + buffer.set_text(file, len(file)) + + # Enable the undo/redo manager. + buffer.end_not_undoable_action() + + # Get the name.ext of the filename, for the tabs title + nam = extractFilename(filename) + + # Init the sourceview + var sourceView: PWidget + var scrollWindow: PScrolledWindow + initSourceView(sourceView, scrollWindow, buffer) + + var (TabLabel, labelText) = createTabLabel(nam, scrollWindow) + # Add a tab + discard win.SourceViewTabs.appendPage(scrollWindow, TabLabel) + + var nTab: Tab + nTab.buffer = buffer + nTab.sourceView = sourceView + nTab.label = labelText + nTab.saved = (filename != "") + nTab.filename = filename + win.Tabs.add(nTab) + + PTextView(SourceView).setBuffer(nTab.buffer) + +# GTK Events Contd. +# -- TopMenu & TopBar + +proc newFile(menuItem: PMenuItem, user_data: pgpointer) = + addTab("", "") + win.sourceViewTabs.setCurrentPage(win.Tabs.len()-1) + +proc openFile(menuItem: PMenuItem, user_data: pgpointer) = + var startpath = "" + var currPage = win.SourceViewTabs.getCurrentPage() + if currPage <% win.tabs.len: + startpath = os.splitFile(win.tabs[currPage].filename).dir + + if startpath.len == 0: + # Use lastSavePath as the startpath + startpath = win.tempStuff.lastSaveDir + if startpath.len == 0: + startpath = os.getHomeDir() + + var files = ChooseFilesToOpen(win.w, startpath) + if files.len() > 0: + for f in items(files): + try: + addTab("", f) + except EIO: + error(win.w, "Unable to read from file") + # Switch to the newly created tab + win.sourceViewTabs.setCurrentPage(win.Tabs.len()-1) + +proc saveFile_Activate(menuItem: PMenuItem, user_data: pgpointer) = + var current = win.SourceViewTabs.getCurrentPage() + saveTab(current, os.splitFile(win.tabs[current].filename).dir) + +proc saveFileAs_Activate(menuItem: PMenuItem, user_data: pgpointer) = + var current = win.SourceViewTabs.getCurrentPage() + var (filename, saved) = (win.Tabs[current].filename, win.Tabs[current].saved) + + win.Tabs[current].saved = False + win.Tabs[current].filename = "" + saveTab(current, os.splitFile(filename).dir) + # If the user cancels the save file dialog. Restore the previous filename + # and saved state + if win.Tabs[current].filename == "": + win.Tabs[current].filename = filename + win.Tabs[current].saved = saved + +proc undo(menuItem: PMenuItem, user_data: pgpointer) = + var current = win.SourceViewTabs.getCurrentPage() + if win.Tabs[current].buffer.canUndo(): + win.Tabs[current].buffer.undo() + +proc redo(menuItem: PMenuItem, user_data: pgpointer) = + var current = win.SourceViewTabs.getCurrentPage() + if win.Tabs[current].buffer.canRedo(): + win.Tabs[current].buffer.redo() + +proc find_Activate(menuItem: PMenuItem, user_data: pgpointer) = + # Get the selected text, and set the findEntry to it. + var currentTab = win.SourceViewTabs.getCurrentPage() + var insertIter: TTextIter + win.Tabs[currentTab].buffer.getIterAtMark(addr(insertIter), + win.Tabs[currentTab].buffer.getInsert()) + var insertOffset = addr(insertIter).getOffset() + + var selectIter: TTextIter + win.Tabs[currentTab].buffer.getIterAtMark(addr(selectIter), + win.Tabs[currentTab].buffer.getSelectionBound()) + var selectOffset = addr(selectIter).getOffset() + + if insertOffset != selectOffset: + var text = win.Tabs[currentTab].buffer.getText(addr(insertIter), + addr(selectIter), false) + win.findEntry.setText(text) + + win.findBar.show() + win.findEntry.grabFocus() + win.replaceEntry.hide() + win.replaceLabel.hide() + win.replaceBtn.hide() + win.replaceAllBtn.hide() + +proc replace_Activate(menuitem: PMenuItem, user_data: pgpointer) = + win.findBar.show() + win.findEntry.grabFocus() + win.replaceEntry.show() + win.replaceLabel.show() + win.replaceBtn.show() + win.replaceAllBtn.show() + +proc settings_Activate(menuitem: PMenuItem, user_data: pgpointer) = + settings.showSettings(win) + +proc viewBottomPanel_Toggled(menuitem: PCheckMenuItem, user_data: pgpointer) = + win.settings.bottomPanelVisible = menuitem.itemGetActive() + if win.settings.bottomPanelVisible: + win.bottomPanelTabs.show() + else: + win.bottomPanelTabs.hide() + +var + pegLineError = peg"{[^(]*} '(' {\d+} ', ' \d+ ') Error:' \s* {.*}" + pegLineWarning = peg"{[^(]*} '(' {\d+} ', ' \d+ ') ' ('Warning:'/'Hint:') \s* {.*}" + pegOtherError = peg"'Error:' \s* {.*}" + pegSuccess = peg"'Hint: operation successful'.*" + +proc addText(textView: PTextView, text: string, colorTag: PTextTag = nil) = + if text != nil: + var iter: TTextIter + textView.getBuffer().getEndIter(addr(iter)) + + if colorTag == nil: + textView.getBuffer().insert(addr(iter), text, len(text)) + else: + textView.getBuffer().insertWithTags(addr(iter), text, len(text), colorTag, + nil) + +proc createColor(textView: PTextView, name, color: string): PTextTag = + var tagTable = textView.getBuffer().getTagTable() + result = tagTable.tableLookup(name) + if result == nil: + result = textView.getBuffer().createTag(name, "foreground", color, nil) + +when not defined(os.findExe): + proc findExe(exe: string): string = + ## returns "" if the exe cannot be found + result = addFileExt(exe, os.exeExt) + if ExistsFile(result): return + var path = os.getEnv("PATH") + for candidate in split(path, pathSep): + var x = candidate / result + if ExistsFile(x): return x + result = "" + +proc GetCmd(cmd, filename: string): string = + var f = quoteIfContainsWhite(filename) + if cmd =~ peg"\s* '$' y'findExe' '(' {[^)]+} ')' {.*}": + var exe = quoteIfContainsWhite(findExe(matches[0])) + if exe.len == 0: exe = matches[0] + result = exe & " " & matches[1] % f + else: + result = cmd % f + +proc showBottomPanel() = + if not win.settings.bottomPanelVisible: + win.bottomPanelTabs.show() + win.settings.bottomPanelVisible = true + PCheckMenuItem(win.viewBottomPanelMenuItem).itemSetActive(true) + # Scroll to the end of the TextView + # This is stupid, it works sometimes... it's random + var endIter: TTextIter + win.outputTextView.getBuffer().getEndIter(addr(endIter)) + discard win.outputTextView.scrollToIter( + addr(endIter), 0.25, False, 0.0, 0.0) + +proc compileRun(currentTab: int, shouldRun: bool) = + if win.Tabs[currentTab].filename.len == 0: return + # Clear the outputTextView + win.outputTextView.getBuffer().setText("", 0) + + var outp = osProc.execProcess(GetCmd(win.settings.nimrodCmd, + win.Tabs[currentTab].filename)) + # Colors + var normalTag = createColor(win.outputTextView, "normalTag", "#3d3d3d") + var errorTag = createColor(win.outputTextView, "errorTag", "red") + var warningTag = createColor(win.outputTextView, "warningTag", "darkorange") + var successTag = createColor(win.outputTextView, "successTag", "darkgreen") + for x in outp.splitLines(): + if x =~ pegLineError / pegOtherError: + win.outputTextView.addText("\n" & x, errorTag) + elif x=~ pegSuccess: + win.outputTextView.addText("\n" & x, successTag) + + # Launch the process + if shouldRun: + var filename = changeFileExt(win.Tabs[currentTab].filename, os.ExeExt) + var output = "\n" & osProc.execProcess(filename) + win.outputTextView.addText(output) + elif x =~ pegLineWarning: + win.outputTextView.addText("\n" & x, warningTag) + else: + win.outputTextView.addText("\n" & x, normalTag) + showBottomPanel() + +proc CompileCurrent_Activate(menuitem: PMenuItem, user_data: pgpointer) = + saveFile_Activate(nil, nil) + compileRun(win.SourceViewTabs.getCurrentPage(), false) + +proc CompileRunCurrent_Activate(menuitem: PMenuItem, user_data: pgpointer) = + saveFile_Activate(nil, nil) + compileRun(win.SourceViewTabs.getCurrentPage(), true) + +proc CompileProject_Activate(menuitem: PMenuItem, user_data: pgpointer) = + saveAllTabs() + compileRun(getProjectTab(), false) + +proc CompileRunProject_Activate(menuitem: PMenuItem, user_data: pgpointer) = + saveAllTabs() + compileRun(getProjectTab(), true) + +proc RunCustomCommand(cmd: string) = + saveFile_Activate(nil, nil) + var currentTab = win.SourceViewTabs.getCurrentPage() + if win.Tabs[currentTab].filename.len == 0 or cmd.len == 0: return + # Clear the outputTextView + win.outputTextView.getBuffer().setText("", 0) + var outp = osProc.execProcess(GetCmd(cmd, win.Tabs[currentTab].filename)) + var normalTag = createColor(win.outputTextView, "normalTag", "#3d3d3d") + for x in outp.splitLines(): + win.outputTextView.addText("\n" & x, normalTag) + showBottomPanel() + +proc RunCustomCommand1(menuitem: PMenuItem, user_data: pgpointer) = + RunCustomCommand(win.settings.customCmd1) + +proc RunCustomCommand2(menuitem: PMenuItem, user_data: pgpointer) = + RunCustomCommand(win.settings.customCmd2) + +proc RunCustomCommand3(menuitem: PMenuItem, user_data: pgpointer) = + RunCustomCommand(win.settings.customCmd3) + +# -- FindBar + +proc nextBtn_Clicked(button: PButton, user_data: pgpointer) = findText(True) +proc prevBtn_Clicked(button: PButton, user_data: pgpointer) = findText(False) + +proc replaceBtn_Clicked(button: PButton, user_data: pgpointer) = + var currentTab = win.SourceViewTabs.getCurrentPage() + var start, theEnd: TTextIter + if not win.Tabs[currentTab].buffer.getSelectionBounds( + addr(start), addr(theEnd)): + # If no text is selected, try finding a match. + findText(True) + if not win.Tabs[currentTab].buffer.getSelectionBounds( + addr(start), addr(theEnd)): + # No match + return + + # Remove the text + win.Tabs[currentTab].buffer.delete(addr(start), addr(theEnd)) + # Insert the replacement + var text = getText(win.replaceEntry) + win.Tabs[currentTab].buffer.insert(addr(start), text, len(text)) + +proc replaceAllBtn_Clicked(button: PButton, user_data: pgpointer) = + var find = getText(win.findEntry) + var replace = getText(win.replaceEntry) + discard replaceAll(find, replace) + +proc closeBtn_Clicked(button: PButton, user_data: pgpointer) = + win.findBar.hide() + +proc caseSens_Changed(radiomenuitem: PRadioMenuitem, user_data: pgpointer) = + win.settings.search = "casesens" +proc caseInSens_Changed(radiomenuitem: PRadioMenuitem, user_data: pgpointer) = + win.settings.search = "caseinsens" +proc style_Changed(radiomenuitem: PRadioMenuitem, user_data: pgpointer) = + win.settings.search = "style" +proc regex_Changed(radiomenuitem: PRadioMenuitem, user_data: pgpointer) = + win.settings.search = "regex" +proc peg_Changed(radiomenuitem: PRadioMenuitem, user_data: pgpointer) = + win.settings.search = "peg" + +proc extraBtn_Clicked(button: PButton, user_data: pgpointer) = + var extraMenu = menuNew() + var group: PGSList + + var caseSensMenuItem = radio_menu_item_new(group, "Case sensitive") + extraMenu.append(caseSensMenuItem) + discard signal_connect(caseSensMenuItem, "toggled", + SIGNAL_FUNC(caseSens_Changed), nil) + caseSensMenuItem.show() + group = caseSensMenuItem.ItemGetGroup() + + var caseInSensMenuItem = radio_menu_item_new(group, "Case insensitive") + extraMenu.append(caseInSensMenuItem) + discard signal_connect(caseInSensMenuItem, "toggled", + SIGNAL_FUNC(caseInSens_Changed), nil) + caseInSensMenuItem.show() + group = caseInSensMenuItem.ItemGetGroup() + + var styleMenuItem = radio_menu_item_new(group, "Style insensitive") + extraMenu.append(styleMenuItem) + discard signal_connect(styleMenuItem, "toggled", + SIGNAL_FUNC(style_Changed), nil) + styleMenuItem.show() + group = styleMenuItem.ItemGetGroup() + + var regexMenuItem = radio_menu_item_new(group, "Regex") + extraMenu.append(regexMenuItem) + discard signal_connect(regexMenuItem, "toggled", + SIGNAL_FUNC(regex_Changed), nil) + regexMenuItem.show() + group = regexMenuItem.ItemGetGroup() + + var pegMenuItem = radio_menu_item_new(group, "Pegs") + extraMenu.append(pegMenuItem) + discard signal_connect(pegMenuItem, "toggled", + SIGNAL_FUNC(peg_Changed), nil) + pegMenuItem.show() + + # Make the correct radio button active + case win.settings.search + of "casesens": + PCheckMenuItem(caseSensMenuItem).ItemSetActive(True) + of "caseinsens": + PCheckMenuItem(caseInSensMenuItem).ItemSetActive(True) + of "style": + PCheckMenuItem(styleMenuItem).ItemSetActive(True) + of "regex": + PCheckMenuItem(regexMenuItem).ItemSetActive(True) + of "peg": + PCheckMenuItem(pegMenuItem).ItemSetActive(True) + + extraMenu.popup(nil, nil, nil, nil, 0, get_current_event_time()) + +# GUI Initialization + +proc createAccelMenuItem(toolsMenu: PMenu, accGroup: PAccelGroup, + label: string, acc: gint, + action: proc (i: PMenuItem, p: pgpointer)) = + var result = menu_item_new(label) + result.addAccelerator("activate", accGroup, acc, 0, ACCEL_VISIBLE) + ToolsMenu.append(result) + show(result) + discard signal_connect(result, "activate", SIGNAL_FUNC(action), nil) + +proc createSeparator(menu: PMenu) = + var sep = separator_menu_item_new() + menu.append(sep) + sep.show() + +proc initTopMenu(MainBox: PBox) = + # Create a accelerator group, used for shortcuts + # like CTRL + S in SaveMenuItem + var accGroup = accel_group_new() + add_accel_group(win.w, accGroup) + + # TopMenu(MenuBar) + var TopMenu = menuBarNew() + + # FileMenu + var FileMenu = menuNew() + + var NewMenuItem = menu_item_new("New") # New + FileMenu.append(NewMenuItem) + show(NewMenuItem) + discard signal_connect(NewMenuItem, "activate", + SIGNAL_FUNC(newFile), nil) + + createSeparator(FileMenu) + + var OpenMenuItem = menu_item_new("Open...") # Open... + # CTRL + O + OpenMenuItem.add_accelerator("activate", accGroup, + KEY_o, CONTROL_MASK, ACCEL_VISIBLE) + FileMenu.append(OpenMenuItem) + show(OpenMenuItem) + discard signal_connect(OpenMenuItem, "activate", + SIGNAL_FUNC(aporia.openFile), nil) + + var SaveMenuItem = menu_item_new("Save") # Save + # CTRL + S + SaveMenuItem.add_accelerator("activate", accGroup, + KEY_s, CONTROL_MASK, ACCEL_VISIBLE) + FileMenu.append(SaveMenuItem) + show(SaveMenuItem) + discard signal_connect(SaveMenuItem, "activate", + SIGNAL_FUNC(saveFile_activate), nil) + + var SaveAsMenuItem = menu_item_new("Save As...") # Save as... + + SaveAsMenuItem.add_accelerator("activate", accGroup, + KEY_s, CONTROL_MASK or gdk2.SHIFT_MASK, ACCEL_VISIBLE) + FileMenu.append(SaveAsMenuItem) + show(SaveAsMenuItem) + discard signal_connect(SaveAsMenuItem, "activate", + SIGNAL_FUNC(saveFileAs_Activate), nil) + + var FileMenuItem = menuItemNewWithMnemonic("_File") + + FileMenuItem.setSubMenu(FileMenu) + FileMenuItem.show() + TopMenu.append(FileMenuItem) + + # Edit menu + var EditMenu = menuNew() + + var UndoMenuItem = menu_item_new("Undo") # Undo + EditMenu.append(UndoMenuItem) + show(UndoMenuItem) + discard signal_connect(UndoMenuItem, "activate", + SIGNAL_FUNC(aporia.undo), nil) + + var RedoMenuItem = menu_item_new("Redo") # Undo + EditMenu.append(RedoMenuItem) + show(RedoMenuItem) + discard signal_connect(RedoMenuItem, "activate", + SIGNAL_FUNC(aporia.redo), nil) + + createSeparator(EditMenu) + + var FindMenuItem = menu_item_new("Find") # Find + FindMenuItem.add_accelerator("activate", accGroup, + KEY_f, CONTROL_MASK, ACCEL_VISIBLE) + EditMenu.append(FindMenuItem) + show(FindMenuItem) + discard signal_connect(FindMenuItem, "activate", + SIGNAL_FUNC(aporia.find_Activate), nil) + + var ReplaceMenuItem = menu_item_new("Replace") # Replace + ReplaceMenuItem.add_accelerator("activate", accGroup, + KEY_h, CONTROL_MASK, ACCEL_VISIBLE) + EditMenu.append(ReplaceMenuItem) + show(ReplaceMenuItem) + discard signal_connect(ReplaceMenuItem, "activate", + SIGNAL_FUNC(aporia.replace_Activate), nil) + + createSeparator(EditMenu) + + var SettingsMenuItem = menu_item_new("Settings...") # Settings + EditMenu.append(SettingsMenuItem) + show(SettingsMenuItem) + discard signal_connect(SettingsMenuItem, "activate", + SIGNAL_FUNC(aporia.Settings_Activate), nil) + + var EditMenuItem = menuItemNewWithMnemonic("_Edit") + + EditMenuItem.setSubMenu(EditMenu) + EditMenuItem.show() + TopMenu.append(EditMenuItem) + + # View menu + var ViewMenu = menuNew() + + win.viewBottomPanelMenuItem = check_menu_item_new("Bottom Panel") + PCheckMenuItem(win.viewBottomPanelMenuItem).itemSetActive( + win.settings.bottomPanelVisible) + win.viewBottomPanelMenuItem.add_accelerator("activate", accGroup, + KEY_f9, CONTROL_MASK, ACCEL_VISIBLE) + ViewMenu.append(win.viewBottomPanelMenuItem) + show(win.viewBottomPanelMenuItem) + discard signal_connect(win.viewBottomPanelMenuItem, "toggled", + SIGNAL_FUNC(aporia.viewBottomPanel_Toggled), nil) + + var ViewMenuItem = menuItemNewWithMnemonic("_View") + + ViewMenuItem.setSubMenu(ViewMenu) + ViewMenuItem.show() + TopMenu.append(ViewMenuItem) + + + # Tools menu + var ToolsMenu = menuNew() + + createAccelMenuItem(ToolsMenu, accGroup, "Compile current file", + KEY_F4, aporia.CompileCurrent_Activate) + createAccelMenuItem(ToolsMenu, accGroup, "Compile & run current file", + KEY_F5, aporia.CompileRunCurrent_Activate) + createSeparator(ToolsMenu) + createAccelMenuItem(ToolsMenu, accGroup, "Compile project", + KEY_F8, aporia.CompileProject_Activate) + createAccelMenuItem(ToolsMenu, accGroup, "Compile & run project", + KEY_F9, aporia.CompileRunProject_Activate) + createSeparator(ToolsMenu) + createAccelMenuItem(ToolsMenu, accGroup, "Run custom command 1", + KEY_F1, aporia.RunCustomCommand1) + createAccelMenuItem(ToolsMenu, accGroup, "Run custom command 2", + KEY_F2, aporia.RunCustomCommand2) + createAccelMenuItem(ToolsMenu, accGroup, "Run custom command 3", + KEY_F3, aporia.RunCustomCommand3) + + var ToolsMenuItem = menuItemNewWithMnemonic("_Tools") + + ToolsMenuItem.setSubMenu(ToolsMenu) + ToolsMenuItem.show() + TopMenu.append(ToolsMenuItem) + + # Help menu + MainBox.packStart(TopMenu, False, False, 0) + TopMenu.show() + +proc initToolBar(MainBox: PBox) = + # TopBar(ToolBar) + var TopBar = toolbarNew() + TopBar.setStyle(TOOLBAR_ICONS) + + var NewFileItem = TopBar.insertStock(STOCK_NEW, "New File", + "New File", SIGNAL_FUNC(aporia.newFile), nil, 0) + TopBar.appendSpace() + var OpenItem = TopBar.insertStock(STOCK_OPEN, "Open", + "Open", SIGNAL_FUNC(aporia.openFile), nil, -1) + var SaveItem = TopBar.insertStock(STOCK_SAVE, "Save", + "Save", SIGNAL_FUNC(saveFile_Activate), nil, -1) + TopBar.appendSpace() + var UndoItem = TopBar.insertStock(STOCK_UNDO, "Undo", + "Undo", SIGNAL_FUNC(aporia.undo), nil, -1) + var RedoItem = TopBar.insertStock(STOCK_REDO, "Redo", + "Redo", SIGNAL_FUNC(aporia.redo), nil, -1) + + MainBox.packStart(TopBar, False, False, 0) + TopBar.show() + +proc initSourceViewTabs() = + win.SourceViewTabs = notebookNew() + #win.sourceViewTabs.dragDestSet(DEST_DEFAULT_DROP, nil, 0, ACTION_MOVE) + discard win.SourceViewTabs.signalConnect( + "switch-page", SIGNAL_FUNC(onSwitchTab), nil) + #discard win.SourceViewTabs.signalConnect( + # "drag-drop", SIGNAL_FUNC(svTabs_DragDrop), nil) + #discard win.SourceViewTabs.signalConnect( + # "drag-data-received", SIGNAL_FUNC(svTabs_DragDataRecv), nil) + #discard win.SourceViewTabs.signalConnect( + # "drag-motion", SIGNAL_FUNC(svTabs_DragMotion), nil) + win.SourceViewTabs.set_scrollable(True) + + win.SourceViewTabs.show() + if lastSession.len != 0: + for i in 0 .. len(lastSession)-1: + var splitUp = lastSession[i].split('|') + var (filename, offset) = (splitUp[0], splitUp[1]) + addTab("", filename) + + var iter: TTextIter + win.Tabs[i].buffer.getIterAtOffset(addr(iter), offset.parseInt()) + win.Tabs[i].buffer.moveMarkByName("insert", addr(iter)) + win.Tabs[i].buffer.moveMarkByName("selection_bound", addr(iter)) + + # TODO: Fix this..... :( + discard PTextView(win.Tabs[i].sourceView). + scrollToIter(addr(iter), 0.25, true, 0.0, 0.0) + else: + addTab("", "") + + # This doesn't work :\ + win.Tabs[0].sourceView.grabFocus() + + +proc initBottomTabs() = + win.bottomPanelTabs = notebookNew() + if win.settings.bottomPanelVisible: + win.bottomPanelTabs.show() + + # output tab + var tabLabel = labelNew("Output") + var outputTab = vboxNew(False, 0) + discard win.bottomPanelTabs.appendPage(outputTab, tabLabel) + # Compiler tabs, gtktextview + var outputScrolledWindow = scrolledwindowNew(nil, nil) + outputScrolledWindow.setPolicy(POLICY_AUTOMATIC, POLICY_AUTOMATIC) + outputTab.packStart(outputScrolledWindow, true, true, 0) + outputScrolledWindow.show() + + win.outputTextView = textviewNew() + outputScrolledWindow.add(win.outputTextView) + win.outputTextView.show() + + outputTab.show() + +proc initTAndBP(MainBox: PBox) = + # This init's the HPaned, which splits the sourceViewTabs + # and the BottomPanelTabs + initSourceViewTabs() + initBottomTabs() + + var TAndBPVPaned = vpanedNew() + tandbpVPaned.pack1(win.sourceViewTabs, resize=True, shrink=False) + tandbpVPaned.pack2(win.bottomPanelTabs, resize=False, shrink=False) + MainBox.packStart(TAndBPVPaned, True, True, 0) + tandbpVPaned.setPosition(win.settings.VPanedPos) + TAndBPVPaned.show() + +proc initFindBar(MainBox: PBox) = + # Create a fixed container + win.findBar = HBoxNew(False, 0) + win.findBar.setSpacing(4) + + # Add a Label 'Find' + var findLabel = labelNew("Find:") + win.findBar.packStart(findLabel, False, False, 0) + findLabel.show() + + # Add a (find) text entry + win.findEntry = entryNew() + win.findBar.packStart(win.findEntry, False, False, 0) + discard win.findEntry.signalConnect("activate", SIGNAL_FUNC( + aporia.nextBtn_Clicked), nil) + win.findEntry.show() + var rq: TRequisition + win.findEntry.sizeRequest(addr(rq)) + + # Make the (find) text entry longer + win.findEntry.set_size_request(190, rq.height) + + # Add a Label 'Replace' + # - This Is only shown, when the 'Search & Replace'(CTRL + H) is shown + win.replaceLabel = labelNew("Replace:") + win.findBar.packStart(win.replaceLabel, False, False, 0) + #replaceLabel.show() + + # Add a (replace) text entry + # - This Is only shown, when the 'Search & Replace'(CTRL + H) is shown + win.replaceEntry = entryNew() + win.findBar.packStart(win.replaceEntry, False, False, 0) + #win.replaceEntry.show() + var rq1: TRequisition + win.replaceEntry.sizeRequest(addr(rq1)) + + # Make the (replace) text entry longer + win.replaceEntry.set_size_request(100, rq1.height) + + # Find next button + var nextBtn = buttonNew("Next") + win.findBar.packStart(nextBtn, false, false, 0) + discard nextBtn.signalConnect("clicked", + SIGNAL_FUNC(aporia.nextBtn_Clicked), nil) + nextBtn.show() + var nxtBtnRq: TRequisition + nextBtn.sizeRequest(addr(nxtBtnRq)) + + # Find previous button + var prevBtn = buttonNew("Previous") + win.findBar.packStart(prevBtn, false, false, 0) + discard prevBtn.signalConnect("clicked", + SIGNAL_FUNC(aporia.prevBtn_Clicked), nil) + prevBtn.show() + + # Replace button + # - This Is only shown, when the 'Search & Replace'(CTRL + H) is shown + win.replaceBtn = buttonNew("Replace") + win.findBar.packStart(win.replaceBtn, false, false, 0) + discard win.replaceBtn.signalConnect("clicked", + SIGNAL_FUNC(aporia.replaceBtn_Clicked), nil) + #replaceBtn.show() + + # Replace all button + # - this Is only shown, when the 'Search & Replace'(CTRL + H) is shown + win.replaceAllBtn = buttonNew("Replace All") + win.findBar.packStart(win.replaceAllBtn, false, false, 0) + discard win.replaceAllBtn.signalConnect("clicked", + SIGNAL_FUNC(aporia.replaceAllBtn_Clicked), nil) + #replaceAllBtn.show() + + # Right side ... + + # Close button - With a close stock image + var closeBtn = buttonNew() + var closeImage = imageNewFromStock(STOCK_CLOSE, ICON_SIZE_SMALL_TOOLBAR) + var closeBox = hboxNew(False, 0) + closeBtn.add(closeBox) + closeBox.show() + closeBox.add(closeImage) + closeImage.show() + discard closeBtn.signalConnect("clicked", + SIGNAL_FUNC(aporia.closeBtn_Clicked), nil) + win.findBar.packEnd(closeBtn, False, False, 2) + closeBtn.show() + + # Extra button - When clicked shows a menu with options like 'Use regex' + var extraBtn = buttonNew() + var extraImage = imageNewFromStock(STOCK_PROPERTIES, ICON_SIZE_SMALL_TOOLBAR) + + var extraBox = hboxNew(False, 0) + extraBtn.add(extraBox) + extraBox.show() + extraBox.add(extraImage) + extraImage.show() + discard extraBtn.signalConnect("clicked", + SIGNAL_FUNC(aporia.extraBtn_Clicked), nil) + win.findBar.packEnd(extraBtn, False, False, 0) + extraBtn.show() + + MainBox.packStart(win.findBar, False, False, 0) + win.findBar.show() + +proc initStatusBar(MainBox: PBox) = + win.bottomBar = statusbarNew() + MainBox.packStart(win.bottomBar, False, False, 0) + win.bottomBar.show() + + discard win.bottomBar.push(0, "Line: 0 Column: 0") + +proc initControls() = + # Load up the language style + win.langMan = languageManagerGetDefault() + var langpaths: array[0..1, cstring] = + [cstring(os.getApplicationDir() / langSpecs), nil] + win.langMan.setSearchPath(addr(langpaths)) + var nimLang = win.langMan.getLanguage("nimrod") + win.nimLang = nimLang + + # Load the scheme + var schemeMan = schemeManagerGetDefault() + var schemepaths: array[0..1, cstring] = + [cstring(os.getApplicationDir() / styles), nil] + schemeMan.setSearchPath(addr(schemepaths)) + win.scheme = schemeMan.getScheme(win.settings.colorSchemeID) + + # Window + win.w = windowNew(gtk2.WINDOW_TOPLEVEL) + win.w.setDefaultSize(win.settings.winWidth, win.settings.winHeight) + win.w.setTitle("Aporia IDE") + if win.settings.winMaximized: win.w.maximize() + + win.w.show() # The window has to be shown before + # setting the position of the VPaned so that + # it gets set correctly, when the window is maximized. + + discard win.w.signalConnect("destroy", SIGNAL_FUNC(aporia.destroy), nil) + discard win.w.signalConnect("delete_event", + SIGNAL_FUNC(aporia.delete_event), nil) + discard win.w.signalConnect("window-state-event", + SIGNAL_FUNC(aporia.windowState_Changed), nil) + + # MainBox (vbox) + var MainBox = vboxNew(False, 0) + win.w.add(MainBox) + + initTopMenu(MainBox) + initToolBar(MainBox) + initTAndBP(MainBox) + initFindBar(MainBox) + initStatusBar(MainBox) + + MainBox.show() + if confParseFail: + dialogs.warning(win.w, "Error parsing config file, using default settings.") + +nimrod_init() +initControls() +main() + diff --git a/tests/examplefiles/example.sml b/tests/examplefiles/example.sml new file mode 100644 index 00000000..31db47d2 --- /dev/null +++ b/tests/examplefiles/example.sml @@ -0,0 +1,156 @@ +structure C = struct + val a = 12 + fun f x = x + 5 +end + +(*(*(*(*(* This file is all pretty strange Standard ML *)*)*)*) (**)*) +(* Robert J. Simmons *) + +(* Comments (* can be nested *) *) +structure S = struct + val x = (1, 2, "three") +end + +structure Sv = struct + (* These look good *) + val x = (1, 2, "three") + val z = #2 x + + (* Although these look bad (not all the numbers are constants), * + * they never occur in practice, as they are equivalent to the above. *) + val x = {1 = 1, 3 = "three", 2 = 2} + val z = # + 2 x + + val || = 12 +end + +signature S = sig end + +structure S = struct + val x = (1, 2, "three") + datatype 'a t = T of 'a + and u = U of v * v + withtype v = {left: int t, right: int t} + exception E1 of int and E2 + fun 'a id (x: 'a) : 'a = x + + val + 'a id = fn (x : 'a) => x +end + +signature R = sig + type t + val x : t + val f : t * int -> int +end +structure R : R = struct + datatype t = T of int + val x : t = T 0 + fun f (T x, i : int) : int = x + i + fun 'a id (x: 'a) : 'a = x +end + +signature BA_Z = sig + val s: int + include S R +end + +structure b______ = struct (* What (* A * strange * name *) for ) a ( struct *) + +val !%&$#+-/:<=>?@\~`^|* = 3 + +type struct' = int list +and 'a sig' = 'a list +and ('a, 'b) end' = 'b option * 'a list + +structure baz = struct + structure Bar = struct + val foo = !%&$#+-/:<=>?@\~`^|* + end +end + +infixr +!+ +fun (a +!+ b) = (op +) (a, b) + +open baz S R + +val$$$ = fn x => fn y => fn z => fn w => w +val (foo, ++, bar, ||) = (4, baz.Bar.foo, !%&$#+-/:<=>?@\~`^|*, Bar.foo) +val _ = $$$foo++bar|| + +val val'ue : ' list = [] +val struct3 : (' -> ') = fn x => x +val end_struct_' : ('a -> 'a) = fn x => x +val x : (''a -> ''a) = fn x => x +val x : ('''' -> '''') = fn x => x +val x : unit = print "Weird, huh?\n" +val w = {x=1,y=2,##= =3,4=3} +val {##=, x, 4=a,...} = w +val z = #4 w +val z = # ##= w + +fun f x y 0 = 4 + | f x y z = 4 + Sv.|| + +exception Foo of int +datatype ('0, 'b, '_, ') f'o'o = Bar | baZ12' | dsfa_fad | #@$ | Bug +and (', ''', '''', ''''') bar = + Bee of unit + | Ben of (', ''', '''', ''''') f'o'o * int + | X of ''' list + +fun q x = raise Foo x +and h x = raise Foo (~x) + +val x = 4 +and y = 5 + +fun q 0 = 4 + | q 1 = (case 1 of 1 => 2 | 3 => 4 | x => y) + | q y = case y of 1 => 2 | 3 => 4 | x => y + +val x = ref true +fun q 0 = 4 + | q 1 = if false then case 1 of 1 => 2 | 3 => 4 | x => y else 19 + | q 2 = (while !x handle Match => !x | Fail _ => !x do () ; 2) + | q x = (raise Match) handle Domain => 9 | Match => 3 + +fun p 0 = 12 + | p 1 = 8 + | p 2 = r false + | p x = r true +and r true = 19 + | r false = 12 + +val _ = 123 +val _ = 0001 +val _ = ~123 +val _ = ~0001 +val _ = 0w12412 +val _ = 0w12412 +val _ = 0xfA0 +val _ = ~0xfA0 +val _ = 0wxfA0 +val _ = 1.4 +val _ = ~1.4 +val _ = 1e~2 +val _ = 1E~2 +val _ = 1e2 +val _ = 1E2 +val _ = 1.4e~2 +val _ = 1.4E~2 +val _ = 1.4e2 +val _ = 1.4E2 + +val c = #"\000" +val st = "foo \ + \ bar" ^ "baz \ + \ and \ + \ such\n" + +val () = print st + +val _ = foo::bar::4::[++] + +end diff --git a/tests/examplefiles/example_file.fy b/tests/examplefiles/example_file.fy new file mode 100644 index 00000000..43e80c1d --- /dev/null +++ b/tests/examplefiles/example_file.fy @@ -0,0 +1,128 @@ +class Person { + def initialize: @name age: @age { + """ + This is a docstring for the Person constructor method. + Docstrings usually are multi-line, like this one. + """ + } + + def to_s { + # return is optional in this case, but we use it nontheless + return "Person with name: #{@name inspect} and age: #{@age}" + } +} + +class PersonWithCity : Person { + def initialize: @name age: @age city: @city { + } + + def to_s { + super to_s ++ " living in: #{@city inspect}" + } +} + +p1 = Person new: "Johnny Jackson" age: 42 +p1 println # prints: Person with name: "Johnny Jackson" and age: 42 + +p2 = PersonWithCity new: "John Appleseed" age: 55 city: "New York" +p2 println # prints: Person with name: "John Appleseed" age: 55 living in: "New York" + +array = [1,2,3, "foo", 'bar] +hash = <['foo => "bar", 'bar => 42]> +tuple = (1,2,"hello","world") +block = |x, y| { + x + y println +} +block call: [4,2] + +0b010101 & 0b00101 to_s: 2 . println +0xFF & 0xAB to_s: 16 . println +0o77 > 0o76 println +123.123 + 0.222 println + +x = 0 +try { + 10 / x println +} catch ZeroDivisionError => e { + x = 3 + retry +} finally { + "Finally, done!" println +} + +def a_method: arg1 with_default_arg: arg2 (42) { + arg1 * arg2 println +} + +a_method: 42 +a_method: 42 with_default_arg: 85 + +class ClassWithClassMethod { + def self class_method1 { + 'works + } + + def ClassWithClassMethod class_method2 { + 'this_as_well + } +} + +ClassWithClassMethod class_method1 println +ClassWithClassMethod class_method2 println + +def another_method: block { + 1 upto: 10 . map: block +} + +# local returns +another_method: |x| { return_local x * 2 } . inspect println + + +# pattern matching: +class PatternMatching { + def match_it: obj { + match obj { + case String -> "It's a String!" println + case Fixnum -> "It's a Number!" println + case _ -> "Aything else!" println + } + } + + def match_with_extract: str { + match str { + # m holds the MatchData object, m1 & m2 the first and second matches + case /^(.*) : (.*)$/ -> |m, m1, m2| + "First match: #{m1}" println + "Second match: #{m2}" println + } + } +} + +pm = PatternMatching new +pm match_it: "foo" +pm match_it: 42 +pm match_it: 'foo + +pm match_with_extract: "Hello : World!" + + +# calling ruby methods: +[3, 2, 1] reverse() each() |a| { puts(a) } +"Hello" sub("ll", "y") println +[3, 2, 1] map() |a| { a * 2 } inject(0) |s i| { s + i } println + +# test symbol highlighting +['foo] +['foo?!] +{'foo} +{'foo!?} +{'foo:bar?!=&/:} +('foo) + +# future sends +42 @ to_s class println +42 @ to_s: 16 . value println + +# async sends +42 @@ println +42 @@ upto: 100 diff --git a/tests/examplefiles/intsyn.fun b/tests/examplefiles/intsyn.fun new file mode 100644 index 00000000..777b0fdb --- /dev/null +++ b/tests/examplefiles/intsyn.fun @@ -0,0 +1,675 @@ +(* Internal Syntax *) +(* Author: Frank Pfenning, Carsten Schuermann *) +(* Modified: Roberto Virga *) + +functor IntSyn (structure Global : GLOBAL) :> INTSYN = +struct + + type cid = int (* Constant identifier *) + type name = string (* Variable name *) + type mid = int (* Structure identifier *) + type csid = int (* CS module identifier *) + + + (* Contexts *) + datatype 'a Ctx = (* Contexts *) + Null (* G ::= . *) + | Decl of 'a Ctx * 'a (* | G, D *) + + (* ctxPop (G) => G' + Invariant: G = G',D + *) + fun ctxPop (Decl (G, D)) = G + + exception Error of string (* raised if out of space *) + (* ctxLookup (G, k) = D, kth declaration in G from right to left + Invariant: 1 <= k <= |G|, where |G| is length of G + *) + + fun ctxLookup (Decl (G', D), 1) = D + | ctxLookup (Decl (G', _), k') = ctxLookup (G', k'-1) +(* | ctxLookup (Null, k') = (print ("Looking up k' = " ^ Int.toString k' ^ "\n"); raise Error "Out of Bounce\n")*) + (* ctxLookup (Null, k') should not occur by invariant *) + + (* ctxLength G = |G|, the number of declarations in G *) + fun ctxLength G = + let + fun ctxLength' (Null, n) = n + | ctxLength' (Decl(G, _), n)= ctxLength' (G, n+1) + in + ctxLength' (G, 0) + end + + type FgnExp = exn (* foreign expression representation *) + exception UnexpectedFgnExp of FgnExp + (* raised by a constraint solver + if passed an incorrect arg *) + + type FgnCnstr = exn (* foreign unification constraint + representation *) + exception UnexpectedFgnCnstr of FgnCnstr + (* raised by a constraint solver + if passed an incorrect arg *) + + datatype Depend = (* Dependency information *) + No (* P ::= No *) + | Maybe (* | Maybe *) + | Meta (* | Meta *) + + (* Expressions *) + + datatype Uni = (* Universes: *) + Kind (* L ::= Kind *) + | Type (* | Type *) + + datatype Exp = (* Expressions: *) + Uni of Uni (* U ::= L *) + | Pi of (Dec * Depend) * Exp (* | bPi (D, P). V *) + | Root of Head * Spine (* | C @ S *) + | Redex of Exp * Spine (* | U @ S *) + | Lam of Dec * Exp (* | lam D. U *) + | EVar of Exp option ref * Dec Ctx * Exp * (Cnstr ref) list ref + (* | X<I> : G|-V, Cnstr *) + + | EClo of Exp * Sub (* | U[s] *) + | AVar of Exp option ref (* | A<I> *) + | NVar of int (* | n (linear, fully applied) *) + (* grafting variable *) + + | FgnExp of csid * FgnExp + (* | (foreign expression) *) + + and Head = (* Heads: *) + BVar of int (* H ::= k *) + | Const of cid (* | c *) + | Proj of Block * int (* | #k(b) *) + | Skonst of cid (* | c# *) + | Def of cid (* | d *) + | NSDef of cid (* | d (non strict) *) + | FVar of name * Exp * Sub (* | F[s] *) + | FgnConst of csid * ConDec (* | (foreign constant) *) + + and Spine = (* Spines: *) + Nil (* S ::= Nil *) + | App of Exp * Spine (* | U ; S *) + | SClo of Spine * Sub (* | S[s] *) + + and Sub = (* Explicit substitutions: *) + Shift of int (* s ::= ^n *) + | Dot of Front * Sub (* | Ft.s *) + + and Front = (* Fronts: *) + Idx of int (* Ft ::= k *) + | Exp of Exp (* | U *) + | Axp of Exp (* | U (assignable) *) + | Block of Block (* | _x *) + | Undef (* | _ *) + + and Dec = (* Declarations: *) + Dec of name option * Exp (* D ::= x:V *) + | BDec of name option * (cid * Sub) (* | v:l[s] *) + | ADec of name option * int (* | v[^-d] *) + | NDec of name option + + and Block = (* Blocks: *) + Bidx of int (* b ::= v *) + | LVar of Block option ref * Sub * (cid * Sub) + (* | L(l[^k],t) *) + | Inst of Exp list (* | u1, ..., Un *) + + + (* Constraints *) + + and Cnstr = (* Constraint: *) + Solved (* Cnstr ::= solved *) + | Eqn of Dec Ctx * Exp * Exp (* | G|-(U1 == U2) *) + | FgnCnstr of csid * FgnCnstr (* | (foreign) *) + + and Status = (* Status of a constant: *) + Normal (* inert *) + | Constraint of csid * (Dec Ctx * Spine * int -> Exp option) + (* acts as constraint *) + | Foreign of csid * (Spine -> Exp) (* is converted to foreign *) + + and FgnUnify = (* Result of foreign unify *) + Succeed of FgnUnifyResidual list + (* succeed with a list of residual operations *) + | Fail + + and FgnUnifyResidual = (* Residual of foreign unify *) + Assign of Dec Ctx * Exp * Exp * Sub + (* perform the assignment G |- X = U [ss] *) + | Delay of Exp * Cnstr ref + (* delay cnstr, associating it with all the rigid EVars in U *) + + (* Global signature *) + + and ConDec = (* Constant declaration *) + ConDec of string * mid option * int * Status + (* a : K : kind or *) + * Exp * Uni (* c : A : type *) + | ConDef of string * mid option * int (* a = A : K : kind or *) + * Exp * Exp * Uni (* d = M : A : type *) + * Ancestor (* Ancestor info for d or a *) + | AbbrevDef of string * mid option * int + (* a = A : K : kind or *) + * Exp * Exp * Uni (* d = M : A : type *) + | BlockDec of string * mid option (* %block l : SOME G1 PI G2 *) + * Dec Ctx * Dec list + + | BlockDef of string * mid option * cid list + (* %block l = (l1 | ... | ln) *) + + | SkoDec of string * mid option * int (* sa: K : kind or *) + * Exp * Uni (* sc: A : type *) + + and Ancestor = (* Ancestor of d or a *) + Anc of cid option * int * cid option (* head(expand(d)), height, head(expand[height](d)) *) + (* NONE means expands to {x:A}B *) + + datatype StrDec = (* Structure declaration *) + StrDec of string * mid option + + (* Form of constant declaration *) + datatype ConDecForm = + FromCS (* from constraint domain *) + | Ordinary (* ordinary declaration *) + | Clause (* %clause declaration *) + + (* Type abbreviations *) + type dctx = Dec Ctx (* G = . | G,D *) + type eclo = Exp * Sub (* Us = U[s] *) + type bclo = Block * Sub (* Bs = B[s] *) + type cnstr = Cnstr ref + +(* exception Error of string (* raised if out of space *) *) + + + structure FgnExpStd = struct + + structure ToInternal = FgnOpnTable (type arg = unit + type result = Exp) + + structure Map = FgnOpnTable (type arg = Exp -> Exp + type result = Exp) + + structure App = FgnOpnTable (type arg = Exp -> unit + type result = unit) + + structure EqualTo = FgnOpnTable (type arg = Exp + type result = bool) + + structure UnifyWith = FgnOpnTable (type arg = Dec Ctx * Exp + type result = FgnUnify) + + + + fun fold csfe f b = let + val r = ref b + fun g U = r := f (U,!r) + in + App.apply csfe g ; !r + end + + end + + structure FgnCnstrStd = struct + + structure ToInternal = FgnOpnTable (type arg = unit + type result = (Dec Ctx * Exp) list) + + structure Awake = FgnOpnTable (type arg = unit + type result = bool) + + structure Simplify = FgnOpnTable (type arg = unit + type result = bool) + + end + + fun conDecName (ConDec (name, _, _, _, _, _)) = name + | conDecName (ConDef (name, _, _, _, _, _, _)) = name + | conDecName (AbbrevDef (name, _, _, _, _, _)) = name + | conDecName (SkoDec (name, _, _, _, _)) = name + | conDecName (BlockDec (name, _, _, _)) = name + | conDecName (BlockDef (name, _, _)) = name + + fun conDecParent (ConDec (_, parent, _, _, _, _)) = parent + | conDecParent (ConDef (_, parent, _, _, _, _, _)) = parent + | conDecParent (AbbrevDef (_, parent, _, _, _, _)) = parent + | conDecParent (SkoDec (_, parent, _, _, _)) = parent + | conDecParent (BlockDec (_, parent, _, _)) = parent + | conDecParent (BlockDef (_, parent, _)) = parent + + + (* conDecImp (CD) = k + + Invariant: + If CD is either a declaration, definition, abbreviation, or + a Skolem constant + then k stands for the number of implicit elements. + *) + fun conDecImp (ConDec (_, _, i, _, _, _)) = i + | conDecImp (ConDef (_, _, i, _, _, _, _)) = i + | conDecImp (AbbrevDef (_, _, i, _, _, _)) = i + | conDecImp (SkoDec (_, _, i, _, _)) = i + | conDecImp (BlockDec (_, _, _, _)) = 0 (* watch out -- carsten *) + + fun conDecStatus (ConDec (_, _, _, status, _, _)) = status + | conDecStatus _ = Normal + + (* conDecType (CD) = V + + Invariant: + If CD is either a declaration, definition, abbreviation, or + a Skolem constant + then V is the respective type + *) + fun conDecType (ConDec (_, _, _, _, V, _)) = V + | conDecType (ConDef (_, _, _, _, V, _, _)) = V + | conDecType (AbbrevDef (_, _, _, _, V, _)) = V + | conDecType (SkoDec (_, _, _, V, _)) = V + + + (* conDecBlock (CD) = (Gsome, Lpi) + + Invariant: + If CD is block definition + then Gsome is the context of some variables + and Lpi is the list of pi variables + *) + fun conDecBlock (BlockDec (_, _, Gsome, Lpi)) = (Gsome, Lpi) + + (* conDecUni (CD) = L + + Invariant: + If CD is either a declaration, definition, abbreviation, or + a Skolem constant + then L is the respective universe + *) + fun conDecUni (ConDec (_, _, _, _, _, L)) = L + | conDecUni (ConDef (_, _, _, _, _, L, _)) = L + | conDecUni (AbbrevDef (_, _, _, _, _, L)) = L + | conDecUni (SkoDec (_, _, _, _, L)) = L + + + fun strDecName (StrDec (name, _)) = name + + fun strDecParent (StrDec (_, parent)) = parent + + local + val maxCid = Global.maxCid + val dummyEntry = ConDec("", NONE, 0, Normal, Uni (Kind), Kind) + val sgnArray = Array.array (maxCid+1, dummyEntry) + : ConDec Array.array + val nextCid = ref(0) + + val maxMid = Global.maxMid + val sgnStructArray = Array.array (maxMid+1, StrDec("", NONE)) + : StrDec Array.array + val nextMid = ref (0) + + in + (* Invariants *) + (* Constant declarations are all well-typed *) + (* Constant declarations are stored in beta-normal form *) + (* All definitions are strict in all their arguments *) + (* If Const(cid) is valid, then sgnArray(cid) = ConDec _ *) + (* If Def(cid) is valid, then sgnArray(cid) = ConDef _ *) + + fun sgnClean (i) = if i >= !nextCid then () + else (Array.update (sgnArray, i, dummyEntry); + sgnClean (i+1)) + + fun sgnReset () = ((* Fri Dec 20 12:04:24 2002 -fp *) + (* this circumvents a space leak *) + sgnClean (0); + nextCid := 0; nextMid := 0) + fun sgnSize () = (!nextCid, !nextMid) + + fun sgnAdd (conDec) = + let + val cid = !nextCid + in + if cid > maxCid + then raise Error ("Global signature size " ^ Int.toString (maxCid+1) ^ " exceeded") + else (Array.update (sgnArray, cid, conDec) ; + nextCid := cid + 1; + cid) + end + + (* 0 <= cid < !nextCid *) + fun sgnLookup (cid) = Array.sub (sgnArray, cid) + + fun sgnApp (f) = + let + fun sgnApp' (cid) = + if cid = !nextCid then () else (f cid; sgnApp' (cid+1)) + in + sgnApp' (0) + end + + fun sgnStructAdd (strDec) = + let + val mid = !nextMid + in + if mid > maxMid + then raise Error ("Global signature size " ^ Int.toString (maxMid+1) ^ " exceeded") + else (Array.update (sgnStructArray, mid, strDec) ; + nextMid := mid + 1; + mid) + end + + (* 0 <= mid < !nextMid *) + fun sgnStructLookup (mid) = Array.sub (sgnStructArray, mid) + + (* A hack used in Flit - jcreed 6/05 *) + fun rename (cid, new) = + let + val newConDec = case sgnLookup cid of + ConDec (n,m,i,s,e,u) => ConDec(new,m,i,s,e,u) + | ConDef (n,m,i,e,e',u,a) => ConDef(new,m,i,e,e',u,a) + | AbbrevDef (n,m,i,e,e',u) => AbbrevDef (new,m,i,e,e',u) + | BlockDec (n,m,d,d') => BlockDec (new,m,d,d') + | SkoDec (n,m,i,e,u) => SkoDec (new,m,i,e,u) + in + Array.update (sgnArray, cid, newConDec) + end + + end + + fun constDef (d) = + (case sgnLookup (d) + of ConDef(_, _, _, U,_, _, _) => U + | AbbrevDef (_, _, _, U,_, _) => U) + + fun constType (c) = conDecType (sgnLookup c) + fun constImp (c) = conDecImp (sgnLookup c) + fun constUni (c) = conDecUni (sgnLookup c) + fun constBlock (c) = conDecBlock (sgnLookup c) + + fun constStatus (c) = + (case sgnLookup (c) + of ConDec (_, _, _, status, _, _) => status + | _ => Normal) + + + (* Explicit Substitutions *) + + (* id = ^0 + + Invariant: + G |- id : G id is patsub + *) + val id = Shift(0) + + (* shift = ^1 + + Invariant: + G, V |- ^ : G ^ is patsub + *) + val shift = Shift(1) + + (* invShift = ^-1 = _.^0 + Invariant: + G |- ^-1 : G, V ^-1 is patsub + *) + val invShift = Dot(Undef, id) + + + (* comp (s1, s2) = s' + + Invariant: + If G' |- s1 : G + and G'' |- s2 : G' + then s' = s1 o s2 + and G'' |- s1 o s2 : G + + If s1, s2 patsub + then s' patsub + *) + fun comp (Shift (0), s) = s + (* next line is an optimization *) + (* roughly 15% on standard suite for Twelf 1.1 *) + (* Sat Feb 14 10:15:16 1998 -fp *) + | comp (s, Shift (0)) = s + | comp (Shift (n), Dot (Ft, s)) = comp (Shift (n-1), s) + | comp (Shift (n), Shift (m)) = Shift (n+m) + | comp (Dot (Ft, s), s') = Dot (frontSub (Ft, s'), comp (s, s')) + + (* bvarSub (n, s) = Ft' + + Invariant: + If G |- s : G' G' |- n : V + then Ft' = Ftn if s = Ft1 .. Ftn .. ^k + or Ft' = ^(n+k) if s = Ft1 .. Ftm ^k and m<n + and G |- Ft' : V [s] + *) + and bvarSub (1, Dot(Ft, s)) = Ft + | bvarSub (n, Dot(Ft, s)) = bvarSub (n-1, s) + | bvarSub (n, Shift(k)) = Idx (n+k) + + (* blockSub (B, s) = B' + + Invariant: + If G |- s : G' + and G' |- B block + then G |- B' block + and B [s] == B' + *) + (* in front of substitutions, first case is irrelevant *) + (* Sun Dec 2 11:56:41 2001 -fp *) + and blockSub (Bidx k, s) = + (case bvarSub (k, s) + of Idx k' => Bidx k' + | Block B => B) + | blockSub (LVar (ref (SOME B), sk, _), s) = + blockSub (B, comp (sk, s)) + (* -fp Sun Dec 1 21:18:30 2002 *) + (* --cs Sun Dec 1 11:25:41 2002 *) + (* Since always . |- t : Gsome, discard s *) + (* where is this needed? *) + (* Thu Dec 6 20:30:26 2001 -fp !!! *) + | blockSub (LVar (r as ref NONE, sk, (l, t)), s) = + LVar(r, comp(sk, s), (l, t)) + (* was: + LVar (r, comp(sk, s), (l, comp (t, s))) + July 22, 2010 -fp -cs + *) + (* comp(^k, s) = ^k' for some k' by invariant *) + | blockSub (L as Inst ULs, s') = Inst (map (fn U => EClo (U, s')) ULs) + (* this should be right but somebody should verify *) + + (* frontSub (Ft, s) = Ft' + + Invariant: + If G |- s : G' G' |- Ft : V + then Ft' = Ft [s] + and G |- Ft' : V [s] + + NOTE: EClo (U, s) might be undefined, so if this is ever + computed eagerly, we must introduce an "Undefined" exception, + raise it in whnf and handle it here so Exp (EClo (U, s)) => Undef + *) + and frontSub (Idx (n), s) = bvarSub (n, s) + | frontSub (Exp (U), s) = Exp (EClo (U, s)) + | frontSub (Undef, s) = Undef + | frontSub (Block (B), s) = Block (blockSub (B, s)) + + (* decSub (x:V, s) = D' + + Invariant: + If G |- s : G' G' |- V : L + then D' = x:V[s] + and G |- V[s] : L + *) + (* First line is an optimization suggested by cs *) + (* D[id] = D *) + (* Sat Feb 14 18:37:44 1998 -fp *) + (* seems to have no statistically significant effect *) + (* undo for now Sat Feb 14 20:22:29 1998 -fp *) + (* + fun decSub (D, Shift(0)) = D + | decSub (Dec (x, V), s) = Dec (x, EClo (V, s)) + *) + fun decSub (Dec (x, V), s) = Dec (x, EClo (V, s)) + | decSub (NDec x, s) = NDec x + | decSub (BDec (n, (l, t)), s) = BDec (n, (l, comp (t, s))) + + (* dot1 (s) = s' + + Invariant: + If G |- s : G' + then s' = 1. (s o ^) + and for all V s.t. G' |- V : L + G, V[s] |- s' : G', V + + If s patsub then s' patsub + *) + (* first line is an optimization *) + (* roughly 15% on standard suite for Twelf 1.1 *) + (* Sat Feb 14 10:16:16 1998 -fp *) + fun dot1 (s as Shift (0)) = s + | dot1 s = Dot (Idx(1), comp(s, shift)) + + (* invDot1 (s) = s' + invDot1 (1. s' o ^) = s' + + Invariant: + s = 1 . s' o ^ + If G' |- s' : G + (so G',V[s] |- s : G,V) + *) + fun invDot1 (s) = comp (comp(shift, s), invShift) + + + (* Declaration Contexts *) + + (* ctxDec (G, k) = x:V + Invariant: + If |G| >= k, where |G| is size of G, + then G |- k : V and G |- V : L + *) + fun ctxDec (G, k) = + let (* ctxDec' (G'', k') = x:V + where G |- ^(k-k') : G'', 1 <= k' <= k + *) + fun ctxDec' (Decl (G', Dec (x, V')), 1) = Dec (x, EClo (V', Shift (k))) + | ctxDec' (Decl (G', BDec (n, (l, s))), 1) = BDec (n, (l, comp (s, Shift (k)))) + | ctxDec' (Decl (G', _), k') = ctxDec' (G', k'-1) + (* ctxDec' (Null, k') should not occur by invariant *) + in + ctxDec' (G, k) + end + + (* blockDec (G, v, i) = V + + Invariant: + If G (v) = l[s] + and Sigma (l) = SOME Gsome BLOCK Lblock + and G |- s : Gsome + then G |- pi (v, i) : V + *) + + fun blockDec (G, v as (Bidx k), i) = + let + val BDec (_, (l, s)) = ctxDec (G, k) + (* G |- s : Gsome *) + val (Gsome, Lblock) = conDecBlock (sgnLookup l) + fun blockDec' (t, D :: L, 1, j) = decSub (D, t) + | blockDec' (t, _ :: L, n, j) = + blockDec' (Dot (Exp (Root (Proj (v, j), Nil)), t), + L, n-1, j+1) + in + blockDec' (s, Lblock, i, 1) + end + + + (* EVar related functions *) + + (* newEVar (G, V) = newEVarCnstr (G, V, nil) *) + fun newEVar (G, V) = EVar(ref NONE, G, V, ref nil) + + (* newAVar G = new AVar (assignable variable) *) + (* AVars carry no type, ctx, or cnstr *) + fun newAVar () = AVar(ref NONE) + + (* newTypeVar (G) = X, X new + where G |- X : type + *) + fun newTypeVar (G) = EVar(ref NONE, G, Uni(Type), ref nil) + + (* newLVar (l, s) = (l[s]) *) + fun newLVar (sk, (cid, t)) = LVar (ref NONE, sk, (cid, t)) + + (* Definition related functions *) + (* headOpt (U) = SOME(H) or NONE, U should be strict, normal *) + fun headOpt (Root (H, _)) = SOME(H) + | headOpt (Lam (_, U)) = headOpt U + | headOpt _ = NONE + + fun ancestor' (NONE) = Anc(NONE, 0, NONE) + | ancestor' (SOME(Const(c))) = Anc(SOME(c), 1, SOME(c)) + | ancestor' (SOME(Def(d))) = + (case sgnLookup(d) + of ConDef(_, _, _, _, _, _, Anc(_, height, cOpt)) + => Anc(SOME(d), height+1, cOpt)) + | ancestor' (SOME _) = (* FgnConst possible, BVar impossible by strictness *) + Anc(NONE, 0, NONE) + (* ancestor(U) = ancestor info for d = U *) + fun ancestor (U) = ancestor' (headOpt U) + + (* defAncestor(d) = ancestor of d, d must be defined *) + fun defAncestor (d) = + (case sgnLookup(d) + of ConDef(_, _, _, _, _, _, anc) => anc) + + (* Type related functions *) + + (* targetHeadOpt (V) = SOME(H) or NONE + where H is the head of the atomic target type of V, + NONE if V is a kind or object or have variable type. + Does not expand type definitions. + *) + (* should there possibly be a FgnConst case? also targetFamOpt -kw *) + fun targetHeadOpt (Root (H, _)) = SOME(H) + | targetHeadOpt (Pi(_, V)) = targetHeadOpt V + | targetHeadOpt (Redex (V, S)) = targetHeadOpt V + | targetHeadOpt (Lam (_, V)) = targetHeadOpt V + | targetHeadOpt (EVar (ref (SOME(V)),_,_,_)) = targetHeadOpt V + | targetHeadOpt (EClo (V, s)) = targetHeadOpt V + | targetHeadOpt _ = NONE + (* Root(Bvar _, _), Root(FVar _, _), Root(FgnConst _, _), + EVar(ref NONE,..), Uni, FgnExp _ + *) + (* Root(Skonst _, _) can't occur *) + (* targetHead (A) = a + as in targetHeadOpt, except V must be a valid type + *) + fun targetHead (A) = valOf (targetHeadOpt A) + + (* targetFamOpt (V) = SOME(cid) or NONE + where cid is the type family of the atomic target type of V, + NONE if V is a kind or object or have variable type. + Does expand type definitions. + *) + fun targetFamOpt (Root (Const(cid), _)) = SOME(cid) + | targetFamOpt (Pi(_, V)) = targetFamOpt V + | targetFamOpt (Root (Def(cid), _)) = targetFamOpt (constDef cid) + | targetFamOpt (Redex (V, S)) = targetFamOpt V + | targetFamOpt (Lam (_, V)) = targetFamOpt V + | targetFamOpt (EVar (ref (SOME(V)),_,_,_)) = targetFamOpt V + | targetFamOpt (EClo (V, s)) = targetFamOpt V + | targetFamOpt _ = NONE + (* Root(Bvar _, _), Root(FVar _, _), Root(FgnConst _, _), + EVar(ref NONE,..), Uni, FgnExp _ + *) + (* Root(Skonst _, _) can't occur *) + (* targetFam (A) = a + as in targetFamOpt, except V must be a valid type + *) + fun targetFam (A) = valOf (targetFamOpt A) + +end; (* functor IntSyn *) + +structure IntSyn :> INTSYN = + IntSyn (structure Global = Global); diff --git a/tests/examplefiles/intsyn.sig b/tests/examplefiles/intsyn.sig new file mode 100644 index 00000000..ea505362 --- /dev/null +++ b/tests/examplefiles/intsyn.sig @@ -0,0 +1,286 @@ +(* Internal Syntax *) +(* Author: Frank Pfenning, Carsten Schuermann *) +(* Modified: Roberto Virga *) + +signature INTSYN = +sig + + type cid = int (* Constant identifier *) + type mid = int (* Structure identifier *) + type csid = int (* CS module identifier *) + + + type FgnExp = exn (* foreign expression representation *) + exception UnexpectedFgnExp of FgnExp + (* raised by a constraint solver + if passed an incorrect arg *) + type FgnCnstr = exn (* foreign constraint representation *) + exception UnexpectedFgnCnstr of FgnCnstr + (* raised by a constraint solver + if passed an incorrect arg *) + + (* Contexts *) + + datatype 'a Ctx = (* Contexts *) + Null (* G ::= . *) + | Decl of 'a Ctx * 'a (* | G, D *) + + val ctxPop : 'a Ctx -> 'a Ctx + val ctxLookup: 'a Ctx * int -> 'a + val ctxLength: 'a Ctx -> int + + datatype Depend = (* Dependency information *) + No (* P ::= No *) + | Maybe (* | Maybe *) + | Meta (* | Meta *) + + (* expressions *) + + datatype Uni = (* Universes: *) + Kind (* L ::= Kind *) + | Type (* | Type *) + + datatype Exp = (* Expressions: *) + Uni of Uni (* U ::= L *) + | Pi of (Dec * Depend) * Exp (* | Pi (D, P). V *) + | Root of Head * Spine (* | H @ S *) + | Redex of Exp * Spine (* | U @ S *) + | Lam of Dec * Exp (* | lam D. U *) + | EVar of Exp option ref * Dec Ctx * Exp * (Cnstr ref) list ref + (* | X<I> : G|-V, Cnstr *) + | EClo of Exp * Sub (* | U[s] *) + | AVar of Exp option ref (* | A<I> *) + + | FgnExp of csid * FgnExp (* | (foreign expression) *) + + | NVar of int (* | n (linear, + fully applied variable + used in indexing *) + + and Head = (* Head: *) + BVar of int (* H ::= k *) + | Const of cid (* | c *) + | Proj of Block * int (* | #k(b) *) + | Skonst of cid (* | c# *) + | Def of cid (* | d (strict) *) + | NSDef of cid (* | d (non strict) *) + | FVar of string * Exp * Sub (* | F[s] *) + | FgnConst of csid * ConDec (* | (foreign constant) *) + + and Spine = (* Spines: *) + Nil (* S ::= Nil *) + | App of Exp * Spine (* | U ; S *) + | SClo of Spine * Sub (* | S[s] *) + + and Sub = (* Explicit substitutions: *) + Shift of int (* s ::= ^n *) + | Dot of Front * Sub (* | Ft.s *) + + and Front = (* Fronts: *) + Idx of int (* Ft ::= k *) + | Exp of Exp (* | U *) + | Axp of Exp (* | U *) + | Block of Block (* | _x *) + | Undef (* | _ *) + + and Dec = (* Declarations: *) + Dec of string option * Exp (* D ::= x:V *) + | BDec of string option * (cid * Sub) (* | v:l[s] *) + | ADec of string option * int (* | v[^-d] *) + | NDec of string option + + and Block = (* Blocks: *) + Bidx of int (* b ::= v *) + | LVar of Block option ref * Sub * (cid * Sub) + (* | L(l[^k],t) *) + | Inst of Exp list (* | U1, ..., Un *) + (* It would be better to consider having projections count + like substitutions, then we could have Inst of Sub here, + which would simplify a lot of things. + + I suggest however to wait until the next big overhaul + of the system -- cs *) + + +(* | BClo of Block * Sub (* | b[s] *) *) + + (* constraints *) + + and Cnstr = (* Constraint: *) + Solved (* Cnstr ::= solved *) + | Eqn of Dec Ctx * Exp * Exp (* | G|-(U1 == U2) *) + | FgnCnstr of csid * FgnCnstr (* | (foreign) *) + + and Status = (* Status of a constant: *) + Normal (* inert *) + | Constraint of csid * (Dec Ctx * Spine * int -> Exp option) + (* acts as constraint *) + | Foreign of csid * (Spine -> Exp) (* is converted to foreign *) + + and FgnUnify = (* Result of foreign unify *) + Succeed of FgnUnifyResidual list + (* succeed with a list of residual operations *) + | Fail + + and FgnUnifyResidual = + Assign of Dec Ctx * Exp * Exp * Sub + (* perform the assignment G |- X = U [ss] *) + | Delay of Exp * Cnstr ref + (* delay cnstr, associating it with all the rigid EVars in U *) + + (* Global signature *) + + and ConDec = (* Constant declaration *) + ConDec of string * mid option * int * Status + (* a : K : kind or *) + * Exp * Uni (* c : A : type *) + | ConDef of string * mid option * int (* a = A : K : kind or *) + * Exp * Exp * Uni (* d = M : A : type *) + * Ancestor (* Ancestor info for d or a *) + | AbbrevDef of string * mid option * int + (* a = A : K : kind or *) + * Exp * Exp * Uni (* d = M : A : type *) + | BlockDec of string * mid option (* %block l : SOME G1 PI G2 *) + * Dec Ctx * Dec list + | BlockDef of string * mid option * cid list + (* %block l = (l1 | ... | ln) *) + | SkoDec of string * mid option * int (* sa: K : kind or *) + * Exp * Uni (* sc: A : type *) + + and Ancestor = (* Ancestor of d or a *) + Anc of cid option * int * cid option (* head(expand(d)), height, head(expand[height](d)) *) + (* NONE means expands to {x:A}B *) + + datatype StrDec = (* Structure declaration *) + StrDec of string * mid option + + (* Form of constant declaration *) + datatype ConDecForm = + FromCS (* from constraint domain *) + | Ordinary (* ordinary declaration *) + | Clause (* %clause declaration *) + + (* Type abbreviations *) + type dctx = Dec Ctx (* G = . | G,D *) + type eclo = Exp * Sub (* Us = U[s] *) + type bclo = Block * Sub (* Bs = B[s] *) + type cnstr = Cnstr ref + + exception Error of string (* raised if out of space *) + + (* standard operations on foreign expressions *) + structure FgnExpStd : sig + (* convert to internal syntax *) + structure ToInternal : FGN_OPN where type arg = unit + where type result = Exp + + (* apply function to subterms *) + structure Map : FGN_OPN where type arg = Exp -> Exp + where type result = Exp + + (* apply function to subterms, for effect *) + structure App : FGN_OPN where type arg = Exp -> unit + where type result = unit + + (* test for equality *) + structure EqualTo : FGN_OPN where type arg = Exp + where type result = bool + + (* unify with another term *) + structure UnifyWith : FGN_OPN where type arg = Dec Ctx * Exp + where type result = FgnUnify + + (* fold a function over the subterms *) + val fold : (csid * FgnExp) -> (Exp * 'a -> 'a) -> 'a -> 'a + end + + (* standard operations on foreign constraints *) + structure FgnCnstrStd : sig + (* convert to internal syntax *) + structure ToInternal : FGN_OPN where type arg = unit + where type result = (Dec Ctx * Exp) list + + (* awake *) + structure Awake : FGN_OPN where type arg = unit + where type result = bool + + (* simplify *) + structure Simplify : FGN_OPN where type arg = unit + where type result = bool + end + + val conDecName : ConDec -> string + val conDecParent : ConDec -> mid option + val conDecImp : ConDec -> int + val conDecStatus : ConDec -> Status + val conDecType : ConDec -> Exp + val conDecBlock : ConDec -> dctx * Dec list + val conDecUni : ConDec -> Uni + + val strDecName : StrDec -> string + val strDecParent : StrDec -> mid option + + val sgnReset : unit -> unit + val sgnSize : unit -> cid * mid + + val sgnAdd : ConDec -> cid + val sgnLookup: cid -> ConDec + val sgnApp : (cid -> unit) -> unit + + val sgnStructAdd : StrDec -> mid + val sgnStructLookup : mid -> StrDec + + val constType : cid -> Exp (* type of c or d *) + val constDef : cid -> Exp (* definition of d *) + val constImp : cid -> int + val constStatus : cid -> Status + val constUni : cid -> Uni + val constBlock : cid -> dctx * Dec list + + (* Declaration Contexts *) + + val ctxDec : dctx * int -> Dec (* get variable declaration *) + val blockDec : dctx * Block * int -> Dec + + (* Explicit substitutions *) + + val id : Sub (* id *) + val shift : Sub (* ^ *) + val invShift : Sub (* ^-1 *) + + val bvarSub : int * Sub -> Front (* k[s] *) + val frontSub : Front * Sub -> Front (* H[s] *) + val decSub : Dec * Sub -> Dec (* x:V[s] *) + val blockSub : Block * Sub -> Block (* B[s] *) + + val comp : Sub * Sub -> Sub (* s o s' *) + val dot1 : Sub -> Sub (* 1 . (s o ^) *) + val invDot1 : Sub -> Sub (* (^ o s) o ^-1) *) + + (* EVar related functions *) + + val newEVar : dctx * Exp -> Exp (* creates X:G|-V, [] *) + val newAVar : unit -> Exp (* creates A (bare) *) + val newTypeVar : dctx -> Exp (* creates X:G|-type, [] *) + val newLVar : Sub * (cid * Sub) -> Block + (* creates B:(l[^k],t) *) + + (* Definition related functions *) + val headOpt : Exp -> Head option + val ancestor : Exp -> Ancestor + val defAncestor : cid -> Ancestor + + (* Type related functions *) + + (* Not expanding type definitions *) + val targetHeadOpt : Exp -> Head option (* target type family or NONE *) + val targetHead : Exp -> Head (* target type family *) + + (* Expanding type definitions *) + val targetFamOpt : Exp -> cid option (* target type family or NONE *) + val targetFam : Exp -> cid (* target type family *) + + (* Used in Flit *) + val rename : cid * string -> unit + +end; (* signature INTSYN *) diff --git a/tests/examplefiles/nemerle_sample.n b/tests/examplefiles/nemerle_sample.n new file mode 100644 index 00000000..2c05033a --- /dev/null +++ b/tests/examplefiles/nemerle_sample.n @@ -0,0 +1,85 @@ +using System; + +namespace Demo.Ns +{ + /// sample class + public class ClassSample : Base + { + /* sample multiline comment */ +#region region sample + fieldSample : int; +#endregion + + public virtual someMethod(str : string) : list[double] + { + def x = "simple string"; + def x = $"simple $splice string $(spliceMethod())"; + def x = <# + recursive <# string #> sample + #>; + def x = $<# + recursive $splice <# string #> sample + #>; + + def localFunc(arg) + { + arg + 1; + } + + match (localFunc(2)) + { + | 3 => "ok"; + | _ => "fail"; + } + + using (x = SomeObject()) + { + foreach (item in someCollection) + { + def i = try + { + int.Parse(item) + } + catch + { + | _ is FormatException => 0; + } + when (i > 0xff) + unless (i < 555L) + WriteLine(i); + + } + } + protected override overrideSample() : void + {} + + private privateSample() : void + {} + + public abstract abstractSample() : void + {} + } + + } + + module ModuleSample + { + } + + variant RgbColor { + | Red + | Yellow + | Green + | Different { + red : float; + green : float; + blue : float; + } + } + + macro sampleMacro(expr) + syntax ("write", expr) + { + <[ WriteLine($expr) ]> + } +} diff --git a/tests/examplefiles/objc_example.m b/tests/examplefiles/objc_example.m index c2a1c414..cb5c0975 100644 --- a/tests/examplefiles/objc_example.m +++ b/tests/examplefiles/objc_example.m @@ -1,5 +1,19 @@ #import "Somefile.h" +@implementation ABC + +- (id)a:(B)b { + return 1; +} + +@end + +@implementation ABC + +- (void)xyz; + +@end + NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys: @"quattuor", @"four", @"quinque", @"five", @"sex", @"six", nil]; diff --git a/tests/examplefiles/squid.conf b/tests/examplefiles/squid.conf index 31e611d6..833d4fca 100644 --- a/tests/examplefiles/squid.conf +++ b/tests/examplefiles/squid.conf @@ -1,27 +1,30 @@ -# First, a comment block for the deafult conf: +# Some multiline comments -# TAG: buffered_logs on|off -# cache.log log file is written with stdio functions, and as such -# it can be buffered or unbuffered. By default it will be unbuffered. -# Buffering it can speed up the writing slightly (though you are -# unlikely to need to worry unless you run with tons of debugging -# enabled in which case performance will suffer badly anyway..). -# -#Default: -# buffered_logs off - -# Now, a slightly useful (but in no way complete) set of options: - -cache_peer upstream1.example.com parent 8080 0 no-query proxy-only round-robin -cache_peer upstream2.example.com parent 3128 0 no-query proxy-only round-robin -never_direct allow all -never_direct allow CONNECT - -acl myclients src 127.0.0.1 -http_access allow myclients - -acl mynet src 192.168.0.0/255.255.0.0 -no_cache deny mynet - -acl mynetlocal dst 192.168.0.0/255.255.0.0 -always_direct allow mynetlocal +acl manager proto cache_object +acl localhost src 127.0.0.1/32 ::1 +acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1 +acl SSL_ports port 443 +acl Safe_ports port 80 # http +acl Safe_ports port 21 # ftp +acl Safe_ports port 443 # https +acl Safe_ports port 70 # gopher +acl Safe_ports port 210 # wais +acl Safe_ports port 1025-65535 # unregistered ports +acl Safe_ports port 280 # http-mgmt +acl Safe_ports port 488 # gss-http +acl Safe_ports port 591 # filemaker +acl Safe_ports port 777 # multiling http +acl CONNECT method CONNECT +http_access allow manager localhost +http_access deny manager +http_access deny !Safe_ports +http_access deny CONNECT !SSL_ports +http_access allow localhost +http_access deny all +http_port 3128 +hierarchy_stoplist cgi-bin ? +coredump_dir /var/spool/squid3 +refresh_pattern ^ftp: 1440 20% 10080 +refresh_pattern ^gopher: 1440 0% 1440 +refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 +refresh_pattern . 0 20% 4320 diff --git a/tests/examplefiles/test.awk b/tests/examplefiles/test.awk new file mode 100644 index 00000000..9f0e3ec9 --- /dev/null +++ b/tests/examplefiles/test.awk @@ -0,0 +1,121 @@ +#!/bin/awk -f + +BEGIN { + # It is not possible to define output file names here because + # FILENAME is not define in the BEGIN section + n = ""; + printf "Generating data files ..."; + network_max_bandwidth_in_byte = 10000000; + network_max_packet_per_second = 1000000; + last3 = 0; + last4 = 0; + last5 = 0; + last6 = 0; +} +{ + if ($1 ~ /Average/) + { # Skip the Average values + n = ""; + next; + } + + if ($2 ~ /all/) + { # This is the cpu info + print $3 > FILENAME".cpu.user.dat"; +# print $4 > FILENAME".cpu.nice.dat"; + print $5 > FILENAME".cpu.system.dat"; +# print $6 > FILENAME".cpu.iowait.dat"; + print $7 > FILENAME".cpu.idle.dat"; + print 100-$7 > FILENAME".cpu.busy.dat"; + } + if ($2 ~ /eth0/) + { # This is the eth0 network info + if ($3 > network_max_packet_per_second) + print last3 > FILENAME".net.rxpck.dat"; # Total number of packets received per second. + else + { + last3 = $3; + print $3 > FILENAME".net.rxpck.dat"; # Total number of packets received per second. + } + if ($4 > network_max_packet_per_second) + print last4 > FILENAME".net.txpck.dat"; # Total number of packets transmitted per second. + else + { + last4 = $4; + print $4 > FILENAME".net.txpck.dat"; # Total number of packets transmitted per second. + } + if ($5 > network_max_bandwidth_in_byte) + print last5 > FILENAME".net.rxbyt.dat"; # Total number of bytes received per second. + else + { + last5 = $5; + print $5 > FILENAME".net.rxbyt.dat"; # Total number of bytes received per second. + } + if ($6 > network_max_bandwidth_in_byte) + print last6 > FILENAME".net.txbyt.dat"; # Total number of bytes transmitted per second. + else + { + last6 = $6; + print $6 > FILENAME".net.txbyt.dat"; # Total number of bytes transmitted per second. + } +# print $7 > FILENAME".net.rxcmp.dat"; # Number of compressed packets received per second (for cslip etc.). +# print $8 > FILENAME".net.txcmp.dat"; # Number of compressed packets transmitted per second. +# print $9 > FILENAME".net.rxmcst.dat"; # Number of multicast packets received per second. + } + + # Detect which is the next info to be parsed + if ($2 ~ /proc|cswch|tps|kbmemfree|totsck/) + { + n = $2; + } + + # Only get lines with numbers (real data !) + if ($2 ~ /[0-9]/) + { + if (n == "proc/s") + { # This is the proc/s info + print $2 > FILENAME".proc.dat"; +# n = ""; + } + if (n == "cswch/s") + { # This is the context switches per second info + print $2 > FILENAME".ctxsw.dat"; +# n = ""; + } + if (n == "tps") + { # This is the disk info + print $2 > FILENAME".disk.tps.dat"; # total transfers per second + print $3 > FILENAME".disk.rtps.dat"; # read requests per second + print $4 > FILENAME".disk.wtps.dat"; # write requests per second + print $5 > FILENAME".disk.brdps.dat"; # block reads per second + print $6 > FILENAME".disk.bwrps.dat"; # block writes per second +# n = ""; + } + if (n == "kbmemfree") + { # This is the mem info + print $2 > FILENAME".mem.kbmemfree.dat"; # Amount of free memory available in kilobytes. + print $3 > FILENAME".mem.kbmemused.dat"; # Amount of used memory in kilobytes. This does not take into account memory used by the kernel itself. + print $4 > FILENAME".mem.memused.dat"; # Percentage of used memory. +# It appears the kbmemshrd has been removed from the sysstat output - ntolia +# print $X > FILENAME".mem.kbmemshrd.dat"; # Amount of memory shared by the system in kilobytes. Always zero with 2.4 kernels. +# print $5 > FILENAME".mem.kbbuffers.dat"; # Amount of memory used as buffers by the kernel in kilobytes. + print $6 > FILENAME".mem.kbcached.dat"; # Amount of memory used to cache data by the kernel in kilobytes. +# print $7 > FILENAME".mem.kbswpfree.dat"; # Amount of free swap space in kilobytes. +# print $8 > FILENAME".mem.kbswpused.dat"; # Amount of used swap space in kilobytes. + print $9 > FILENAME".mem.swpused.dat"; # Percentage of used swap space. +# n = ""; + } + if (n == "totsck") + { # This is the socket info + print $2 > FILENAME".sock.totsck.dat"; # Total number of used sockets. + print $3 > FILENAME".sock.tcpsck.dat"; # Number of TCP sockets currently in use. +# print $4 > FILENAME".sock.udpsck.dat"; # Number of UDP sockets currently in use. +# print $5 > FILENAME".sock.rawsck.dat"; # Number of RAW sockets currently in use. +# print $6 > FILENAME".sock.ip-frag.dat"; # Number of IP fragments currently in use. +# n = ""; + } + } +} +END { + print " '" FILENAME "' done."; +} diff --git a/tests/examplefiles/test.dtd b/tests/examplefiles/test.dtd new file mode 100644 index 00000000..639b411a --- /dev/null +++ b/tests/examplefiles/test.dtd @@ -0,0 +1,89 @@ +<!DOCTYPE html> + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" +"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" +"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [ + <!-- an internal subset can be embedded here --> +]> + +<!DOCTYPE greeting SYSTEM "hello.dtd"> + +<!DOCTYPE greeting [ + <!ELEMENT greeting (#PCDATA)> + +<!-- examples from XML spec --> + +<!ELEMENT br EMPTY> +<!ELEMENT p (#PCDATA|emph)* > +<!ELEMENT %name.para; %content.para; > +<!ELEMENT container ANY> + +<!ELEMENT spec (front, body, back?)> +<!ELEMENT div1 (head, (p | list | note)*, div2*)> +<!ELEMENT dictionary-body (%div.mix; | %dict.mix;)*> + +<!ELEMENT p (#PCDATA|a|ul|b|i|em)*> +<!ELEMENT p (#PCDATA | %font; | %phrase; | %special; | %form;)* > +<!ELEMENT b (#PCDATA)> + +<!ATTLIST termdef + id ID #REQUIRED + name CDATA #IMPLIED> +<!ATTLIST list + type (bullets|ordered|glossary) "ordered"> +<!ATTLIST form + method CDATA #FIXED "POST"> + +<!ENTITY d "
"> +<!ENTITY a "
"> +<!ENTITY da "
"> + +<!ENTITY % ISOLat2 + SYSTEM "http://www.xml.com/iso/isolat2-xml.entities" > + +<!ENTITY Pub-Status "This is a pre-release of the + specification."> + + <!ENTITY open-hatch + SYSTEM "http://www.textuality.com/boilerplate/OpenHatch.xml"> +<!ENTITY open-hatch + PUBLIC "-//Textuality//TEXT Standard open-hatch boilerplate//EN" + "http://www.textuality.com/boilerplate/OpenHatch.xml"> +<!ENTITY hatch-pic + SYSTEM "../grafix/OpenHatch.gif" + NDATA gif > + +<!NOTATION gif PUBLIC "gif viewer"> + +<!ENTITY % YN '"Yes"' > +<!ENTITY WhatHeSaid "He said %YN;" > + +<!ENTITY EndAttr "27'" > + +<!ENTITY % pub "Éditions Gallimard" > +<!ENTITY rights "All rights reserved" > +<!ENTITY book "La Peste: Albert Camus, +© 1947 %pub;. &rights;" > + +<!ENTITY lt "&#60;"> +<!ENTITY gt ">"> +<!ENTITY amp "&#38;"> +<!ENTITY apos "'"> +<!ENTITY quot """> + +<!ENTITY % draft 'INCLUDE' > +<!ENTITY % final 'IGNORE' > + +<![%draft;[ +<!ELEMENT book (comments*, title, body, supplements?)> +]]> +<![%final;[ +<!ELEMENT book (title, body, supplements?)> +]]> + +]> + + diff --git a/tests/examplefiles/test.ec b/tests/examplefiles/test.ec new file mode 100644 index 00000000..37868b52 --- /dev/null +++ b/tests/examplefiles/test.ec @@ -0,0 +1,605 @@ +namespace gui; + +import "Window" + +public struct AnchorValue +{ + AnchorValueType type; + + union + { + int distance; + float percent; + }; + property int + { + set { distance = value; type = offset; } + get { return distance; } + } + property double + { + set { percent = (float) value; type = relative; } + get { return (double) percent; } + } + + char * OnGetString(char * stringOutput, void * fieldData, bool * needClass) + { + if(type == offset) + { + sprintf(stringOutput, "%d", distance); + } + else if(type == relative) + { + int c; + int last = 0; + sprintf(stringOutput, "%f", percent); + c = strlen(stringOutput)-1; + for( ; c >= 0; c--) + { + if(stringOutput[c] != '0') + last = Max(last, c); + if(stringOutput[c] == '.') + { + if(last == c) + { + stringOutput[c+1] = '0'; + stringOutput[c+2] = 0; + } + else + stringOutput[last+1] = 0; + break; + } + } + } + if(needClass) *needClass = false; + return stringOutput; + } + + bool OnGetDataFromString(char * stringOutput) + { + char * end; + if(strchr(stringOutput, '.')) + { + float percent = (float)strtod(stringOutput, &end); + + if(end != stringOutput) + { + this.percent = percent; + type = relative; + return true; + } + } + else if(stringOutput[0]) + { + int distance = strtol(stringOutput, &end, 0); + if(end != stringOutput) + { + this.distance = distance; + type = offset; + return true; + } + } + else + { + distance = 0; + type = 0; + } + return false; + } +}; + +public struct MiddleAnchorValue +{ + AnchorValueType type; + + union + { + int distance; + float percent; + }; + property int + { + set { distance = value; type = none; } + get { return distance; } + } + property double + { + set { percent = (float) value; type = middleRelative; } + get { return (double) percent; } + } + + char * OnGetString(char * stringOutput, void * fieldData, bool * needClass) + { + if(type == middleRelative) + { + int c; + int last = 0; + sprintf(stringOutput, "%f", percent); + c = strlen(stringOutput)-1; + for( ; c >= 0; c--) + { + if(stringOutput[c] != '0') + last = Max(last, c); + if(stringOutput[c] == '.') + { + if(last == c) + { + stringOutput[c+1] = '0'; + stringOutput[c+2] = 0; + } + else + stringOutput[last+1] = 0; + break; + } + } + } + else if(type == none && distance) + { + sprintf(stringOutput, "%d", distance); + } + if(needClass) *needClass = false; + return stringOutput; + } + + bool OnGetDataFromString(char * stringOutput) + { + if(strchr(stringOutput, '.')) + { + percent = (float)strtod(stringOutput, null); + type = middleRelative; + } + else + { + distance = strtol(stringOutput, null, 0); + type = none; + } + return true; + } +}; + +public enum AnchorValueType { none, offset, relative, middleRelative, cascade, vTiled, hTiled }; + +public struct Anchor +{ + union { AnchorValue left; MiddleAnchorValue horz; }; + union { AnchorValue top; MiddleAnchorValue vert; }; + AnchorValue right, bottom; + + char * OnGetString(char * stringOutput, void * fieldData, bool * needClass) + { + char tempString[256]; + char * anchorValue; + bool subNeedClass; + + tempString[0] = '\0'; + anchorValue = left.OnGetString(tempString, null, &subNeedClass); + if(anchorValue[0]) { if(stringOutput[0]) strcat(stringOutput, ", "); strcat(stringOutput, "left = "); strcat(stringOutput, anchorValue); } + + //if(((!left.type && !right.type) && horz.distance) || horz.type == middleRelative) + if(!right.type && ((!left.type && horz.distance) || horz.type == middleRelative)) + { + tempString[0] = '\0'; + anchorValue = horz.OnGetString(tempString, null, &subNeedClass); + if(anchorValue[0]) { if(stringOutput[0]) strcat(stringOutput, ", "); strcat(stringOutput, "horz = "); strcat(stringOutput, anchorValue); } + } + + tempString[0] = '\0'; + anchorValue = top.OnGetString(tempString, null, &subNeedClass); + if(anchorValue[0]) { if(stringOutput[0]) strcat(stringOutput, ", "); strcat(stringOutput, "top = "); strcat(stringOutput, anchorValue); } + + tempString[0] = '\0'; + anchorValue = right.OnGetString(tempString, null, &subNeedClass); + if(anchorValue[0]) { if(stringOutput[0]) strcat(stringOutput, ", "); strcat(stringOutput, "right = "); strcat(stringOutput, anchorValue); } + + // if(((!top.type && !bottom.type) && vert.distance) || vert.type == middleRelative) + if(!bottom.type && ((!top.type && vert.distance) || vert.type == middleRelative)) + { + tempString[0] = '\0'; + anchorValue = vert.OnGetString(tempString, null, &subNeedClass); + if(anchorValue[0]) { if(stringOutput[0]) strcat(stringOutput, ", "); strcat(stringOutput, "vert = "); strcat(stringOutput, anchorValue); } + } + + tempString[0] = '\0'; + anchorValue = bottom.OnGetString(tempString, null, &subNeedClass); + if(anchorValue[0]) { if(stringOutput[0]) strcat(stringOutput, ", "); strcat(stringOutput, "bottom = "); strcat(stringOutput, anchorValue); } + + return stringOutput; + } + + bool OnGetDataFromString(char * string) + { + this = Anchor {}; + return class::OnGetDataFromString(string); + } + + bool OnSaveEdit(DropBox dropBox, void * object) + { + return dropBox.Save(); + } + + Window OnEdit(Window listBox, Window master, int x, int y, int w, int h, Window control) + { + char * string = ""; + AnchorDropBox comboBox + { + editText = true; + parent = listBox; + master = master; + position = Point { x, y }; + //clientSize = Size { h = h }; + //size.w = w; + size = { w, h }; + anchorValue = this; + control = control; + borderStyle = 0; + }; + + comboBox.Create(); + + { + char tempString[MAX_F_STRING] = ""; + bool needClass = false; + char * result = OnGetString(tempString, null, &needClass); + if(result) string = result; + } + comboBox.contents = string; + return comboBox; + } +}; + +private class AnchorButton : Button +{ + toggle = true, bevel = false; + + void OnRedraw(Surface surface) + { + int cw = clientSize.w; + int ch = clientSize.h; + + surface.SetForeground(black); + if(checked) + { + surface.SetBackground(Color { 85,85,85 }); + surface.Area(0,0, cw-1, ch-1); + } + else + surface.LineStipple(0xAAAA); + + surface.Rectangle(0,0,cw-1,ch-1); + + if(active) + { + surface.LineStipple(0xAAAA); + surface.Rectangle(2,2,cw-3,ch-3); + } + } + + bool AnchorEditor::NotifyClicked(Button button, int x, int y, Modifiers mods) + { + AnchorDropBox anchorDropBox = (AnchorDropBox)master; + Anchor anchor = anchorDropBox.anchorValue; + Window control = anchorDropBox.control; + DataBox dropMaster = (DataBox)anchorDropBox.master; + int id = button.id; + + switch(id) + { + case 0: anchor.left.type = button.checked ? offset : none; break; + case 1: anchor.top.type = button.checked ? offset : none; break; + case 2: anchor.right.type = button.checked ? offset : none; break; + case 3: anchor.bottom.type = button.checked ? offset : none; break; + } + + if(anchor.horz.type == middleRelative && (id == 0 || id == 2)) + { + anchorDropBox.relButtons[0].checked = false; + anchorDropBox.relButtons[2].checked = false; + } + if(anchor.vert.type == middleRelative && (id == 1 || id == 3)) + { + anchorDropBox.relButtons[1].checked = false; + anchorDropBox.relButtons[3].checked = false; + } + anchorDropBox.relButtons[id].checked = false; + + //anchor.horz.type = none; + //anchor.vert.type = none; + + { + int vpw, vph; + int x,y,w,h; + Window parent = control.parent; + + // Fix Anchor + x = control.position.x; + y = control.position.y; + w = control.size.w; + h = control.size.h; + + vpw = parent.clientSize.w; + vph = parent.clientSize.h; + if(control.nonClient) + { + vpw = parent.size.w; + vph = parent.size.h; + } + else if(((BorderBits)control.borderStyle).fixed) + { + if(!control.dontScrollHorz && parent.scrollArea.w) vpw = parent.scrollArea.w; + if(!control.dontScrollVert && parent.scrollArea.h) vph = parent.scrollArea.h; + } + + if(anchor.left.type == offset) anchor.left.distance = x; + else if(anchor.left.type == relative) anchor.left.percent = (float)x / vpw; + if(anchor.top.type == offset) anchor.top.distance = y; + else if(anchor.top.type == relative) anchor.top.percent = (float)y / vph; + if(anchor.right.type == offset) anchor.right.distance = vpw - (x + w); + //else if(anchor.right.type == relative) anchor.right.percent = (float) (x + w) / vpw; + else if(anchor.right.type == relative) anchor.right.percent = (float) (vpw - (x + w)) / vpw; + if(anchor.bottom.type == offset) anchor.bottom.distance = vph - (y + h); + //else if(anchor.bottom.type == relative) anchor.bottom.percent = (float) (y + h) / vph; + else if(anchor.bottom.type == relative) anchor.bottom.percent = (float) (vph - (y + h)) / vph; + + if(!anchor.left.type && !anchor.right.type) + { + anchor.horz.distance = (x + w / 2) - (vpw / 2); + //anchor.horz.type = anchor.horz.distance ? offset : 0; + } + else if(anchor.horz.type == middleRelative) anchor.horz.percent = (float) ((x + w / 2) - (vpw / 2)) / vpw; + if(!anchor.top.type && !anchor.bottom.type) + { + anchor.vert.distance = (y + h / 2) - (vph / 2); + //anchor.vert.type = anchor.vert.distance ? offset : 0; + } + else if(anchor.vert.type == middleRelative) anchor.vert.percent = (float)((y + h / 2) - (vph / 2)) / vph; + } + + { + char tempString[1024] = ""; + bool needClass = false; + char * string = anchor.OnGetString(tempString, null, &needClass); + anchorDropBox.contents = string; + } + + dropMaster.SetData(&anchor, false); + anchorDropBox.anchorValue = anchor; + return true; + } +} + +private class AnchorRelButton : Button +{ + toggle = true; + bevel = false; + text = "%"; + //bevelOver = true; + + void OnRedraw(Surface surface) + { + int cw = clientSize.w; + int ch = clientSize.h; + + if(checked) + { + surface.SetForeground(black); + } + else + { + surface.SetForeground(Color{170,170,170}); + } + surface.WriteText(5,2, "%", 1); + + if(active) + { + surface.LineStipple(0xAAAA); + surface.Rectangle(3,3,cw-4,ch-4); + } + } + + bool AnchorEditor::NotifyClicked(Button button, int x, int y, Modifiers mods) + { + AnchorDropBox anchorDropBox = (AnchorDropBox)master; + Anchor anchor = anchorDropBox.anchorValue; + Window control = anchorDropBox.control; + DataBox dropMaster = (DataBox)anchorDropBox.master; + int id = button.id; + + if((id == 0 || id == 2) && ((!anchor.left.type && !anchor.right.type) || anchor.left.type == middleRelative)) + { + if(button.checked) anchor.horz.type = middleRelative; else anchor.horz.type = none; + anchorDropBox.relButtons[(id + 2)%4].checked = button.checked; + } + else if((id == 1 || id == 3) && ((!anchor.top.type && !anchor.bottom.type) || anchor.top.type == middleRelative)) + { + if(button.checked) anchor.vert.type = middleRelative; else anchor.vert.type = none; + anchorDropBox.relButtons[(id + 2)%4].checked = button.checked; + } + else + { + switch(id) + { + case 0: anchor.left.type = button.checked ? relative : (anchor.left.type ? offset : none); break; + case 1: anchor.top.type = button.checked ? relative : (anchor.top.type ? offset : none); break; + case 2: anchor.right.type = button.checked ? relative : (anchor.right.type ? offset : none); break; + case 3: anchor.bottom.type = button.checked ? relative : (anchor.bottom.type ? offset : none); break; + } + anchorDropBox.buttons[id].checked = true; + if(anchor.horz.type == middleRelative) anchor.horz.type = none; + if(anchor.vert.type == middleRelative) anchor.vert.type = none; + } + + { + int vpw, vph; + int x,y,w,h; + Window parent = control.parent; + + // Fix Anchor + x = control.position.x; + y = control.position.y; + w = control.size.w; + h = control.size.h; + + vpw = parent.clientSize.w; + vph = parent.clientSize.h; + if(control.nonClient) + { + vpw = parent.size.w; + vph = parent.size.h; + } + else if(((BorderBits)control.borderStyle).fixed) + { + if(!control.dontScrollHorz && parent.scrollArea.w) vpw = parent.scrollArea.w; + if(!control.dontScrollVert && parent.scrollArea.h) vph = parent.scrollArea.h; + } + + if(anchor.left.type == offset) anchor.left.distance = x; + else if(anchor.left.type == relative) anchor.left.percent = (float)x / vpw; + if(anchor.top.type == offset) anchor.top.distance = y; + else if(anchor.top.type == relative) anchor.top.percent = (float)y / vph; + if(anchor.right.type == offset) anchor.right.distance = vpw - (x + w); + //else if(anchor.right.type == relative) anchor.right.percent = (float) (x + w) / vpw; + else if(anchor.right.type == relative) anchor.right.percent = (float) (vpw - (x + w)) / vpw; + if(anchor.bottom.type == offset) anchor.bottom.distance = vph - (y + h); + //else if(anchor.bottom.type == relative) anchor.bottom.percent = (float) (y + h) / vph; + else if(anchor.bottom.type == relative) anchor.bottom.percent = (float) (vph - (y + h)) / vph; + + if(!anchor.left.type && !anchor.right.type) + { + anchor.horz.distance = (x + w / 2) - (vpw / 2); + //anchor.horz.type = anchor.horz.distance ? offset : none; + } + else if(anchor.horz.type == middleRelative) anchor.horz.percent = (float) ((x + w / 2) - (vpw / 2)) / vpw; + if(!anchor.top.type && !anchor.bottom.type) + { + anchor.vert.distance = (y + h / 2) - (vph / 2); + //anchor.vert.type = anchor.vert.distance ? offset : none; + } + else if(anchor.vert.type == middleRelative) anchor.vert.percent = (float)((y + h / 2) - (vph / 2)) / vph; + } + + { + char tempString[1024] = ""; + bool needClass = false; + char * string = anchor.OnGetString(tempString, null, &needClass); + anchorDropBox.contents = string; + } + + dropMaster.SetData(&anchor, false); + anchorDropBox.anchorValue = anchor; + return true; + } +} + +private class AnchorEditor : Window +{ + interim = true; + borderStyle = deepContour; + size.h = 92; + + bool OnKeyDown(Key key, unichar ch) + { + if(key == escape) + return master.OnKeyDown(key, ch); + return true; + } +} + +private class AnchorDropBox : DropBox +{ + Anchor anchorValue; + Window control; + Button relButtons[4], buttons[4]; + + AnchorEditor anchorEditor + { + master = this; + autoCreate = false; + }; + + Window OnDropDown() + { + int c; + Button + { + anchorEditor, + anchor = Anchor { left = 28, top = 28, right = 28, bottom = 28 }, + inactive = true, disabled = true + }; + for(c = 0; c<4; c++) + { + Button button = buttons[c] = AnchorButton + { + anchorEditor, id = c, + size = Size { (c%2)?10:28, (c%2)?28:10 } + }; + Button relButton = relButtons[c] = AnchorRelButton + { + anchorEditor, id = c; + }; + + switch(c) + { + case 0: + if(anchorValue.left.type && anchorValue.left.type != middleRelative) button.checked = true; + if(anchorValue.left.type == relative || anchorValue.horz.type == middleRelative) relButton.checked = true; + + button.anchor = Anchor { left = 0 }; + relButton.anchor = Anchor { left = 5, vert = 16 }; + break; + case 1: + if(anchorValue.top.type && anchorValue.top.type != middleRelative) button.checked = true; + if(anchorValue.top.type == relative || anchorValue.vert.type == middleRelative) relButton.checked = true; + + button.anchor = Anchor { top = 0 }; + relButton.anchor = Anchor { top = 5, horz = 16 }; + break; + case 2: + if(anchorValue.right.type && anchorValue.right.type != middleRelative) button.checked = true; + if(anchorValue.right.type == relative || anchorValue.horz.type == middleRelative) relButton.checked = true; + + button.anchor = Anchor { right = 0 }; + relButton.anchor = Anchor { right = 5, vert = 16 }; + break; + case 3: + if(anchorValue.bottom.type && anchorValue.bottom.type != middleRelative) button.checked = true; + if(anchorValue.bottom.type == relative || anchorValue.vert.type == middleRelative) relButton.checked = true; + + button.anchor = Anchor { bottom = 0 }; + relButton.anchor = Anchor { bottom = 5, horz = 16 }; + break; + } + } + anchorEditor.Create(); + return anchorEditor; + } + + void OnCloseDropDown(Window anchorEditor) + { + // TOFIX: Patch for update bug + master.Update(null); + anchorEditor.Destroy(0); + } + + bool DataBox::NotifyTextEntry(AnchorDropBox dropBox, char * string, bool save) + { + Anchor anchor = dropBox.anchorValue; + Window control = dropBox.control; + + if(save) + { + if(anchor.OnGetDataFromString(string)) + { + SetData(&anchor, false); + dropBox.anchorValue = anchor; + } + } + else + { + char tempString[1024] = ""; + bool needClass = false; + char * string = anchor.OnGetString(tempString, null, &needClass); + dropBox.contents = string; + } + return true; + } +} diff --git a/tests/examplefiles/test.eh b/tests/examplefiles/test.eh new file mode 100644 index 00000000..1ed173fb --- /dev/null +++ b/tests/examplefiles/test.eh @@ -0,0 +1,315 @@ +/* A Bison parser, made by GNU Bison 2.0. */ + +/* Skeleton parser for Yacc-like parsing with Bison, + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + IDENTIFIER = 258, + CONSTANT = 259, + STRING_LITERAL = 260, + SIZEOF = 261, + PTR_OP = 262, + INC_OP = 263, + DEC_OP = 264, + LEFT_OP = 265, + RIGHT_OP = 266, + LE_OP = 267, + GE_OP = 268, + EQ_OP = 269, + NE_OP = 270, + AND_OP = 271, + OR_OP = 272, + MUL_ASSIGN = 273, + DIV_ASSIGN = 274, + MOD_ASSIGN = 275, + ADD_ASSIGN = 276, + SUB_ASSIGN = 277, + LEFT_ASSIGN = 278, + RIGHT_ASSIGN = 279, + AND_ASSIGN = 280, + XOR_ASSIGN = 281, + OR_ASSIGN = 282, + TYPE_NAME = 283, + TYPEDEF = 284, + EXTERN = 285, + STATIC = 286, + AUTO = 287, + REGISTER = 288, + CHAR = 289, + SHORT = 290, + INT = 291, + UINT = 292, + INT64 = 293, + LONG = 294, + SIGNED = 295, + UNSIGNED = 296, + FLOAT = 297, + DOUBLE = 298, + CONST = 299, + VOLATILE = 300, + VOID = 301, + VALIST = 302, + STRUCT = 303, + UNION = 304, + ENUM = 305, + ELLIPSIS = 306, + CASE = 307, + DEFAULT = 308, + IF = 309, + SWITCH = 310, + WHILE = 311, + DO = 312, + FOR = 313, + GOTO = 314, + CONTINUE = 315, + BREAK = 316, + RETURN = 317, + IFX = 318, + ELSE = 319, + CLASS = 320, + THISCLASS = 321, + CLASS_NAME = 322, + PROPERTY = 323, + SETPROP = 324, + GETPROP = 325, + NEWOP = 326, + RENEW = 327, + DELETE = 328, + EXT_DECL = 329, + EXT_STORAGE = 330, + IMPORT = 331, + DEFINE = 332, + VIRTUAL = 333, + EXT_ATTRIB = 334, + PUBLIC = 335, + PRIVATE = 336, + TYPED_OBJECT = 337, + ANY_OBJECT = 338, + _INCREF = 339, + EXTENSION = 340, + ASM = 341, + TYPEOF = 342, + WATCH = 343, + STOPWATCHING = 344, + FIREWATCHERS = 345, + WATCHABLE = 346, + CLASS_DESIGNER = 347, + CLASS_NO_EXPANSION = 348, + CLASS_FIXED = 349, + ISPROPSET = 350, + CLASS_DEFAULT_PROPERTY = 351, + PROPERTY_CATEGORY = 352, + CLASS_DATA = 353, + CLASS_PROPERTY = 354, + SUBCLASS = 355, + NAMESPACE = 356, + NEW0OP = 357, + RENEW0 = 358, + VAARG = 359, + DBTABLE = 360, + DBFIELD = 361, + DBINDEX = 362, + DATABASE_OPEN = 363 + }; +#endif +#define IDENTIFIER 258 +#define CONSTANT 259 +#define STRING_LITERAL 260 +#define SIZEOF 261 +#define PTR_OP 262 +#define INC_OP 263 +#define DEC_OP 264 +#define LEFT_OP 265 +#define RIGHT_OP 266 +#define LE_OP 267 +#define GE_OP 268 +#define EQ_OP 269 +#define NE_OP 270 +#define AND_OP 271 +#define OR_OP 272 +#define MUL_ASSIGN 273 +#define DIV_ASSIGN 274 +#define MOD_ASSIGN 275 +#define ADD_ASSIGN 276 +#define SUB_ASSIGN 277 +#define LEFT_ASSIGN 278 +#define RIGHT_ASSIGN 279 +#define AND_ASSIGN 280 +#define XOR_ASSIGN 281 +#define OR_ASSIGN 282 +#define TYPE_NAME 283 +#define TYPEDEF 284 +#define EXTERN 285 +#define STATIC 286 +#define AUTO 287 +#define REGISTER 288 +#define CHAR 289 +#define SHORT 290 +#define INT 291 +#define UINT 292 +#define INT64 293 +#define LONG 294 +#define SIGNED 295 +#define UNSIGNED 296 +#define FLOAT 297 +#define DOUBLE 298 +#define CONST 299 +#define VOLATILE 300 +#define VOID 301 +#define VALIST 302 +#define STRUCT 303 +#define UNION 304 +#define ENUM 305 +#define ELLIPSIS 306 +#define CASE 307 +#define DEFAULT 308 +#define IF 309 +#define SWITCH 310 +#define WHILE 311 +#define DO 312 +#define FOR 313 +#define GOTO 314 +#define CONTINUE 315 +#define BREAK 316 +#define RETURN 317 +#define IFX 318 +#define ELSE 319 +#define CLASS 320 +#define THISCLASS 321 +#define CLASS_NAME 322 +#define PROPERTY 323 +#define SETPROP 324 +#define GETPROP 325 +#define NEWOP 326 +#define RENEW 327 +#define DELETE 328 +#define EXT_DECL 329 +#define EXT_STORAGE 330 +#define IMPORT 331 +#define DEFINE 332 +#define VIRTUAL 333 +#define EXT_ATTRIB 334 +#define PUBLIC 335 +#define PRIVATE 336 +#define TYPED_OBJECT 337 +#define ANY_OBJECT 338 +#define _INCREF 339 +#define EXTENSION 340 +#define ASM 341 +#define TYPEOF 342 +#define WATCH 343 +#define STOPWATCHING 344 +#define FIREWATCHERS 345 +#define WATCHABLE 346 +#define CLASS_DESIGNER 347 +#define CLASS_NO_EXPANSION 348 +#define CLASS_FIXED 349 +#define ISPROPSET 350 +#define CLASS_DEFAULT_PROPERTY 351 +#define PROPERTY_CATEGORY 352 +#define CLASS_DATA 353 +#define CLASS_PROPERTY 354 +#define SUBCLASS 355 +#define NAMESPACE 356 +#define NEW0OP 357 +#define RENEW0 358 +#define VAARG 359 +#define DBTABLE 360 +#define DBFIELD 361 +#define DBINDEX 362 +#define DATABASE_OPEN 363 + + + + +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +#line 42 "grammar.y" +typedef union YYSTYPE { + SpecifierType specifierType; + int i; + AccessMode declMode; + Identifier id; + Expression exp; + Specifier specifier; + OldList * list; + Enumerator enumerator; + Declarator declarator; + Pointer pointer; + Initializer initializer; + InitDeclarator initDeclarator; + TypeName typeName; + Declaration declaration; + Statement stmt; + FunctionDefinition function; + External external; + Context context; + AsmField asmField; + + Instantiation instance; + MembersInit membersInit; + MemberInit memberInit; + ClassFunction classFunction; + ClassDefinition _class; + ClassDef classDef; + PropertyDef prop; + char * string; + Symbol symbol; + PropertyWatch propertyWatch; + TemplateParameter templateParameter; + TemplateArgument templateArgument; + TemplateDatatype templateDatatype; + + DBTableEntry dbtableEntry; + DBIndexItem dbindexItem; + DBTableDef dbtableDef; +} YYSTYPE; +/* Line 1318 of yacc.c. */ +#line 293 "grammar.eh" +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + +extern YYSTYPE yylval; + +#if ! defined (YYLTYPE) && ! defined (YYLTYPE_IS_DECLARED) +typedef struct YYLTYPE +{ + int first_line; + int first_column; + int last_line; + int last_column; +} YYLTYPE; +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ +# define YYLTYPE_IS_DECLARED 1 +# define YYLTYPE_IS_TRIVIAL 1 +#endif + +extern YYLTYPE yylloc; + + diff --git a/tests/examplefiles/test.groovy b/tests/examplefiles/test.groovy new file mode 100644 index 00000000..903863d2 --- /dev/null +++ b/tests/examplefiles/test.groovy @@ -0,0 +1,97 @@ +// This source code comes from http://www.odelia-technologies.com/node/200 + +package com.odelia.groovy.simpleworkflow + + +class SimpleWorkflowEngine { + def workflowMap = [:] + def context = [:] + def beforeActivityName = 'beforeActivity' + def afterActivityName = 'afterActivity' + + SimpleWorkflowEngine(workflow, context = [:]) { + this.context = context + parseWorkflow(workflow) + } + + def parseWorkflow(workflow) { + workflowMap = new WorkflowParser().parse(workflow) + } + + def getActivityValue(activity) { + assert activity instanceof String + if (!workflowMap[activity]) + throw new RuntimeException("$activity activity doesn't exist") + workflowMap[activity] + } + + def execute(activity, pause) { + if (workflowMap[beforeActivityName]) { + getActivityValue(beforeActivityName)(context, activity) + } + + def activityValue = getActivityValue(activity) + + // Determine the next activity to execute + def nextActivity + switch (activityValue) { + case String: nextActivity = activityValue; break + case Closure: nextActivity = activityValue(context); break + case Class: nextActivity = activityValue.newInstance()(context) + } + + if (workflowMap[afterActivityName]) { + getActivityValue(afterActivityName)(context, activity, nextActivity) + } + + if (!pause && nextActivity) + call(nextActivity) + else + nextActivity + } + + def call(activity) { + execute(activity, false) + } + + def nextActivity(activity) { + execute(activity, true) + } + + static void main(String[] args) { + if (args.size() != 2) { + println 'Usage: com.odelia.groovy.simpleworkflow.SimpleWorkflowEngine <dsl_filename> <activity_name>' + return + } + SimpleWorkflowEngine.newInstance(new File(args[0]))(args[1]) + } + +} + +private class WorkflowParser { + def map = [:] + + def methodMissing(String name, args) { + map[name] = args[0] + } + + def parse(Closure wf) { + wf.delegate = this + wf.resolveStrategy = Closure.DELEGATE_FIRST + wf() + map + } + + def workflow = { it -> + it.delegate = this + it.resolveStrategy = Closure.DELEGATE_FIRST + it() + } + + def parse(File workflowDef) { + def binding = new Binding([workflow: workflow]) + def shell = new GroovyShell(binding) + shell.evaluate(workflowDef) + map + } +}
\ No newline at end of file diff --git a/tests/examplefiles/test.pypylog b/tests/examplefiles/test.pypylog new file mode 100644 index 00000000..f85030cb --- /dev/null +++ b/tests/examplefiles/test.pypylog @@ -0,0 +1,1839 @@ +[5ed621f277b8] {jit-backend-counts +[5ed621f309bc] jit-backend-counts} +[5ed622c957b0] {jit-log-opt-loop +# Loop 0 : loop with 145 ops +[p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, f11, p12, p13, p14, p15, i16, f17, i18, i19, i20, i21, i22, i23, i24, i25, i26, f27, i28, f29, f30] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #125 FOR_ITER', 0) +i32 = int_gt(i18, 0) +guard_true(i32, descr=<Guard3>) [p1, p0, p5, p2, p3, p4, p6, p7, p8, p9, p10, p12, p13, p14, p15, i16, f17, f11] +i33 = int_add(i19, i20) +i35 = int_sub(i18, 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #128 STORE_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #131 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #134 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #137 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #140 BINARY_MULTIPLY', 0) +setfield_gc(p5, i33, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_current 8>) +setfield_gc(p5, i35, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_remaining 16>) +i36 = int_mul_ovf(i21, i22) +guard_no_overflow(, descr=<Guard4>) [p1, p0, p12, p15, i36, p2, p3, p4, p5, p14, p6, p7, p8, p9, p10, p13, i19, None, f17, f11] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #141 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #144 BINARY_ADD', 0) +i38 = int_add_ovf(i36, i19) +guard_no_overflow(, descr=<Guard5>) [p1, p0, i38, p2, p3, p4, p5, p14, p6, p7, p8, p9, p10, p12, p13, p15, i36, i19, None, f17, f11] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #145 BINARY_SUBSCR', 0) +i40 = int_lt(i38, 0) +guard_false(i40, descr=<Guard6>) [p1, p0, p14, i38, i23, p2, p3, p4, p5, p6, p7, p8, p9, p10, p12, p13, p15, None, i19, None, f17, f11] +i41 = int_lt(i38, i23) +guard_true(i41, descr=<Guard7>) [p1, p0, p14, i38, p2, p3, p4, p5, p6, p7, p8, p9, p10, p12, p13, p15, None, i19, None, f17, f11] +f42 = getarrayitem_raw(i24, i38, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #146 STORE_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #149 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #152 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #155 LOAD_CONST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #158 BINARY_SUBTRACT', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #159 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #162 BINARY_MULTIPLY', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #163 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #166 BINARY_ADD', 0) +i43 = int_add_ovf(i25, i19) +guard_no_overflow(, descr=<Guard8>) [p1, p0, i43, p2, p3, p4, p5, p14, p6, p7, p8, p9, p10, p12, p13, p15, f42, i25, None, i19, None, None, f11] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #167 BINARY_SUBSCR', 0) +i45 = int_lt(i43, 0) +guard_false(i45, descr=<Guard9>) [p1, p0, p14, i43, i23, p2, p3, p4, p5, p6, p7, p8, p9, p10, p12, p13, p15, f42, None, None, i19, None, None, f11] +i46 = int_lt(i43, i23) +guard_true(i46, descr=<Guard10>) [p1, p0, p14, i43, p2, p3, p4, p5, p6, p7, p8, p9, p10, p12, p13, p15, f42, None, None, i19, None, None, f11] +f47 = getarrayitem_raw(i24, i43, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #168 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #171 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #174 LOAD_CONST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #177 BINARY_ADD', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #178 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #181 BINARY_MULTIPLY', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #182 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #185 BINARY_ADD', 0) +i48 = int_add_ovf(i26, i19) +guard_no_overflow(, descr=<Guard11>) [p1, p0, i48, p2, p3, p4, p5, p14, p6, p7, p8, p9, p10, p12, p13, p15, i26, f47, f42, None, None, i19, None, None, f11] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #186 BINARY_SUBSCR', 0) +i50 = int_lt(i48, 0) +guard_false(i50, descr=<Guard12>) [p1, p0, p14, i48, i23, p2, p3, p4, p5, p6, p7, p8, p9, p10, p12, p13, p15, None, f47, f42, None, None, i19, None, None, f11] +i51 = int_lt(i48, i23) +guard_true(i51, descr=<Guard13>) [p1, p0, p14, i48, p2, p3, p4, p5, p6, p7, p8, p9, p10, p12, p13, p15, None, f47, f42, None, None, i19, None, None, f11] +f52 = getarrayitem_raw(i24, i48, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #187 BINARY_ADD', 0) +f53 = float_add(f47, f52) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #188 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #191 BINARY_MULTIPLY', 0) +f54 = float_mul(f53, f27) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #192 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #195 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #198 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #201 BINARY_MULTIPLY', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #202 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #205 BINARY_ADD', 0) +i55 = int_add_ovf(i28, i19) +guard_no_overflow(, descr=<Guard14>) [p1, p0, i55, p2, p3, p4, p5, p14, p6, p7, p8, p9, p10, p12, p13, p15, f54, i28, None, None, f42, None, None, i19, None, None, f11] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #206 LOAD_CONST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #209 BINARY_SUBTRACT', 0) +i57 = int_sub_ovf(i55, 1) +guard_no_overflow(, descr=<Guard15>) [p1, p0, i57, p2, p3, p4, p5, p14, p6, p7, p8, p9, p10, p12, p13, p15, i55, f54, None, None, None, f42, None, None, i19, None, None, f11] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #210 BINARY_SUBSCR', 0) +i59 = int_lt(i57, 0) +guard_false(i59, descr=<Guard16>) [p1, p0, p14, i57, i23, p2, p3, p4, p5, p6, p7, p8, p9, p10, p12, p13, p15, None, f54, None, None, None, f42, None, None, i19, None, None, f11] +i60 = int_lt(i57, i23) +guard_true(i60, descr=<Guard17>) [p1, p0, p14, i57, p2, p3, p4, p5, p6, p7, p8, p9, p10, p12, p13, p15, None, f54, None, None, None, f42, None, None, i19, None, None, f11] +f61 = getarrayitem_raw(i24, i57, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #211 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #214 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #217 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #220 BINARY_MULTIPLY', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #221 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #224 BINARY_ADD', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #225 LOAD_CONST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #228 BINARY_ADD', 0) +i63 = int_add_ovf(i55, 1) +guard_no_overflow(, descr=<Guard18>) [p1, p0, i63, p2, p3, p4, p5, p14, p6, p7, p8, p9, p10, p12, p13, p15, f61, i55, f54, None, None, None, f42, None, None, i19, None, None, f11] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #229 BINARY_SUBSCR', 0) +i64 = int_lt(i63, i23) +guard_true(i64, descr=<Guard19>) [p1, p0, p14, i63, p2, p3, p4, p5, p6, p7, p8, p9, p10, p12, p13, p15, f61, None, f54, None, None, None, f42, None, None, i19, None, None, f11] +f65 = getarrayitem_raw(i24, i63, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #230 BINARY_ADD', 0) +f66 = float_add(f61, f65) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #231 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #234 BINARY_MULTIPLY', 0) +f67 = float_mul(f66, f29) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #235 BINARY_ADD', 0) +f68 = float_add(f54, f67) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #236 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #239 BINARY_MULTIPLY', 0) +f69 = float_mul(f68, f30) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #240 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #243 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #246 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #249 BINARY_MULTIPLY', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #250 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #253 BINARY_ADD', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #254 STORE_SUBSCR', 0) +i70 = int_lt(i55, i23) +guard_true(i70, descr=<Guard20>) [p1, p0, p14, i55, p2, p3, p4, p5, p6, p7, p8, p9, p10, p12, p13, p15, f69, None, None, None, None, None, None, f42, None, None, i19, None, None, f11] +setarrayitem_raw(i24, i55, f69, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #255 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #258 LOAD_GLOBAL', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #261 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #264 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #267 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #270 BINARY_MULTIPLY', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #271 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #274 BINARY_ADD', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #275 BINARY_SUBSCR', 0) +f71 = getarrayitem_raw(i24, i55, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #276 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #279 BINARY_SUBTRACT', 0) +f72 = float_sub(f71, f42) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #280 CALL_FUNCTION', 0) +i73 = force_token() +debug_merge_point('<code object sqr, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 7> #0 LOAD_FAST', 1) +debug_merge_point('<code object sqr, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 7> #3 LOAD_FAST', 1) +debug_merge_point('<code object sqr, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 7> #6 BINARY_MULTIPLY', 1) +f74 = float_mul(f72, f72) +debug_merge_point('<code object sqr, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 7> #7 RETURN_VALUE', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #283 INPLACE_ADD', 0) +f75 = float_add(f11, f74) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #284 STORE_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #287 JUMP_ABSOLUTE', 0) +i77 = getfield_raw(38968960, descr=<SignedFieldDescr pypysig_long_struct.c_value 0>) +i79 = int_sub(i77, 26) +setfield_raw(38968960, i79, descr=<SignedFieldDescr pypysig_long_struct.c_value 0>) +i81 = int_lt(i79, 0) +guard_false(i81, descr=<Guard21>) [p1, p0, p2, p3, p4, p5, p6, p7, p8, p9, p10, p12, p13, p14, p15, f75, None, None, None, None, None, None, None, f42, None, None, i19, None, None, None] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #125 FOR_ITER', 0) +jump(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, f75, p12, p13, p14, p15, i19, f42, i35, i33, i20, i21, i22, i23, i24, i25, i26, f27, i36, f29, f30, descr=<Loop0>) +[5ed622d5187e] jit-log-opt-loop} +[5ed622e116d0] {jit-log-opt-loop +# Loop 1 : entry bridge with 188 ops +[p0, p1, p2, p3, i4, p5, i6, i7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #125 FOR_ITER', 0) +guard_value(i4, 2, descr=<Guard22>) [i4, p1, p0, p2, p3, p5, i6, i7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26] +guard_class(p9, 19861240, descr=<Guard23>) [p1, p0, p9, p2, p3, p5, i6, p8, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26] +i29 = getfield_gc(p9, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_remaining 16>) +i31 = int_gt(i29, 0) +guard_true(i31, descr=<Guard24>) [p1, p0, p9, p2, p3, p5, i6, p8, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26] +i32 = getfield_gc(p9, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_current 8>) +i33 = getfield_gc(p9, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_step 24>) +i34 = int_add(i32, i33) +i36 = int_sub(i29, 1) +setfield_gc(p9, i34, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_current 8>) +setfield_gc(p9, i36, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_remaining 16>) +guard_value(i6, 0, descr=<Guard25>) [i6, p1, p0, p2, p3, p5, p8, p9, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, i32] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #128 STORE_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #131 LOAD_FAST', 0) +guard_nonnull_class(p23, 19886912, descr=<Guard26>) [p1, p0, p23, p2, p3, p5, p8, p9, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p24, p26, i32] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #134 LOAD_FAST', 0) +guard_nonnull_class(p24, ConstClass(W_IntObject), descr=<Guard27>) [p1, p0, p24, p2, p3, p5, p8, p9, p23, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p26, i32] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #137 LOAD_FAST', 0) +guard_nonnull_class(p21, ConstClass(W_IntObject), descr=<Guard28>) [p1, p0, p21, p2, p3, p5, p8, p9, p23, p24, p12, p13, p14, p15, p16, p17, p18, p19, p20, p22, p26, i32] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #140 BINARY_MULTIPLY', 0) +i41 = getfield_gc_pure(p24, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +i42 = getfield_gc_pure(p21, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +i43 = int_mul_ovf(i41, i42) +guard_no_overflow(, descr=<Guard29>) [p1, p0, p21, p24, i43, p2, p3, p5, p8, p9, p23, p13, p14, p15, p16, p17, p18, p19, p20, p22, p26, i32] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #141 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #144 BINARY_ADD', 0) +i44 = int_add_ovf(i43, i32) +guard_no_overflow(, descr=<Guard30>) [p1, p0, i44, p2, p3, p5, p8, p9, p23, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p24, p26, i43, i32] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #145 BINARY_SUBSCR', 0) +i45 = getfield_gc(p23, descr=<SignedFieldDescr pypy.module.array.interp_array.W_ArrayTyped.inst_len 32>) +i47 = int_lt(i44, 0) +guard_false(i47, descr=<Guard31>) [p1, p0, p23, i44, i45, p2, p3, p5, p8, p9, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p24, p26, None, i32] +i49 = int_lt(i44, i45) +guard_true(i49, descr=<Guard32>) [p1, p0, p23, i44, p2, p3, p5, p8, p9, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p24, p26, None, i32] +i50 = getfield_gc(p23, descr=<NonGcPtrFieldDescr pypy.module.array.interp_array.W_ArrayTyped.inst_buffer 24>) +f51 = getarrayitem_raw(i50, i44, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #146 STORE_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #149 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #152 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #155 LOAD_CONST', 0) +guard_value(p2, ConstPtr(ptr52), descr=<Guard33>) [p1, p0, p2, p3, p5, p8, p9, p23, p24, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, f51, None, i32] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #158 BINARY_SUBTRACT', 0) +i54 = int_sub_ovf(i41, 1) +guard_no_overflow(, descr=<Guard34>) [p1, p0, p24, i54, p3, p5, p8, p9, p23, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, f51, None, i32] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #159 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #162 BINARY_MULTIPLY', 0) +i55 = int_mul_ovf(i54, i42) +guard_no_overflow(, descr=<Guard35>) [p1, p0, p21, i55, p3, p5, p8, p9, p23, p13, p14, p15, p16, p17, p18, p19, p20, p22, p24, i54, f51, None, i32] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #163 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #166 BINARY_ADD', 0) +i56 = int_add_ovf(i55, i32) +guard_no_overflow(, descr=<Guard36>) [p1, p0, i56, p3, p5, p8, p9, p23, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p24, i55, None, f51, None, i32] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #167 BINARY_SUBSCR', 0) +i58 = int_lt(i56, 0) +guard_false(i58, descr=<Guard37>) [p1, p0, p23, i56, i45, p3, p5, p8, p9, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p24, None, None, f51, None, i32] +i59 = int_lt(i56, i45) +guard_true(i59, descr=<Guard38>) [p1, p0, p23, i56, p3, p5, p8, p9, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p24, None, None, f51, None, i32] +f60 = getarrayitem_raw(i50, i56, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #168 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #171 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #174 LOAD_CONST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #177 BINARY_ADD', 0) +i62 = int_add_ovf(i41, 1) +guard_no_overflow(, descr=<Guard39>) [p1, p0, p24, i62, p3, p5, p8, p9, p23, p14, p15, p16, p17, p18, p19, p20, p21, p22, f60, None, None, f51, None, i32] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #178 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #181 BINARY_MULTIPLY', 0) +i63 = int_mul_ovf(i62, i42) +guard_no_overflow(, descr=<Guard40>) [p1, p0, p21, i63, p3, p5, p8, p9, p23, p14, p15, p16, p17, p18, p19, p20, p22, p24, i62, f60, None, None, f51, None, i32] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #182 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #185 BINARY_ADD', 0) +i64 = int_add_ovf(i63, i32) +guard_no_overflow(, descr=<Guard41>) [p1, p0, i64, p3, p5, p8, p9, p23, p14, p15, p16, p17, p18, p19, p20, p21, p22, p24, i63, None, f60, None, None, f51, None, i32] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #186 BINARY_SUBSCR', 0) +i66 = int_lt(i64, 0) +guard_false(i66, descr=<Guard42>) [p1, p0, p23, i64, i45, p3, p5, p8, p9, p14, p15, p16, p17, p18, p19, p20, p21, p22, p24, None, None, f60, None, None, f51, None, i32] +i67 = int_lt(i64, i45) +guard_true(i67, descr=<Guard43>) [p1, p0, p23, i64, p3, p5, p8, p9, p14, p15, p16, p17, p18, p19, p20, p21, p22, p24, None, None, f60, None, None, f51, None, i32] +f68 = getarrayitem_raw(i50, i64, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #187 BINARY_ADD', 0) +f69 = float_add(f60, f68) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #188 LOAD_FAST', 0) +guard_nonnull_class(p18, 19800744, descr=<Guard44>) [p1, p0, p18, p3, p5, p8, p9, p14, p15, p16, p17, p19, p20, p21, p22, p23, p24, f69, None, None, None, None, None, f51, None, i32] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #191 BINARY_MULTIPLY', 0) +f71 = getfield_gc_pure(p18, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +f72 = float_mul(f69, f71) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #192 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #195 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #198 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #201 BINARY_MULTIPLY', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #202 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #205 BINARY_ADD', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #206 LOAD_CONST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #209 BINARY_SUBTRACT', 0) +i74 = int_sub(i44, 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #210 BINARY_SUBSCR', 0) +i76 = int_lt(i74, 0) +guard_false(i76, descr=<Guard45>) [p1, p0, p23, i74, i45, p3, p5, p8, p9, p14, p15, p16, p17, p18, p19, p20, p21, p22, p24, f72, None, None, None, None, None, None, f51, None, i32] +i77 = int_lt(i74, i45) +guard_true(i77, descr=<Guard46>) [p1, p0, p23, i74, p3, p5, p8, p9, p14, p15, p16, p17, p18, p19, p20, p21, p22, p24, f72, None, None, None, None, None, None, f51, None, i32] +f78 = getarrayitem_raw(i50, i74, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #211 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #214 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #217 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #220 BINARY_MULTIPLY', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #221 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #224 BINARY_ADD', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #225 LOAD_CONST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #228 BINARY_ADD', 0) +i80 = int_add(i44, 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #229 BINARY_SUBSCR', 0) +i81 = int_lt(i80, i45) +guard_true(i81, descr=<Guard47>) [p1, p0, p23, i80, p3, p5, p8, p9, p15, p16, p17, p18, p19, p20, p21, p22, p24, f78, f72, None, None, None, None, None, None, f51, None, i32] +f82 = getarrayitem_raw(i50, i80, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #230 BINARY_ADD', 0) +f83 = float_add(f78, f82) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #231 LOAD_FAST', 0) +guard_nonnull_class(p17, 19800744, descr=<Guard48>) [p1, p0, p17, p3, p5, p8, p9, p15, p16, p18, p19, p20, p21, p22, p23, p24, f83, None, f72, None, None, None, None, None, None, f51, None, i32] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #234 BINARY_MULTIPLY', 0) +f85 = getfield_gc_pure(p17, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +f86 = float_mul(f83, f85) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #235 BINARY_ADD', 0) +f87 = float_add(f72, f86) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #236 LOAD_FAST', 0) +guard_nonnull_class(p19, 19800744, descr=<Guard49>) [p1, p0, p19, p3, p5, p8, p9, p15, p16, p17, p18, p20, p21, p22, p23, p24, f87, None, None, None, None, None, None, None, None, None, f51, None, i32] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #239 BINARY_MULTIPLY', 0) +f89 = getfield_gc_pure(p19, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +f90 = float_mul(f87, f89) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #240 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #243 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #246 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #249 BINARY_MULTIPLY', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #250 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #253 BINARY_ADD', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #254 STORE_SUBSCR', 0) +setarrayitem_raw(i50, i44, f90, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #255 LOAD_FAST', 0) +guard_nonnull_class(p20, 19800744, descr=<Guard50>) [p1, p0, p20, p3, p5, p8, p9, p15, p16, p17, p18, p19, p21, p22, p23, p24, None, None, None, None, None, None, None, None, None, None, f51, None, i32] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #258 LOAD_GLOBAL', 0) +p92 = getfield_gc(p0, descr=<GcPtrFieldDescr pypy.interpreter.eval.Frame.inst_w_globals 8>) +guard_value(p92, ConstPtr(ptr93), descr=<Guard51>) [p1, p0, p92, p3, p5, p8, p9, p20, p15, p16, p17, p18, p19, p21, p22, p23, p24, None, None, None, None, None, None, None, None, None, None, f51, None, i32] +p94 = getfield_gc(p92, descr=<GcPtrFieldDescr pypy.objspace.std.dictmultiobject.W_DictMultiObject.inst_r_dict_content 8>) +guard_isnull(p94, descr=<Guard52>) [p1, p0, p94, p92, p3, p5, p8, p9, p20, p15, p16, p17, p18, p19, p21, p22, p23, p24, None, None, None, None, None, None, None, None, None, None, f51, None, i32] +p96 = getfield_gc(ConstPtr(ptr95), descr=<GcPtrFieldDescr pypy.objspace.std.celldict.ModuleCell.inst_w_value 8>) +guard_nonnull_class(p96, ConstClass(Function), descr=<Guard53>) [p1, p0, p96, p3, p5, p8, p9, p20, p15, p16, p17, p18, p19, p21, p22, p23, p24, None, None, None, None, None, None, None, None, None, None, f51, None, i32] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #261 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #264 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #267 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #270 BINARY_MULTIPLY', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #271 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #274 BINARY_ADD', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #275 BINARY_SUBSCR', 0) +f98 = getarrayitem_raw(i50, i44, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #276 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #279 BINARY_SUBTRACT', 0) +f99 = float_sub(f98, f51) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #280 CALL_FUNCTION', 0) +p100 = getfield_gc(p96, descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_code 24>) +guard_value(p100, ConstPtr(ptr101), descr=<Guard54>) [p1, p0, p100, p96, p3, p5, p8, p9, p20, p15, p16, p17, p18, p19, p21, p22, p23, p24, f99, None, None, None, None, None, None, None, None, None, None, f51, None, i32] +p102 = getfield_gc(p96, descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_w_func_globals 64>) +p103 = getfield_gc(p96, descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_closure 16>) +p105 = call(ConstClass(getexecutioncontext), descr=<GcPtrCallDescr>) +p106 = getfield_gc(p105, descr=<GcPtrFieldDescr pypy.interpreter.executioncontext.ExecutionContext.inst_topframeref 56>) +i107 = force_token() +p108 = getfield_gc(p105, descr=<GcPtrFieldDescr pypy.interpreter.executioncontext.ExecutionContext.inst_w_tracefunc 72>) +guard_isnull(p108, descr=<Guard55>) [p1, p0, p105, p108, p3, p5, p8, p9, p20, p96, p15, p16, p17, p18, p19, p21, p22, p23, p24, p106, p102, i107, f99, None, None, None, None, None, None, None, None, None, None, f51, None, i32] +i109 = getfield_gc(p105, descr=<NonGcPtrFieldDescr pypy.interpreter.executioncontext.ExecutionContext.inst_profilefunc 40>) +i110 = int_is_zero(i109) +guard_true(i110, descr=<Guard56>) [p1, p0, p105, p3, p5, p8, p9, p20, p96, p15, p16, p17, p18, p19, p21, p22, p23, p24, p106, p102, i107, f99, None, None, None, None, None, None, None, None, None, None, f51, None, i32] +debug_merge_point('<code object sqr, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 7> #0 LOAD_FAST', 1) +debug_merge_point('<code object sqr, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 7> #3 LOAD_FAST', 1) +debug_merge_point('<code object sqr, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 7> #6 BINARY_MULTIPLY', 1) +f111 = float_mul(f99, f99) +debug_merge_point('<code object sqr, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 7> #7 RETURN_VALUE', 1) +i112 = int_is_true(i109) +guard_false(i112, descr=<Guard57>) [p1, p0, p105, p3, p5, p8, p9, p20, p96, p15, p16, p17, p18, p19, p21, p22, p23, p24, f111, p106, p102, i107, f99, None, None, None, None, None, None, None, None, None, None, f51, None, i32] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #283 INPLACE_ADD', 0) +f113 = getfield_gc_pure(p20, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +f114 = float_add(f113, f111) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #284 STORE_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #287 JUMP_ABSOLUTE', 0) +i116 = getfield_raw(38968960, descr=<SignedFieldDescr pypysig_long_struct.c_value 0>) +i118 = int_sub(i116, 26) +setfield_raw(38968960, i118, descr=<SignedFieldDescr pypysig_long_struct.c_value 0>) +i120 = int_lt(i118, 0) +guard_false(i120, descr=<Guard58>) [p1, p0, p3, p5, p8, p9, p15, p16, p17, p18, p19, p21, p22, p23, p24, f114, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, f51, None, i32] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #125 FOR_ITER', 0) +jump(p0, p1, p3, p5, p8, p9, p15, p16, p17, p18, p19, f114, p21, p22, p23, p24, i32, f51, i36, i34, i33, i41, i42, i45, i50, i55, i63, f71, i43, f85, f89, descr=<Loop0>) +[5ed622ea316e] jit-log-opt-loop} +[5ed62326a846] {jit-log-opt-bridge +# bridge out of Guard 21 with 13 ops +[p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, f15, f16, i17] +i18 = force_token() +setfield_gc(p1, i18, descr=<SignedFieldDescr pypy.interpreter.pyframe.PyFrame.vable_token 24>) +call_may_force(ConstClass(action_dispatcher), p0, p1, descr=<VoidCallDescr>) +guard_not_forced(, descr=<Guard59>) [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, i17, f16, f15] +guard_no_exception(, descr=<Guard60>) [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, i17, f16, f15] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #125 FOR_ITER', 0) +p21 = new_with_vtable(19800744) +setfield_gc(p21, f15, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +p23 = new_with_vtable(ConstClass(W_IntObject)) +setfield_gc(p23, i17, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +p25 = new_with_vtable(19800744) +setfield_gc(p25, f16, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +jump(p1, p0, ConstPtr(ptr26), p2, 2, p3, 0, 125, p4, p5, ConstPtr(ptr30), ConstPtr(ptr31), ConstPtr(ptr32), ConstPtr(ptr33), ConstPtr(ptr34), p6, p7, p8, p9, p10, p21, p11, p12, p13, p14, p23, p25, descr=<Loop1>) +[5ed62327d096] jit-log-opt-bridge} +[5ed623eb929c] {jit-log-opt-bridge +# bridge out of Guard 3 with 260 ops +[p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, i15, f16, f17] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #290 POP_BLOCK', 0) +p18 = getfield_gc(p3, descr=<GcPtrFieldDescr pypy.interpreter.pyopcode.FrameBlock.inst_previous 16>) +guard_class(p3, 19865144, descr=<Guard61>) [p0, p1, p3, p18, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, i15, f16, f17] +i20 = getfield_gc(p3, descr=<SignedFieldDescr pypy.interpreter.pyopcode.FrameBlock.inst_valuestackdepth 24>) +guard_value(i20, 1, descr=<Guard62>) [p0, p1, i20, p18, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, i15, f16, f17] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #291 JUMP_ABSOLUTE', 0) +i23 = getfield_raw(38968960, descr=<SignedFieldDescr pypysig_long_struct.c_value 0>) +i25 = int_sub(i23, 1) +setfield_raw(38968960, i25, descr=<SignedFieldDescr pypysig_long_struct.c_value 0>) +i27 = int_lt(i25, 0) +guard_false(i27, descr=<Guard63>) [p0, p1, p18, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, i15, f16, f17] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #99 FOR_ITER', 0) +guard_class(p5, 19861240, descr=<Guard64>) [p0, p1, p5, p18, p4, p6, p7, p8, p9, p10, p11, p12, p13, p14, i15, f16, f17] +i29 = getfield_gc(p5, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_remaining 16>) +i31 = int_gt(i29, 0) +guard_true(i31, descr=<Guard65>) [p0, p1, p5, p18, p4, p6, p7, p8, p9, p10, p11, p12, p13, p14, i15, f16, f17] +i32 = getfield_gc(p5, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_current 8>) +i33 = getfield_gc(p5, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_step 24>) +i34 = int_add(i32, i33) +i36 = int_sub(i29, 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #102 STORE_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #105 SETUP_LOOP', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #108 LOAD_GLOBAL', 0) +p37 = getfield_gc(p1, descr=<GcPtrFieldDescr pypy.interpreter.eval.Frame.inst_w_globals 8>) +setfield_gc(p5, i34, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_current 8>) +setfield_gc(p5, i36, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_remaining 16>) +guard_value(p37, ConstPtr(ptr38), descr=<Guard66>) [p0, p1, p37, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, i32, p18, i15, f16, f17] +p39 = getfield_gc(p37, descr=<GcPtrFieldDescr pypy.objspace.std.dictmultiobject.W_DictMultiObject.inst_r_dict_content 8>) +guard_isnull(p39, descr=<Guard67>) [p0, p1, p39, p37, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, i32, p18, i15, f16, f17] +p41 = getfield_gc(ConstPtr(ptr40), descr=<GcPtrFieldDescr pypy.objspace.std.celldict.ModuleCell.inst_w_value 8>) +guard_isnull(p41, descr=<Guard68>) [p0, p1, p41, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, i32, p18, i15, f16, f17] +p43 = getfield_gc(ConstPtr(ptr42), descr=<GcPtrFieldDescr pypy.interpreter.module.Module.inst_w_dict 8>) +guard_value(p43, ConstPtr(ptr44), descr=<Guard69>) [p0, p1, p43, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, i32, p18, i15, f16, f17] +p45 = getfield_gc(p43, descr=<GcPtrFieldDescr pypy.objspace.std.dictmultiobject.W_DictMultiObject.inst_r_dict_content 8>) +guard_isnull(p45, descr=<Guard70>) [p0, p1, p45, p43, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, i32, p18, i15, f16, f17] +p47 = getfield_gc(ConstPtr(ptr46), descr=<GcPtrFieldDescr pypy.objspace.std.celldict.ModuleCell.inst_w_value 8>) +guard_value(p47, ConstPtr(ptr48), descr=<Guard71>) [p0, p1, p47, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, i32, p18, i15, f16, f17] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #111 LOAD_CONST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #114 LOAD_FAST', 0) +guard_nonnull_class(p12, ConstClass(W_IntObject), descr=<Guard72>) [p0, p1, p12, p4, p5, p47, p6, p7, p8, p9, p10, p11, p13, i32, p18, i15, f16, f17] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #117 LOAD_CONST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #120 BINARY_SUBTRACT', 0) +i50 = getfield_gc_pure(p12, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +i52 = int_sub_ovf(i50, 1) +guard_no_overflow(, descr=<Guard73>) [p0, p1, p12, i52, p4, p5, p47, p6, p7, p8, p9, p10, p11, p13, i32, p18, i15, f16, f17] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #121 CALL_FUNCTION', 0) +p54 = getfield_gc(ConstPtr(ptr53), descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_name 40>) +p55 = getfield_gc(ConstPtr(ptr53), descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_defs 32>) +i56 = getfield_gc_pure(p55, descr=<BoolFieldDescr pypy.interpreter.function.Defaults.inst_promote 16>) +guard_false(i56, descr=<Guard74>) [p0, p1, p54, p55, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, i52, i32, p18, i15, f16, f17] +p57 = getfield_gc_pure(p55, descr=<GcPtrFieldDescr pypy.interpreter.function.Defaults.inst_items 8>) +i58 = arraylen_gc(p57, descr=<GcPtrArrayDescr>) +i60 = int_sub(4, i58) +i62 = int_ge(3, i60) +guard_true(i62, descr=<Guard75>) [p0, p1, p54, i60, p55, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, i52, i32, p18, i15, f16, f17] +i63 = int_sub(3, i60) +i64 = getfield_gc_pure(p55, descr=<BoolFieldDescr pypy.interpreter.function.Defaults.inst_promote 16>) +guard_false(i64, descr=<Guard76>) [p0, p1, p54, i63, i60, p55, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, i52, i32, p18, i15, f16, f17] +p65 = getfield_gc_pure(p55, descr=<GcPtrFieldDescr pypy.interpreter.function.Defaults.inst_items 8>) +p66 = getarrayitem_gc(p65, i63, descr=<GcPtrArrayDescr>) +guard_class(p66, ConstClass(W_IntObject), descr=<Guard77>) [p0, p1, p66, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, i52, i32, p18, i15, f16, f17] +i68 = getfield_gc_pure(p66, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +i69 = int_is_zero(i68) +guard_false(i69, descr=<Guard78>) [p0, p1, i68, i52, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p66, None, i32, p18, i15, f16, f17] +i72 = int_lt(i68, 0) +guard_false(i72, descr=<Guard79>) [p0, p1, i68, i52, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p66, None, i32, p18, i15, f16, f17] +i74 = int_lt(1, i52) +guard_true(i74, descr=<Guard80>) [p0, p1, i68, i52, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p66, None, i32, p18, i15, f16, f17] +i75 = int_sub(i52, 1) +i77 = int_sub(i75, 1) +i78 = uint_floordiv(i77, i68) +i80 = int_add(i78, 1) +i82 = int_lt(i80, 0) +guard_false(i82, descr=<Guard81>) [p0, p1, i68, i80, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p66, i52, i32, p18, i15, f16, f17] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #124 GET_ITER', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #125 FOR_ITER', 0) +i84 = int_gt(i80, 0) +guard_true(i84, descr=<Guard82>) [p0, p1, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, i80, i68, None, None, i32, p18, i15, f16, f17] +i85 = int_add(1, i68) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #128 STORE_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #131 LOAD_FAST', 0) +guard_nonnull_class(p13, 19886912, descr=<Guard83>) [p0, p1, p13, p4, p5, p6, p7, p8, p9, p10, p11, p12, i78, i85, None, i68, None, None, i32, p18, None, f16, f17] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #134 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #137 LOAD_FAST', 0) +guard_nonnull_class(p11, ConstClass(W_IntObject), descr=<Guard84>) [p0, p1, p11, p4, p5, p13, p6, p7, p8, p9, p10, p12, i78, i85, None, i68, None, None, i32, p18, None, f16, f17] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #140 BINARY_MULTIPLY', 0) +i88 = getfield_gc_pure(p11, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +i89 = int_mul_ovf(i32, i88) +guard_no_overflow(, descr=<Guard85>) [p0, p1, p11, i89, p4, p5, p13, p6, p7, p8, p9, p10, p12, i78, i85, None, i68, None, None, i32, p18, None, f16, f17] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #141 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #144 BINARY_ADD', 0) +i90 = int_add_ovf(i89, 1) +guard_no_overflow(, descr=<Guard86>) [p0, p1, i90, p4, p5, p13, p6, p7, p8, p9, p10, p11, p12, i89, i78, i85, None, i68, None, None, i32, p18, None, f16, f17] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #145 BINARY_SUBSCR', 0) +i91 = getfield_gc(p13, descr=<SignedFieldDescr pypy.module.array.interp_array.W_ArrayTyped.inst_len 32>) +i93 = int_lt(i90, 0) +guard_false(i93, descr=<Guard87>) [p0, p1, p13, i90, i91, p4, p5, p6, p7, p8, p9, p10, p11, p12, None, i78, i85, None, i68, None, None, i32, p18, None, f16, f17] +i94 = int_lt(i90, i91) +guard_true(i94, descr=<Guard88>) [p0, p1, p13, i90, p4, p5, p6, p7, p8, p9, p10, p11, p12, None, i78, i85, None, i68, None, None, i32, p18, None, f16, f17] +i95 = getfield_gc(p13, descr=<NonGcPtrFieldDescr pypy.module.array.interp_array.W_ArrayTyped.inst_buffer 24>) +f96 = getarrayitem_raw(i95, i90, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #146 STORE_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #149 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #152 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #155 LOAD_CONST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #158 BINARY_SUBTRACT', 0) +i98 = int_sub_ovf(i32, 1) +guard_no_overflow(, descr=<Guard89>) [p0, p1, i98, p4, p5, p13, p6, p7, p8, p9, p10, p11, p12, f96, None, i78, i85, None, i68, None, None, i32, p18, None, None, f17] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #159 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #162 BINARY_MULTIPLY', 0) +i99 = int_mul_ovf(i98, i88) +guard_no_overflow(, descr=<Guard90>) [p0, p1, p11, i99, p4, p5, p13, p6, p7, p8, p9, p10, p12, i98, f96, None, i78, i85, None, i68, None, None, i32, p18, None, None, f17] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #163 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #166 BINARY_ADD', 0) +i100 = int_add_ovf(i99, 1) +guard_no_overflow(, descr=<Guard91>) [p0, p1, i100, p4, p5, p13, p6, p7, p8, p9, p10, p11, p12, i99, None, f96, None, i78, i85, None, i68, None, None, i32, p18, None, None, f17] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #167 BINARY_SUBSCR', 0) +i102 = int_lt(i100, 0) +guard_false(i102, descr=<Guard92>) [p0, p1, p13, i100, i91, p4, p5, p6, p7, p8, p9, p10, p11, p12, None, None, f96, None, i78, i85, None, i68, None, None, i32, p18, None, None, f17] +i103 = int_lt(i100, i91) +guard_true(i103, descr=<Guard93>) [p0, p1, p13, i100, p4, p5, p6, p7, p8, p9, p10, p11, p12, None, None, f96, None, i78, i85, None, i68, None, None, i32, p18, None, None, f17] +f104 = getarrayitem_raw(i95, i100, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #168 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #171 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #174 LOAD_CONST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #177 BINARY_ADD', 0) +i106 = int_add_ovf(i32, 1) +guard_no_overflow(, descr=<Guard94>) [p0, p1, i106, p4, p5, p13, p6, p7, p8, p9, p10, p11, p12, f104, None, None, f96, None, i78, i85, None, i68, None, None, i32, p18, None, None, f17] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #178 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #181 BINARY_MULTIPLY', 0) +i107 = int_mul_ovf(i106, i88) +guard_no_overflow(, descr=<Guard95>) [p0, p1, p11, i107, p4, p5, p13, p6, p7, p8, p9, p10, p12, i106, f104, None, None, f96, None, i78, i85, None, i68, None, None, i32, p18, None, None, f17] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #182 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #185 BINARY_ADD', 0) +i108 = int_add_ovf(i107, 1) +guard_no_overflow(, descr=<Guard96>) [p0, p1, i108, p4, p5, p13, p6, p7, p8, p9, p10, p11, p12, i107, None, f104, None, None, f96, None, i78, i85, None, i68, None, None, i32, p18, None, None, f17] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #186 BINARY_SUBSCR', 0) +i110 = int_lt(i108, 0) +guard_false(i110, descr=<Guard97>) [p0, p1, p13, i108, i91, p4, p5, p6, p7, p8, p9, p10, p11, p12, None, None, f104, None, None, f96, None, i78, i85, None, i68, None, None, i32, p18, None, None, f17] +i111 = int_lt(i108, i91) +guard_true(i111, descr=<Guard98>) [p0, p1, p13, i108, p4, p5, p6, p7, p8, p9, p10, p11, p12, None, None, f104, None, None, f96, None, i78, i85, None, i68, None, None, i32, p18, None, None, f17] +f112 = getarrayitem_raw(i95, i108, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #187 BINARY_ADD', 0) +f113 = float_add(f104, f112) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #188 LOAD_FAST', 0) +guard_nonnull_class(p9, 19800744, descr=<Guard99>) [p0, p1, p9, p4, p5, p6, p7, p8, p10, p11, p12, p13, f113, None, None, None, None, None, f96, None, i78, i85, None, i68, None, None, i32, p18, None, None, f17] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #191 BINARY_MULTIPLY', 0) +f115 = getfield_gc_pure(p9, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +f116 = float_mul(f113, f115) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #192 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #195 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #198 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #201 BINARY_MULTIPLY', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #202 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #205 BINARY_ADD', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #206 LOAD_CONST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #209 BINARY_SUBTRACT', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #210 BINARY_SUBSCR', 0) +i118 = int_lt(i89, 0) +guard_false(i118, descr=<Guard100>) [p0, p1, p13, i89, i91, p4, p5, p6, p7, p8, p9, p10, p11, p12, f116, None, None, None, None, None, None, f96, None, i78, i85, None, i68, None, None, i32, p18, None, None, f17] +i119 = int_lt(i89, i91) +guard_true(i119, descr=<Guard101>) [p0, p1, p13, i89, p4, p5, p6, p7, p8, p9, p10, p11, p12, f116, None, None, None, None, None, None, f96, None, i78, i85, None, i68, None, None, i32, p18, None, None, f17] +f120 = getarrayitem_raw(i95, i89, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #211 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #214 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #217 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #220 BINARY_MULTIPLY', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #221 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #224 BINARY_ADD', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #225 LOAD_CONST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #228 BINARY_ADD', 0) +i122 = int_add(i90, 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #229 BINARY_SUBSCR', 0) +i123 = int_lt(i122, i91) +guard_true(i123, descr=<Guard102>) [p0, p1, p13, i122, p4, p5, p6, p7, p8, p9, p10, p11, p12, f120, f116, None, None, None, None, None, None, f96, None, i78, i85, None, i68, None, None, i32, p18, None, None, f17] +f124 = getarrayitem_raw(i95, i122, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #230 BINARY_ADD', 0) +f125 = float_add(f120, f124) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #231 LOAD_FAST', 0) +guard_nonnull_class(p8, 19800744, descr=<Guard103>) [p0, p1, p8, p4, p5, p6, p7, p9, p10, p11, p12, p13, f125, None, f116, None, None, None, None, None, None, f96, None, i78, i85, None, i68, None, None, i32, p18, None, None, f17] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #234 BINARY_MULTIPLY', 0) +f127 = getfield_gc_pure(p8, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +f128 = float_mul(f125, f127) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #235 BINARY_ADD', 0) +f129 = float_add(f116, f128) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #236 LOAD_FAST', 0) +guard_nonnull_class(p10, 19800744, descr=<Guard104>) [p0, p1, p10, p4, p5, p6, p7, p8, p9, p11, p12, p13, f129, None, None, None, None, None, None, None, None, None, f96, None, i78, i85, None, i68, None, None, i32, p18, None, None, f17] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #239 BINARY_MULTIPLY', 0) +f131 = getfield_gc_pure(p10, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +f132 = float_mul(f129, f131) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #240 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #243 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #246 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #249 BINARY_MULTIPLY', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #250 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #253 BINARY_ADD', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #254 STORE_SUBSCR', 0) +setarrayitem_raw(i95, i90, f132, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #255 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #258 LOAD_GLOBAL', 0) +p134 = getfield_gc(ConstPtr(ptr133), descr=<GcPtrFieldDescr pypy.objspace.std.celldict.ModuleCell.inst_w_value 8>) +guard_nonnull_class(p134, ConstClass(Function), descr=<Guard105>) [p0, p1, p134, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, None, None, None, None, None, None, None, None, None, None, f96, None, i78, i85, None, i68, None, None, i32, p18, None, None, f17] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #261 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #264 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #267 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #270 BINARY_MULTIPLY', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #271 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #274 BINARY_ADD', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #275 BINARY_SUBSCR', 0) +f136 = getarrayitem_raw(i95, i90, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #276 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #279 BINARY_SUBTRACT', 0) +f137 = float_sub(f136, f96) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #280 CALL_FUNCTION', 0) +p138 = getfield_gc(p134, descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_code 24>) +guard_value(p138, ConstPtr(ptr139), descr=<Guard106>) [p0, p1, p138, p134, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, f137, None, None, None, None, None, None, None, None, None, None, f96, None, i78, i85, None, i68, None, None, i32, p18, None, None, f17] +p140 = getfield_gc(p134, descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_w_func_globals 64>) +p141 = getfield_gc(p134, descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_closure 16>) +p143 = call(ConstClass(getexecutioncontext), descr=<GcPtrCallDescr>) +p144 = getfield_gc(p143, descr=<GcPtrFieldDescr pypy.interpreter.executioncontext.ExecutionContext.inst_topframeref 56>) +i145 = force_token() +p146 = getfield_gc(p143, descr=<GcPtrFieldDescr pypy.interpreter.executioncontext.ExecutionContext.inst_w_tracefunc 72>) +guard_isnull(p146, descr=<Guard107>) [p0, p1, p143, p146, p4, p5, p134, p6, p7, p8, p9, p10, p11, p12, p13, p144, i145, p140, f137, None, None, None, None, None, None, None, None, None, None, f96, None, i78, i85, None, i68, None, None, i32, p18, None, None, f17] +i147 = getfield_gc(p143, descr=<NonGcPtrFieldDescr pypy.interpreter.executioncontext.ExecutionContext.inst_profilefunc 40>) +i148 = int_is_zero(i147) +guard_true(i148, descr=<Guard108>) [p0, p1, p143, p4, p5, p134, p6, p7, p8, p9, p10, p11, p12, p13, p144, i145, p140, f137, None, None, None, None, None, None, None, None, None, None, f96, None, i78, i85, None, i68, None, None, i32, p18, None, None, f17] +debug_merge_point('<code object sqr, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 7> #0 LOAD_FAST', 1) +debug_merge_point('<code object sqr, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 7> #3 LOAD_FAST', 1) +debug_merge_point('<code object sqr, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 7> #6 BINARY_MULTIPLY', 1) +f149 = float_mul(f137, f137) +debug_merge_point('<code object sqr, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 7> #7 RETURN_VALUE', 1) +i150 = int_is_true(i147) +guard_false(i150, descr=<Guard109>) [p0, p1, p143, p4, p5, p134, p6, p7, p8, p9, p10, p11, p12, p13, f149, p144, i145, p140, f137, None, None, None, None, None, None, None, None, None, None, f96, None, i78, i85, None, i68, None, None, i32, p18, None, None, f17] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #283 INPLACE_ADD', 0) +f151 = float_add(f17, f149) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #284 STORE_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #287 JUMP_ABSOLUTE', 0) +i153 = getfield_raw(38968960, descr=<SignedFieldDescr pypysig_long_struct.c_value 0>) +i155 = int_sub(i153, 35) +setfield_raw(38968960, i155, descr=<SignedFieldDescr pypysig_long_struct.c_value 0>) +i157 = int_lt(i155, 0) +guard_false(i157, descr=<Guard110>) [p0, p1, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, f151, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, f96, None, i78, i85, None, i68, None, None, i32, p18, None, None, None] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #125 FOR_ITER', 0) +p159 = new_with_vtable(19865144) +setfield_gc(p159, 291, descr=<UnsignedFieldDescr pypy.interpreter.pyopcode.FrameBlock.inst_handlerposition 8>) +setfield_gc(p159, 1, descr=<SignedFieldDescr pypy.interpreter.pyopcode.FrameBlock.inst_valuestackdepth 24>) +setfield_gc(p159, p18, descr=<GcPtrFieldDescr pypy.interpreter.pyopcode.FrameBlock.inst_previous 16>) +p163 = new_with_vtable(19861240) +setfield_gc(p163, i85, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_current 8>) +setfield_gc(p163, i78, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_remaining 16>) +setfield_gc(p163, i68, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_step 24>) +p165 = new_with_vtable(19800744) +setfield_gc(p165, f151, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +p167 = new_with_vtable(ConstClass(W_IntObject)) +setfield_gc(p167, i32, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +p169 = new_with_vtable(ConstClass(W_IntObject)) +setfield_gc(p169, 1, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +p171 = new_with_vtable(19800744) +setfield_gc(p171, f96, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +jump(p1, p0, ConstPtr(ptr172), p159, 2, p4, 0, 125, p5, p163, ConstPtr(ptr176), ConstPtr(ptr177), ConstPtr(ptr178), ConstPtr(ptr179), ConstPtr(ptr180), p6, p7, p8, p9, p10, p165, p11, p12, p13, p167, p169, p171, descr=<Loop1>) +[5ed623fc609b] jit-log-opt-bridge} +[5ed63ea5fa94] {jit-log-opt-bridge +# bridge out of Guard 110 with 23 ops +[p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, f12, f13, i14, i15, i16, i17, p18] +i19 = force_token() +setfield_gc(p1, i19, descr=<SignedFieldDescr pypy.interpreter.pyframe.PyFrame.vable_token 24>) +call_may_force(ConstClass(action_dispatcher), p0, p1, descr=<VoidCallDescr>) +guard_not_forced(, descr=<Guard111>) [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, i14, i17, i16, i15, f12, f13, p18] +guard_no_exception(, descr=<Guard112>) [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, i14, i17, i16, i15, f12, f13, p18] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #125 FOR_ITER', 0) +p22 = new_with_vtable(19865144) +setfield_gc(p22, 291, descr=<UnsignedFieldDescr pypy.interpreter.pyopcode.FrameBlock.inst_handlerposition 8>) +setfield_gc(p22, p18, descr=<GcPtrFieldDescr pypy.interpreter.pyopcode.FrameBlock.inst_previous 16>) +setfield_gc(p22, 1, descr=<SignedFieldDescr pypy.interpreter.pyopcode.FrameBlock.inst_valuestackdepth 24>) +p26 = new_with_vtable(19861240) +setfield_gc(p26, i15, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_current 8>) +setfield_gc(p26, i14, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_remaining 16>) +setfield_gc(p26, i16, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_step 24>) +p28 = new_with_vtable(19800744) +setfield_gc(p28, f12, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +p30 = new_with_vtable(ConstClass(W_IntObject)) +setfield_gc(p30, i17, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +p32 = new_with_vtable(ConstClass(W_IntObject)) +setfield_gc(p32, 1, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +p35 = new_with_vtable(19800744) +setfield_gc(p35, f13, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +jump(p1, p0, ConstPtr(ptr36), p22, 2, p2, 0, 125, p3, p26, ConstPtr(ptr40), ConstPtr(ptr41), ConstPtr(ptr42), ConstPtr(ptr43), ConstPtr(ptr44), p4, p5, p6, p7, p8, p28, p9, p10, p11, p30, p32, p35, descr=<Loop1>) +[5ed63ea8ea04] jit-log-opt-bridge} +[5ed640a0a34c] {jit-log-opt-bridge +# bridge out of Guard 58 with 13 ops +[p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, f15, f16, i17] +i18 = force_token() +setfield_gc(p1, i18, descr=<SignedFieldDescr pypy.interpreter.pyframe.PyFrame.vable_token 24>) +call_may_force(ConstClass(action_dispatcher), p0, p1, descr=<VoidCallDescr>) +guard_not_forced(, descr=<Guard113>) [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, f15, f16, i17] +guard_no_exception(, descr=<Guard114>) [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, f15, f16, i17] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #125 FOR_ITER', 0) +p21 = new_with_vtable(19800744) +setfield_gc(p21, f15, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +p23 = new_with_vtable(ConstClass(W_IntObject)) +setfield_gc(p23, i17, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +p25 = new_with_vtable(19800744) +setfield_gc(p25, f16, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +jump(p1, p0, ConstPtr(ptr26), p2, 2, p3, 0, 125, p4, p5, ConstPtr(ptr30), ConstPtr(ptr31), ConstPtr(ptr32), ConstPtr(ptr33), ConstPtr(ptr34), p6, p7, p8, p9, p10, p21, p11, p12, p13, p14, p23, p25, descr=<Loop1>) +[5ed640a1e8c2] jit-log-opt-bridge} +[5ed6431fc824] {jit-log-opt-bridge +# bridge out of Guard 24 with 264 ops +[p0, p1, p2, p3, p4, p5, i6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24] +guard_value(i6, 0, descr=<Guard115>) [i6, p0, p1, p3, p4, p5, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #290 POP_BLOCK', 0) +p26 = getfield_gc(p4, descr=<GcPtrFieldDescr pypy.interpreter.pyopcode.FrameBlock.inst_previous 16>) +guard_class(p4, 19865144, descr=<Guard116>) [p0, p1, p4, p3, p26, p5, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24] +i28 = getfield_gc(p4, descr=<SignedFieldDescr pypy.interpreter.pyopcode.FrameBlock.inst_valuestackdepth 24>) +guard_value(i28, 1, descr=<Guard117>) [p0, p1, i28, p3, p26, p5, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #291 JUMP_ABSOLUTE', 0) +i31 = getfield_raw(38968960, descr=<SignedFieldDescr pypysig_long_struct.c_value 0>) +i33 = int_sub(i31, 1) +setfield_raw(38968960, i33, descr=<SignedFieldDescr pypysig_long_struct.c_value 0>) +i35 = int_lt(i33, 0) +guard_false(i35, descr=<Guard118>) [p0, p1, p3, p26, p5, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24] +guard_value(p3, ConstPtr(ptr36), descr=<Guard119>) [p0, p1, p3, p26, p5, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #99 FOR_ITER', 0) +guard_class(p7, 19861240, descr=<Guard120>) [p0, p1, p7, p26, p5, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24] +i38 = getfield_gc(p7, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_remaining 16>) +i40 = int_gt(i38, 0) +guard_true(i40, descr=<Guard121>) [p0, p1, p7, p26, p5, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24] +i41 = getfield_gc(p7, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_current 8>) +i42 = getfield_gc(p7, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_step 24>) +i43 = int_add(i41, i42) +i45 = int_sub(i38, 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #102 STORE_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #105 SETUP_LOOP', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #108 LOAD_GLOBAL', 0) +p46 = getfield_gc(p1, descr=<GcPtrFieldDescr pypy.interpreter.eval.Frame.inst_w_globals 8>) +setfield_gc(p7, i43, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_current 8>) +setfield_gc(p7, i45, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_remaining 16>) +guard_value(p46, ConstPtr(ptr47), descr=<Guard122>) [p0, p1, p46, p5, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p23, p24, p26, i41] +p48 = getfield_gc(p46, descr=<GcPtrFieldDescr pypy.objspace.std.dictmultiobject.W_DictMultiObject.inst_r_dict_content 8>) +guard_isnull(p48, descr=<Guard123>) [p0, p1, p48, p46, p5, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p23, p24, p26, i41] +p50 = getfield_gc(ConstPtr(ptr49), descr=<GcPtrFieldDescr pypy.objspace.std.celldict.ModuleCell.inst_w_value 8>) +guard_isnull(p50, descr=<Guard124>) [p0, p1, p50, p5, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p23, p24, p26, i41] +p52 = getfield_gc(ConstPtr(ptr51), descr=<GcPtrFieldDescr pypy.interpreter.module.Module.inst_w_dict 8>) +guard_value(p52, ConstPtr(ptr53), descr=<Guard125>) [p0, p1, p52, p5, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p23, p24, p26, i41] +p54 = getfield_gc(p52, descr=<GcPtrFieldDescr pypy.objspace.std.dictmultiobject.W_DictMultiObject.inst_r_dict_content 8>) +guard_isnull(p54, descr=<Guard126>) [p0, p1, p54, p52, p5, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p23, p24, p26, i41] +p56 = getfield_gc(ConstPtr(ptr55), descr=<GcPtrFieldDescr pypy.objspace.std.celldict.ModuleCell.inst_w_value 8>) +guard_value(p56, ConstPtr(ptr57), descr=<Guard127>) [p0, p1, p56, p5, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p23, p24, p26, i41] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #111 LOAD_CONST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #114 LOAD_FAST', 0) +guard_nonnull_class(p20, ConstClass(W_IntObject), descr=<Guard128>) [p0, p1, p20, p5, p7, p56, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p21, p23, p24, p26, i41] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #117 LOAD_CONST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #120 BINARY_SUBTRACT', 0) +i59 = getfield_gc_pure(p20, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +i61 = int_sub_ovf(i59, 1) +guard_no_overflow(, descr=<Guard129>) [p0, p1, p20, i61, p5, p7, p56, p11, p12, p13, p14, p15, p16, p17, p18, p19, p21, p23, p24, p26, i41] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #121 CALL_FUNCTION', 0) +p63 = getfield_gc(ConstPtr(ptr62), descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_name 40>) +p64 = getfield_gc(ConstPtr(ptr62), descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_defs 32>) +i65 = getfield_gc_pure(p64, descr=<BoolFieldDescr pypy.interpreter.function.Defaults.inst_promote 16>) +guard_false(i65, descr=<Guard130>) [p0, p1, p63, p64, p5, p7, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p23, p24, i61, p26, i41] +p66 = getfield_gc_pure(p64, descr=<GcPtrFieldDescr pypy.interpreter.function.Defaults.inst_items 8>) +i67 = arraylen_gc(p66, descr=<GcPtrArrayDescr>) +i69 = int_sub(4, i67) +i71 = int_ge(3, i69) +guard_true(i71, descr=<Guard131>) [p0, p1, p63, i69, p64, p5, p7, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p23, p24, i61, p26, i41] +i72 = int_sub(3, i69) +i73 = getfield_gc_pure(p64, descr=<BoolFieldDescr pypy.interpreter.function.Defaults.inst_promote 16>) +guard_false(i73, descr=<Guard132>) [p0, p1, p63, i72, i69, p64, p5, p7, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p23, p24, i61, p26, i41] +p74 = getfield_gc_pure(p64, descr=<GcPtrFieldDescr pypy.interpreter.function.Defaults.inst_items 8>) +p75 = getarrayitem_gc(p74, i72, descr=<GcPtrArrayDescr>) +guard_class(p75, ConstClass(W_IntObject), descr=<Guard133>) [p0, p1, p75, p5, p7, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p23, p24, i61, p26, i41] +i77 = getfield_gc_pure(p75, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +i78 = int_is_zero(i77) +guard_false(i78, descr=<Guard134>) [p0, p1, i77, i61, p5, p7, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p23, p24, p75, None, p26, i41] +i81 = int_lt(i77, 0) +guard_false(i81, descr=<Guard135>) [p0, p1, i77, i61, p5, p7, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p23, p24, p75, None, p26, i41] +i83 = int_lt(1, i61) +guard_true(i83, descr=<Guard136>) [p0, p1, i77, i61, p5, p7, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p23, p24, p75, None, p26, i41] +i84 = int_sub(i61, 1) +i86 = int_sub(i84, 1) +i87 = uint_floordiv(i86, i77) +i89 = int_add(i87, 1) +i91 = int_lt(i89, 0) +guard_false(i91, descr=<Guard137>) [p0, p1, i77, i89, p5, p7, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p23, p24, p75, i61, p26, i41] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #124 GET_ITER', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #125 FOR_ITER', 0) +i93 = int_gt(i89, 0) +guard_true(i93, descr=<Guard138>) [p0, p1, p5, p7, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p23, p24, i89, i77, None, None, p26, i41] +i94 = int_add(1, i77) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #128 STORE_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #131 LOAD_FAST', 0) +guard_nonnull_class(p21, 19886912, descr=<Guard139>) [p0, p1, p21, p5, p7, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p24, i87, i94, None, i77, None, None, p26, i41] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #134 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #137 LOAD_FAST', 0) +guard_nonnull_class(p19, ConstClass(W_IntObject), descr=<Guard140>) [p0, p1, p19, p5, p7, p21, p11, p12, p13, p14, p15, p16, p17, p18, p20, p24, i87, i94, None, i77, None, None, p26, i41] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #140 BINARY_MULTIPLY', 0) +i97 = getfield_gc_pure(p19, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +i98 = int_mul_ovf(i41, i97) +guard_no_overflow(, descr=<Guard141>) [p0, p1, p19, i98, p5, p7, p21, p11, p12, p13, p14, p15, p16, p17, p18, p20, p24, i87, i94, None, i77, None, None, p26, i41] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #141 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #144 BINARY_ADD', 0) +i99 = int_add_ovf(i98, 1) +guard_no_overflow(, descr=<Guard142>) [p0, p1, i99, p5, p7, p21, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p24, i98, i87, i94, None, i77, None, None, p26, i41] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #145 BINARY_SUBSCR', 0) +i100 = getfield_gc(p21, descr=<SignedFieldDescr pypy.module.array.interp_array.W_ArrayTyped.inst_len 32>) +i102 = int_lt(i99, 0) +guard_false(i102, descr=<Guard143>) [p0, p1, p21, i99, i100, p5, p7, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p24, None, i87, i94, None, i77, None, None, p26, i41] +i103 = int_lt(i99, i100) +guard_true(i103, descr=<Guard144>) [p0, p1, p21, i99, p5, p7, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p24, None, i87, i94, None, i77, None, None, p26, i41] +i104 = getfield_gc(p21, descr=<NonGcPtrFieldDescr pypy.module.array.interp_array.W_ArrayTyped.inst_buffer 24>) +f105 = getarrayitem_raw(i104, i99, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #146 STORE_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #149 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #152 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #155 LOAD_CONST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #158 BINARY_SUBTRACT', 0) +i107 = int_sub_ovf(i41, 1) +guard_no_overflow(, descr=<Guard145>) [p0, p1, i107, p5, p7, p21, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, f105, None, i87, i94, None, i77, None, None, p26, i41] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #159 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #162 BINARY_MULTIPLY', 0) +i108 = int_mul_ovf(i107, i97) +guard_no_overflow(, descr=<Guard146>) [p0, p1, p19, i108, p5, p7, p21, p11, p12, p13, p14, p15, p16, p17, p18, p20, i107, f105, None, i87, i94, None, i77, None, None, p26, i41] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #163 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #166 BINARY_ADD', 0) +i109 = int_add_ovf(i108, 1) +guard_no_overflow(, descr=<Guard147>) [p0, p1, i109, p5, p7, p21, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, i108, None, f105, None, i87, i94, None, i77, None, None, p26, i41] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #167 BINARY_SUBSCR', 0) +i111 = int_lt(i109, 0) +guard_false(i111, descr=<Guard148>) [p0, p1, p21, i109, i100, p5, p7, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, None, None, f105, None, i87, i94, None, i77, None, None, p26, i41] +i112 = int_lt(i109, i100) +guard_true(i112, descr=<Guard149>) [p0, p1, p21, i109, p5, p7, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, None, None, f105, None, i87, i94, None, i77, None, None, p26, i41] +f113 = getarrayitem_raw(i104, i109, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #168 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #171 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #174 LOAD_CONST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #177 BINARY_ADD', 0) +i115 = int_add_ovf(i41, 1) +guard_no_overflow(, descr=<Guard150>) [p0, p1, i115, p5, p7, p21, p12, p13, p14, p15, p16, p17, p18, p19, p20, f113, None, None, f105, None, i87, i94, None, i77, None, None, p26, i41] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #178 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #181 BINARY_MULTIPLY', 0) +i116 = int_mul_ovf(i115, i97) +guard_no_overflow(, descr=<Guard151>) [p0, p1, p19, i116, p5, p7, p21, p12, p13, p14, p15, p16, p17, p18, p20, i115, f113, None, None, f105, None, i87, i94, None, i77, None, None, p26, i41] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #182 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #185 BINARY_ADD', 0) +i117 = int_add_ovf(i116, 1) +guard_no_overflow(, descr=<Guard152>) [p0, p1, i117, p5, p7, p21, p12, p13, p14, p15, p16, p17, p18, p19, p20, i116, None, f113, None, None, f105, None, i87, i94, None, i77, None, None, p26, i41] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #186 BINARY_SUBSCR', 0) +i119 = int_lt(i117, 0) +guard_false(i119, descr=<Guard153>) [p0, p1, p21, i117, i100, p5, p7, p12, p13, p14, p15, p16, p17, p18, p19, p20, None, None, f113, None, None, f105, None, i87, i94, None, i77, None, None, p26, i41] +i120 = int_lt(i117, i100) +guard_true(i120, descr=<Guard154>) [p0, p1, p21, i117, p5, p7, p12, p13, p14, p15, p16, p17, p18, p19, p20, None, None, f113, None, None, f105, None, i87, i94, None, i77, None, None, p26, i41] +f121 = getarrayitem_raw(i104, i117, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #187 BINARY_ADD', 0) +f122 = float_add(f113, f121) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #188 LOAD_FAST', 0) +guard_nonnull_class(p16, 19800744, descr=<Guard155>) [p0, p1, p16, p5, p7, p12, p13, p14, p15, p17, p18, p19, p20, p21, f122, None, None, None, None, None, f105, None, i87, i94, None, i77, None, None, p26, i41] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #191 BINARY_MULTIPLY', 0) +f124 = getfield_gc_pure(p16, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +f125 = float_mul(f122, f124) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #192 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #195 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #198 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #201 BINARY_MULTIPLY', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #202 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #205 BINARY_ADD', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #206 LOAD_CONST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #209 BINARY_SUBTRACT', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #210 BINARY_SUBSCR', 0) +i127 = int_lt(i98, 0) +guard_false(i127, descr=<Guard156>) [p0, p1, p21, i98, i100, p5, p7, p12, p13, p14, p15, p16, p17, p18, p19, p20, f125, None, None, None, None, None, None, f105, None, i87, i94, None, i77, None, None, p26, i41] +i128 = int_lt(i98, i100) +guard_true(i128, descr=<Guard157>) [p0, p1, p21, i98, p5, p7, p12, p13, p14, p15, p16, p17, p18, p19, p20, f125, None, None, None, None, None, None, f105, None, i87, i94, None, i77, None, None, p26, i41] +f129 = getarrayitem_raw(i104, i98, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #211 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #214 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #217 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #220 BINARY_MULTIPLY', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #221 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #224 BINARY_ADD', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #225 LOAD_CONST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #228 BINARY_ADD', 0) +i131 = int_add(i99, 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #229 BINARY_SUBSCR', 0) +i132 = int_lt(i131, i100) +guard_true(i132, descr=<Guard158>) [p0, p1, p21, i131, p5, p7, p13, p14, p15, p16, p17, p18, p19, p20, f129, f125, None, None, None, None, None, None, f105, None, i87, i94, None, i77, None, None, p26, i41] +f133 = getarrayitem_raw(i104, i131, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #230 BINARY_ADD', 0) +f134 = float_add(f129, f133) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #231 LOAD_FAST', 0) +guard_nonnull_class(p15, 19800744, descr=<Guard159>) [p0, p1, p15, p5, p7, p13, p14, p16, p17, p18, p19, p20, p21, f134, None, f125, None, None, None, None, None, None, f105, None, i87, i94, None, i77, None, None, p26, i41] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #234 BINARY_MULTIPLY', 0) +f136 = getfield_gc_pure(p15, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +f137 = float_mul(f134, f136) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #235 BINARY_ADD', 0) +f138 = float_add(f125, f137) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #236 LOAD_FAST', 0) +guard_nonnull_class(p17, 19800744, descr=<Guard160>) [p0, p1, p17, p5, p7, p13, p14, p15, p16, p18, p19, p20, p21, f138, None, None, None, None, None, None, None, None, None, f105, None, i87, i94, None, i77, None, None, p26, i41] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #239 BINARY_MULTIPLY', 0) +f140 = getfield_gc_pure(p17, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +f141 = float_mul(f138, f140) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #240 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #243 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #246 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #249 BINARY_MULTIPLY', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #250 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #253 BINARY_ADD', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #254 STORE_SUBSCR', 0) +setarrayitem_raw(i104, i99, f141, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #255 LOAD_FAST', 0) +guard_nonnull_class(p18, 19800744, descr=<Guard161>) [p0, p1, p18, p5, p7, p13, p14, p15, p16, p17, p19, p20, p21, None, None, None, None, None, None, None, None, None, None, f105, None, i87, i94, None, i77, None, None, p26, i41] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #258 LOAD_GLOBAL', 0) +p144 = getfield_gc(ConstPtr(ptr143), descr=<GcPtrFieldDescr pypy.objspace.std.celldict.ModuleCell.inst_w_value 8>) +guard_nonnull_class(p144, ConstClass(Function), descr=<Guard162>) [p0, p1, p144, p5, p7, p18, p13, p14, p15, p16, p17, p19, p20, p21, None, None, None, None, None, None, None, None, None, None, f105, None, i87, i94, None, i77, None, None, p26, i41] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #261 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #264 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #267 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #270 BINARY_MULTIPLY', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #271 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #274 BINARY_ADD', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #275 BINARY_SUBSCR', 0) +f146 = getarrayitem_raw(i104, i99, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #276 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #279 BINARY_SUBTRACT', 0) +f147 = float_sub(f146, f105) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #280 CALL_FUNCTION', 0) +p148 = getfield_gc(p144, descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_code 24>) +guard_value(p148, ConstPtr(ptr149), descr=<Guard163>) [p0, p1, p148, p144, p5, p7, p18, p13, p14, p15, p16, p17, p19, p20, p21, f147, None, None, None, None, None, None, None, None, None, None, f105, None, i87, i94, None, i77, None, None, p26, i41] +p150 = getfield_gc(p144, descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_w_func_globals 64>) +p151 = getfield_gc(p144, descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_closure 16>) +p153 = call(ConstClass(getexecutioncontext), descr=<GcPtrCallDescr>) +p154 = getfield_gc(p153, descr=<GcPtrFieldDescr pypy.interpreter.executioncontext.ExecutionContext.inst_topframeref 56>) +i155 = force_token() +p156 = getfield_gc(p153, descr=<GcPtrFieldDescr pypy.interpreter.executioncontext.ExecutionContext.inst_w_tracefunc 72>) +guard_isnull(p156, descr=<Guard164>) [p0, p1, p153, p156, p5, p7, p18, p144, p13, p14, p15, p16, p17, p19, p20, p21, p150, p154, i155, f147, None, None, None, None, None, None, None, None, None, None, f105, None, i87, i94, None, i77, None, None, p26, i41] +i157 = getfield_gc(p153, descr=<NonGcPtrFieldDescr pypy.interpreter.executioncontext.ExecutionContext.inst_profilefunc 40>) +i158 = int_is_zero(i157) +guard_true(i158, descr=<Guard165>) [p0, p1, p153, p5, p7, p18, p144, p13, p14, p15, p16, p17, p19, p20, p21, p150, p154, i155, f147, None, None, None, None, None, None, None, None, None, None, f105, None, i87, i94, None, i77, None, None, p26, i41] +debug_merge_point('<code object sqr, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 7> #0 LOAD_FAST', 1) +debug_merge_point('<code object sqr, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 7> #3 LOAD_FAST', 1) +debug_merge_point('<code object sqr, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 7> #6 BINARY_MULTIPLY', 1) +f159 = float_mul(f147, f147) +debug_merge_point('<code object sqr, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 7> #7 RETURN_VALUE', 1) +i160 = int_is_true(i157) +guard_false(i160, descr=<Guard166>) [p0, p1, p153, p5, p7, p18, p144, p13, p14, p15, p16, p17, p19, p20, p21, f159, p150, p154, i155, f147, None, None, None, None, None, None, None, None, None, None, f105, None, i87, i94, None, i77, None, None, p26, i41] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #283 INPLACE_ADD', 0) +f161 = getfield_gc_pure(p18, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +f162 = float_add(f161, f159) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #284 STORE_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #287 JUMP_ABSOLUTE', 0) +i164 = getfield_raw(38968960, descr=<SignedFieldDescr pypysig_long_struct.c_value 0>) +i166 = int_sub(i164, 34) +setfield_raw(38968960, i166, descr=<SignedFieldDescr pypysig_long_struct.c_value 0>) +i168 = int_lt(i166, 0) +guard_false(i168, descr=<Guard167>) [p0, p1, p5, p7, p13, p14, p15, p16, p17, p19, p20, p21, f162, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, f105, None, i87, i94, None, i77, None, None, p26, i41] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #125 FOR_ITER', 0) +p170 = new_with_vtable(19865144) +setfield_gc(p170, 291, descr=<UnsignedFieldDescr pypy.interpreter.pyopcode.FrameBlock.inst_handlerposition 8>) +setfield_gc(p170, 1, descr=<SignedFieldDescr pypy.interpreter.pyopcode.FrameBlock.inst_valuestackdepth 24>) +setfield_gc(p170, p26, descr=<GcPtrFieldDescr pypy.interpreter.pyopcode.FrameBlock.inst_previous 16>) +p174 = new_with_vtable(19861240) +setfield_gc(p174, i94, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_current 8>) +setfield_gc(p174, i87, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_remaining 16>) +setfield_gc(p174, i77, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_step 24>) +p176 = new_with_vtable(19800744) +setfield_gc(p176, f162, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +p178 = new_with_vtable(ConstClass(W_IntObject)) +setfield_gc(p178, i41, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +p180 = new_with_vtable(ConstClass(W_IntObject)) +setfield_gc(p180, 1, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +p182 = new_with_vtable(19800744) +setfield_gc(p182, f105, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +jump(p1, p0, ConstPtr(ptr183), p170, 2, p5, 0, 125, p7, p174, ConstPtr(ptr187), ConstPtr(ptr188), ConstPtr(ptr189), ConstPtr(ptr190), ConstPtr(ptr191), p13, p14, p15, p16, p17, p176, p19, p20, p21, p178, p180, p182, descr=<Loop1>) +[5ed6432f4a2c] jit-log-opt-bridge} +[5ed66199330c] {jit-log-opt-bridge +# bridge out of Guard 65 with 72 ops +[p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, i14, f15, f16] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #294 POP_BLOCK', 0) +p17 = getfield_gc(p3, descr=<GcPtrFieldDescr pypy.interpreter.pyopcode.FrameBlock.inst_previous 16>) +guard_class(p3, 19865144, descr=<Guard168>) [p0, p1, p3, p17, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, f16, i14, f15] +i19 = getfield_gc(p3, descr=<SignedFieldDescr pypy.interpreter.pyopcode.FrameBlock.inst_valuestackdepth 24>) +guard_value(i19, 0, descr=<Guard169>) [p0, p1, i19, p17, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, f16, i14, f15] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #295 LOAD_GLOBAL', 0) +p21 = getfield_gc(p1, descr=<GcPtrFieldDescr pypy.interpreter.eval.Frame.inst_w_globals 8>) +guard_value(p21, ConstPtr(ptr22), descr=<Guard170>) [p0, p1, p21, p17, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, f16, i14, f15] +p23 = getfield_gc(p21, descr=<GcPtrFieldDescr pypy.objspace.std.dictmultiobject.W_DictMultiObject.inst_r_dict_content 8>) +guard_isnull(p23, descr=<Guard171>) [p0, p1, p23, p21, p17, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, f16, i14, f15] +p25 = getfield_gc(ConstPtr(ptr24), descr=<GcPtrFieldDescr pypy.objspace.std.celldict.ModuleCell.inst_w_value 8>) +guard_nonnull_class(p25, 19905496, descr=<Guard172>) [p0, p1, p25, p17, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, f16, i14, f15] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #298 LOOKUP_METHOD', 0) +p27 = getfield_gc(p25, descr=<GcPtrFieldDescr pypy.interpreter.module.Module.inst_w_dict 8>) +guard_value(p27, ConstPtr(ptr28), descr=<Guard173>) [p0, p1, p25, p27, p17, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, f16, i14, f15] +p29 = getfield_gc(p27, descr=<GcPtrFieldDescr pypy.objspace.std.dictmultiobject.W_DictMultiObject.inst_r_dict_content 8>) +guard_isnull(p29, descr=<Guard174>) [p0, p1, p25, p29, p27, p17, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, f16, i14, f15] +p31 = getfield_gc(ConstPtr(ptr30), descr=<GcPtrFieldDescr pypy.objspace.std.celldict.ModuleCell.inst_w_value 8>) +guard_value(p31, ConstPtr(ptr32), descr=<Guard175>) [p0, p1, p31, p25, p17, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, f16, i14, f15] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #301 LOAD_FAST', 0) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #304 CALL_METHOD', 0) +call(ConstClass(set_errno), 0, descr=<VoidCallDescr>) +f36 = call(ConstClass(sqrt), f16, descr=<FloatCallDescr>) +i38 = call(ConstClass(get_errno), descr=<INTCallDescr>) +i39 = float_ne(f36, f36) +guard_false(i39, descr=<Guard176>) [p0, p1, i38, f36, f16, p17, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, None, i14, f15] +i42 = float_eq(f36, inf) +i44 = float_eq(f36, -inf) +i45 = int_or(i42, i44) +i46 = int_is_true(i45) +guard_false(i46, descr=<Guard177>) [p0, p1, i38, f36, f16, p17, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, None, i14, f15] +i47 = int_is_true(i38) +guard_false(i47, descr=<Guard178>) [p0, p1, i38, f36, p17, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, f16, i14, f15] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #307 RETURN_VALUE', 0) +guard_isnull(p17, descr=<Guard179>) [p0, p1, p17, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, f36, f16, i14, f15] +p48 = getfield_gc(p1, descr=<GcPtrFieldDescr pypy.interpreter.pyframe.PyFrame.inst_valuestack_w 120>) +setarrayitem_gc(p48, 0, ConstPtr(ptr50), descr=<GcPtrArrayDescr>) +setarrayitem_gc(p48, 1, ConstPtr(ptr52), descr=<GcPtrArrayDescr>) +setarrayitem_gc(p48, 2, ConstPtr(ptr52), descr=<GcPtrArrayDescr>) +setarrayitem_gc(p48, 3, ConstPtr(ptr55), descr=<GcPtrArrayDescr>) +setarrayitem_gc(p48, 4, ConstPtr(ptr55), descr=<GcPtrArrayDescr>) +setarrayitem_gc(p48, 5, ConstPtr(ptr55), descr=<GcPtrArrayDescr>) +setarrayitem_gc(p48, 6, ConstPtr(ptr55), descr=<GcPtrArrayDescr>) +setarrayitem_gc(p48, 7, p5, descr=<GcPtrArrayDescr>) +p60 = getfield_gc(p1, descr=<GcPtrFieldDescr pypy.interpreter.pyframe.PyFrame.inst_fastlocals_w 56>) +setarrayitem_gc(p60, 0, p6, descr=<GcPtrArrayDescr>) +setarrayitem_gc(p60, 1, p7, descr=<GcPtrArrayDescr>) +setarrayitem_gc(p60, 2, p8, descr=<GcPtrArrayDescr>) +setarrayitem_gc(p60, 3, p9, descr=<GcPtrArrayDescr>) +p66 = new_with_vtable(19800744) +setfield_gc(p66, f16, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +setarrayitem_gc(p60, 4, p66, descr=<GcPtrArrayDescr>) +setarrayitem_gc(p60, 5, p10, descr=<GcPtrArrayDescr>) +setarrayitem_gc(p60, 6, p11, descr=<GcPtrArrayDescr>) +setarrayitem_gc(p60, 7, p12, descr=<GcPtrArrayDescr>) +setarrayitem_gc(p60, 8, p13, descr=<GcPtrArrayDescr>) +p73 = new_with_vtable(ConstClass(W_IntObject)) +setfield_gc(p73, i14, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +setarrayitem_gc(p60, 9, p73, descr=<GcPtrArrayDescr>) +p76 = new_with_vtable(19800744) +setfield_gc(p76, f15, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +setarrayitem_gc(p60, 10, p76, descr=<GcPtrArrayDescr>) +setfield_gc(p1, 1, descr=<BoolFieldDescr pypy.interpreter.pyframe.PyFrame.inst_frame_finished_execution 148>) +setfield_gc(p1, ConstPtr(ptr79), descr=<GcPtrFieldDescr pypy.interpreter.pyframe.PyFrame.inst_pycode 112>) +setfield_gc(p1, ConstPtr(ptr55), descr=<GcPtrFieldDescr pypy.interpreter.pyframe.PyFrame.inst_lastblock 104>) +setfield_gc(p1, 0, descr=<SignedFieldDescr pypy.interpreter.pyframe.PyFrame.inst_valuestackdepth 128>) +setfield_gc(p1, p4, descr=<GcPtrFieldDescr pypy.interpreter.pyframe.PyFrame.inst_last_exception 88>) +setfield_gc(p1, 0, descr=<BoolFieldDescr pypy.interpreter.pyframe.PyFrame.inst_is_being_profiled 149>) +setfield_gc(p1, 307, descr=<SignedFieldDescr pypy.interpreter.pyframe.PyFrame.inst_last_instr 96>) +p84 = new_with_vtable(19800744) +setfield_gc(p84, f36, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +finish(p84, descr=<DoneWithThisFrameDescrRef object at 0x140bcc0>) +[5ed6619e9448] jit-log-opt-bridge} +[5ed74f2eef6e] {jit-log-opt-loop +# Loop 2 : loop with 394 ops +[p0, p1, p2, p3, p4, p5, p6, p7, i8, f9, i10, i11, p12, p13] +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #21 LOAD_FAST', 0) +guard_nonnull_class(p7, 19800744, descr=<Guard180>) [p1, p0, p7, p2, p3, p4, p5, p6, i8] +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #24 LOAD_FAST', 0) +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #27 COMPARE_OP', 0) +f15 = getfield_gc_pure(p7, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +i16 = float_gt(f15, f9) +guard_true(i16, descr=<Guard181>) [p1, p0, p6, p7, p2, p3, p4, p5, i8] +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #30 POP_JUMP_IF_FALSE', 0) +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #33 LOAD_FAST', 0) +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #36 POP_JUMP_IF_FALSE', 0) +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #39 LOAD_FAST', 0) +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #42 LOAD_FAST', 0) +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #45 COMPARE_OP', 0) +i17 = int_ge(i8, i10) +guard_false(i17, descr=<Guard182>) [p1, p0, p5, p2, p3, p4, p6, p7, i8] +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #48 POP_JUMP_IF_FALSE', 0) +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #55 LOAD_GLOBAL', 0) +p18 = getfield_gc(p0, descr=<GcPtrFieldDescr pypy.interpreter.eval.Frame.inst_w_globals 8>) +guard_value(p18, ConstPtr(ptr19), descr=<Guard183>) [p1, p0, p18, p2, p3, p4, p5, p6, p7, i8] +p20 = getfield_gc(p18, descr=<GcPtrFieldDescr pypy.objspace.std.dictmultiobject.W_DictMultiObject.inst_r_dict_content 8>) +guard_isnull(p20, descr=<Guard184>) [p1, p0, p20, p18, p2, p3, p4, p5, p6, p7, i8] +p22 = getfield_gc(ConstPtr(ptr21), descr=<GcPtrFieldDescr pypy.objspace.std.celldict.ModuleCell.inst_w_value 8>) +guard_nonnull_class(p22, ConstClass(Function), descr=<Guard185>) [p1, p0, p22, p2, p3, p4, p5, p6, p7, i8] +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #58 LOAD_FAST', 0) +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #61 CALL_FUNCTION', 0) +p24 = getfield_gc(p22, descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_code 24>) +guard_value(p24, ConstPtr(ptr25), descr=<Guard186>) [p1, p0, p24, p22, p2, p3, p4, p5, p6, p7, i8] +p26 = getfield_gc(p22, descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_w_func_globals 64>) +p27 = getfield_gc(p22, descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_closure 16>) +i28 = force_token() +i29 = int_is_zero(i11) +guard_true(i29, descr=<Guard187>) [p1, p0, p12, p2, p3, p22, p4, p5, p6, p7, p26, p13, i28, i8] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #0 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #3 LOAD_ATTR', 1) +p30 = getfield_gc(p4, descr=<GcPtrFieldDescr pypy.objspace.std.mapdict.W_ObjectObjectSize5.inst_map 48>) +guard_value(p30, ConstPtr(ptr31), descr=<Guard188>) [p1, p0, p12, p4, p30, p2, p3, p22, p5, p6, p7, p26, p13, i28, i8] +p33 = getfield_gc(ConstPtr(ptr32), descr=<GcPtrFieldDescr pypy.objspace.std.typeobject.W_TypeObject.inst__version_tag 16>) +guard_value(p33, ConstPtr(ptr34), descr=<Guard189>) [p1, p0, p12, p4, p33, p2, p3, p22, p5, p6, p7, p26, p13, i28, i8] +p35 = getfield_gc(p4, descr=<GcPtrFieldDescr pypy.objspace.std.mapdict.W_ObjectObjectSize5.inst__value2 24>) +guard_nonnull_class(p35, 19800744, descr=<Guard190>) [p1, p0, p12, p35, p4, p2, p3, p22, p5, p6, p7, p26, p13, i28, i8] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #6 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #9 LOAD_ATTR', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #12 BINARY_MULTIPLY', 1) +f37 = getfield_gc_pure(p35, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +f38 = float_mul(f37, f37) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #13 STORE_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #16 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #19 LOAD_ATTR', 1) +p39 = getfield_gc(p4, descr=<GcPtrFieldDescr pypy.objspace.std.mapdict.W_ObjectObjectSize5.inst__value3 32>) +guard_nonnull_class(p39, 19800744, descr=<Guard191>) [p1, p0, p12, p39, p4, p2, p3, p22, p5, p6, p7, f38, p26, p13, i28, i8] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #22 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #25 LOAD_ATTR', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #28 BINARY_MULTIPLY', 1) +f41 = getfield_gc_pure(p39, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +f42 = float_mul(f41, f41) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #29 STORE_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #32 LOAD_CONST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #35 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #38 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #41 BINARY_ADD', 1) +f43 = float_add(f38, f42) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #42 BINARY_DIVIDE', 1) +i45 = float_eq(f43, 0.000000) +guard_false(i45, descr=<Guard192>) [p1, p0, p12, f43, p2, p3, p22, p4, p5, p6, p7, f42, f38, p26, p13, i28, i8] +f47 = float_truediv(0.500000, f43) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #43 STORE_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #46 LOAD_CONST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #49 STORE_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #52 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #55 LOAD_ATTR', 1) +p48 = getfield_gc(p4, descr=<GcPtrFieldDescr pypy.objspace.std.mapdict.W_ObjectObjectSize5.inst__value0 8>) +guard_nonnull_class(p48, ConstClass(W_IntObject), descr=<Guard193>) [p1, p0, p12, p48, p4, p2, p3, p22, p5, p6, p7, f47, f42, f38, p26, p13, i28, i8] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #58 STORE_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #61 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #64 LOAD_ATTR', 1) +p50 = getfield_gc(p4, descr=<GcPtrFieldDescr pypy.objspace.std.mapdict.W_ObjectObjectSize5.inst__value1 16>) +guard_nonnull_class(p50, ConstClass(W_IntObject), descr=<Guard194>) [p1, p0, p12, p50, p4, p2, p3, p22, p5, p6, p7, p48, f47, f42, f38, p26, p13, i28, i8] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #67 STORE_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #70 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #73 LOAD_ATTR', 1) +p52 = getfield_gc(p4, descr=<GcPtrFieldDescr pypy.objspace.std.mapdict.W_ObjectObjectSize5.inst__value4 40>) +guard_nonnull_class(p52, 19886912, descr=<Guard195>) [p1, p0, p12, p52, p4, p2, p3, p22, p5, p6, p7, p50, p48, f47, f42, f38, p26, p13, i28, i8] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #76 STORE_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #79 SETUP_LOOP', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #82 LOAD_GLOBAL', 1) +guard_value(p26, ConstPtr(ptr54), descr=<Guard196>) [p1, p0, p12, p26, p2, p3, p22, p4, p5, p6, p7, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +p56 = getfield_gc(p26, descr=<GcPtrFieldDescr pypy.objspace.std.dictmultiobject.W_DictMultiObject.inst_r_dict_content 8>) +guard_isnull(p56, descr=<Guard197>) [p1, p0, p12, p56, p26, p2, p3, p22, p4, p5, p6, p7, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +p58 = getfield_gc(ConstPtr(ptr57), descr=<GcPtrFieldDescr pypy.objspace.std.celldict.ModuleCell.inst_w_value 8>) +guard_isnull(p58, descr=<Guard198>) [p1, p0, p12, p58, p2, p3, p22, p4, p5, p6, p7, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +p60 = getfield_gc(ConstPtr(ptr59), descr=<GcPtrFieldDescr pypy.interpreter.module.Module.inst_w_dict 8>) +guard_value(p60, ConstPtr(ptr61), descr=<Guard199>) [p1, p0, p12, p60, p2, p3, p22, p4, p5, p6, p7, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +p62 = getfield_gc(p60, descr=<GcPtrFieldDescr pypy.objspace.std.dictmultiobject.W_DictMultiObject.inst_r_dict_content 8>) +guard_isnull(p62, descr=<Guard200>) [p1, p0, p12, p62, p60, p2, p3, p22, p4, p5, p6, p7, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +p64 = getfield_gc(ConstPtr(ptr63), descr=<GcPtrFieldDescr pypy.objspace.std.celldict.ModuleCell.inst_w_value 8>) +guard_value(p64, ConstPtr(ptr65), descr=<Guard201>) [p1, p0, p12, p64, p2, p3, p22, p4, p5, p6, p7, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #85 LOAD_CONST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #88 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #91 LOAD_CONST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #94 BINARY_SUBTRACT', 1) +i66 = getfield_gc_pure(p48, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +i68 = int_sub_ovf(i66, 1) +guard_no_overflow(, descr=<Guard202>) [p1, p0, p12, p48, i68, p2, p3, p22, p4, p5, p6, p7, p64, p52, p50, None, f47, f42, f38, None, p13, i28, i8] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #95 CALL_FUNCTION', 1) +p70 = getfield_gc(ConstPtr(ptr69), descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_name 40>) +p71 = getfield_gc(ConstPtr(ptr69), descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_defs 32>) +i72 = getfield_gc_pure(p71, descr=<BoolFieldDescr pypy.interpreter.function.Defaults.inst_promote 16>) +guard_false(i72, descr=<Guard203>) [p1, p0, p12, p70, p71, p2, p3, p22, p4, p5, p6, p7, i68, None, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +p73 = getfield_gc_pure(p71, descr=<GcPtrFieldDescr pypy.interpreter.function.Defaults.inst_items 8>) +i74 = arraylen_gc(p73, descr=<GcPtrArrayDescr>) +i76 = int_sub(4, i74) +i78 = int_ge(3, i76) +guard_true(i78, descr=<Guard204>) [p1, p0, p12, p70, i76, p71, p2, p3, p22, p4, p5, p6, p7, i68, None, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +i79 = int_sub(3, i76) +i80 = getfield_gc_pure(p71, descr=<BoolFieldDescr pypy.interpreter.function.Defaults.inst_promote 16>) +guard_false(i80, descr=<Guard205>) [p1, p0, p12, p70, i79, i76, p71, p2, p3, p22, p4, p5, p6, p7, i68, None, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +p81 = getfield_gc_pure(p71, descr=<GcPtrFieldDescr pypy.interpreter.function.Defaults.inst_items 8>) +p82 = getarrayitem_gc(p81, i79, descr=<GcPtrArrayDescr>) +guard_class(p82, ConstClass(W_IntObject), descr=<Guard206>) [p1, p0, p12, p82, p2, p3, p22, p4, p5, p6, p7, i68, None, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +i84 = getfield_gc_pure(p82, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +i85 = int_is_zero(i84) +guard_false(i85, descr=<Guard207>) [p1, p0, p12, i84, i68, p2, p3, p22, p4, p5, p6, p7, p82, None, None, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +i87 = int_lt(i84, 0) +guard_false(i87, descr=<Guard208>) [p1, p0, p12, i84, i68, p2, p3, p22, p4, p5, p6, p7, p82, None, None, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +i89 = int_lt(1, i68) +guard_true(i89, descr=<Guard209>) [p1, p0, p12, i84, i68, p2, p3, p22, p4, p5, p6, p7, p82, None, None, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +i90 = int_sub(i68, 1) +i92 = int_sub(i90, 1) +i93 = uint_floordiv(i92, i84) +i95 = int_add(i93, 1) +i97 = int_lt(i95, 0) +guard_false(i97, descr=<Guard210>) [p1, p0, p12, i84, i95, p2, p3, p22, p4, p5, p6, p7, p82, i68, None, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #98 GET_ITER', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #99 FOR_ITER', 1) +i99 = int_gt(i95, 0) +guard_true(i99, descr=<Guard211>) [p1, p0, p12, p2, p3, p22, p4, p5, p6, p7, i84, i95, None, None, None, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +i100 = int_add(1, i84) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #102 STORE_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #105 SETUP_LOOP', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #108 LOAD_GLOBAL', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #111 LOAD_CONST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #114 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #117 LOAD_CONST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #120 BINARY_SUBTRACT', 1) +i101 = getfield_gc_pure(p50, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +i103 = int_sub_ovf(i101, 1) +guard_no_overflow(, descr=<Guard212>) [p1, p0, p12, p50, i103, p2, p3, p22, p4, p5, p6, p7, i100, i93, i84, None, None, None, None, p52, None, p48, f47, f42, f38, None, p13, i28, i8] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #121 CALL_FUNCTION', 1) +i104 = getfield_gc_pure(p71, descr=<BoolFieldDescr pypy.interpreter.function.Defaults.inst_promote 16>) +guard_false(i104, descr=<Guard213>) [p1, p0, p12, p70, p71, p2, p3, p22, p4, p5, p6, p7, i103, i100, i93, i84, None, None, None, None, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +p105 = getfield_gc_pure(p71, descr=<GcPtrFieldDescr pypy.interpreter.function.Defaults.inst_items 8>) +i106 = arraylen_gc(p105, descr=<GcPtrArrayDescr>) +i108 = int_sub(4, i106) +i110 = int_ge(3, i108) +guard_true(i110, descr=<Guard214>) [p1, p0, p12, p70, i108, p71, p2, p3, p22, p4, p5, p6, p7, i103, i100, i93, i84, None, None, None, None, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +i111 = int_sub(3, i108) +i112 = getfield_gc_pure(p71, descr=<BoolFieldDescr pypy.interpreter.function.Defaults.inst_promote 16>) +guard_false(i112, descr=<Guard215>) [p1, p0, p12, p70, i111, i108, p71, p2, p3, p22, p4, p5, p6, p7, i103, i100, i93, i84, None, None, None, None, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +p113 = getfield_gc_pure(p71, descr=<GcPtrFieldDescr pypy.interpreter.function.Defaults.inst_items 8>) +p114 = getarrayitem_gc(p113, i111, descr=<GcPtrArrayDescr>) +guard_class(p114, ConstClass(W_IntObject), descr=<Guard216>) [p1, p0, p12, p114, p2, p3, p22, p4, p5, p6, p7, i103, i100, i93, i84, None, None, None, None, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +i116 = getfield_gc_pure(p114, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +i117 = int_is_zero(i116) +guard_false(i117, descr=<Guard217>) [p1, p0, p12, i116, i103, p2, p3, p22, p4, p5, p6, p7, p114, None, i100, i93, i84, None, None, None, None, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +i119 = int_lt(i116, 0) +guard_false(i119, descr=<Guard218>) [p1, p0, p12, i116, i103, p2, p3, p22, p4, p5, p6, p7, p114, None, i100, i93, i84, None, None, None, None, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +i121 = int_lt(1, i103) +guard_true(i121, descr=<Guard219>) [p1, p0, p12, i116, i103, p2, p3, p22, p4, p5, p6, p7, p114, None, i100, i93, i84, None, None, None, None, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +i122 = int_sub(i103, 1) +i124 = int_sub(i122, 1) +i125 = uint_floordiv(i124, i116) +i127 = int_add(i125, 1) +i129 = int_lt(i127, 0) +guard_false(i129, descr=<Guard220>) [p1, p0, p12, i116, i127, p2, p3, p22, p4, p5, p6, p7, p114, i103, i100, i93, i84, None, None, None, None, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #124 GET_ITER', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #125 FOR_ITER', 1) +i131 = int_gt(i127, 0) +guard_true(i131, descr=<Guard221>) [p1, p0, p12, p2, p3, p22, p4, p5, p6, p7, i116, i127, None, None, i100, i93, i84, None, None, None, None, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +i132 = int_add(1, i116) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #128 STORE_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #131 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #134 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #137 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #140 BINARY_MULTIPLY', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #141 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #144 BINARY_ADD', 1) +i133 = int_add_ovf(i66, 1) +guard_no_overflow(, descr=<Guard222>) [p1, p0, p12, i133, p2, p3, p22, p4, p5, p6, p7, i132, i125, i66, i116, None, None, None, i100, i93, i84, None, None, None, None, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #145 BINARY_SUBSCR', 1) +i134 = getfield_gc(p52, descr=<SignedFieldDescr pypy.module.array.interp_array.W_ArrayTyped.inst_len 32>) +i135 = int_lt(i133, i134) +guard_true(i135, descr=<Guard223>) [p1, p0, p12, p52, i133, p2, p3, p22, p4, p5, p6, p7, i132, i125, None, i116, None, None, None, i100, i93, i84, None, None, None, None, None, p50, p48, f47, f42, f38, None, p13, i28, i8] +i136 = getfield_gc(p52, descr=<NonGcPtrFieldDescr pypy.module.array.interp_array.W_ArrayTyped.inst_buffer 24>) +f137 = getarrayitem_raw(i136, i133, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #146 STORE_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #149 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #152 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #155 LOAD_CONST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #158 BINARY_SUBTRACT', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #159 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #162 BINARY_MULTIPLY', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #163 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #166 BINARY_ADD', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #167 BINARY_SUBSCR', 1) +f138 = getarrayitem_raw(i136, 1, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #168 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #171 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #174 LOAD_CONST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #177 BINARY_ADD', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #178 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #181 BINARY_MULTIPLY', 1) +i140 = int_mul_ovf(2, i66) +guard_no_overflow(, descr=<Guard224>) [p1, p0, p12, p48, i140, p2, p3, p22, p4, p5, p6, p7, f138, f137, i132, i125, None, i116, None, None, None, i100, i93, i84, None, None, None, None, p52, p50, None, f47, f42, f38, None, p13, i28, i8] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #182 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #185 BINARY_ADD', 1) +i141 = int_add_ovf(i140, 1) +guard_no_overflow(, descr=<Guard225>) [p1, p0, p12, i141, p2, p3, p22, p4, p5, p6, p7, i140, f138, f137, i132, i125, None, i116, None, None, None, i100, i93, i84, None, None, None, None, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #186 BINARY_SUBSCR', 1) +i143 = int_lt(i141, 0) +guard_false(i143, descr=<Guard226>) [p1, p0, p12, p52, i141, i134, p2, p3, p22, p4, p5, p6, p7, None, f138, f137, i132, i125, None, i116, None, None, None, i100, i93, i84, None, None, None, None, None, p50, p48, f47, f42, f38, None, p13, i28, i8] +i144 = int_lt(i141, i134) +guard_true(i144, descr=<Guard227>) [p1, p0, p12, p52, i141, p2, p3, p22, p4, p5, p6, p7, None, f138, f137, i132, i125, None, i116, None, None, None, i100, i93, i84, None, None, None, None, None, p50, p48, f47, f42, f38, None, p13, i28, i8] +f145 = getarrayitem_raw(i136, i141, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #187 BINARY_ADD', 1) +f146 = float_add(f138, f145) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #188 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #191 BINARY_MULTIPLY', 1) +f147 = float_mul(f146, f42) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #192 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #195 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #198 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #201 BINARY_MULTIPLY', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #202 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #205 BINARY_ADD', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #206 LOAD_CONST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #209 BINARY_SUBTRACT', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #210 BINARY_SUBSCR', 1) +i148 = int_lt(i66, i134) +guard_true(i148, descr=<Guard228>) [p1, p0, p12, p52, i66, p2, p3, p22, p4, p5, p6, p7, f147, None, None, f137, i132, i125, None, i116, None, None, None, i100, i93, i84, None, None, None, None, None, p50, p48, f47, f42, f38, None, p13, i28, i8] +f149 = getarrayitem_raw(i136, i66, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #211 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #214 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #217 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #220 BINARY_MULTIPLY', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #221 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #224 BINARY_ADD', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #225 LOAD_CONST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #228 BINARY_ADD', 1) +i151 = int_add(i133, 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #229 BINARY_SUBSCR', 1) +i152 = int_lt(i151, i134) +guard_true(i152, descr=<Guard229>) [p1, p0, p12, p52, i151, p2, p3, p22, p4, p5, p6, p7, f149, f147, None, None, f137, i132, i125, None, i116, None, None, None, i100, i93, i84, None, None, None, None, None, p50, p48, f47, f42, f38, None, p13, i28, i8] +f153 = getarrayitem_raw(i136, i151, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #230 BINARY_ADD', 1) +f154 = float_add(f149, f153) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #231 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #234 BINARY_MULTIPLY', 1) +f155 = float_mul(f154, f38) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #235 BINARY_ADD', 1) +f156 = float_add(f147, f155) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #236 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #239 BINARY_MULTIPLY', 1) +f157 = float_mul(f156, f47) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #240 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #243 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #246 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #249 BINARY_MULTIPLY', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #250 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #253 BINARY_ADD', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #254 STORE_SUBSCR', 1) +setarrayitem_raw(i136, i133, f157, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #255 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #258 LOAD_GLOBAL', 1) +p159 = getfield_gc(ConstPtr(ptr158), descr=<GcPtrFieldDescr pypy.objspace.std.celldict.ModuleCell.inst_w_value 8>) +guard_nonnull_class(p159, ConstClass(Function), descr=<Guard230>) [p1, p0, p12, p159, p2, p3, p22, p4, p5, p6, p7, None, None, None, None, f137, i132, i125, None, i116, None, None, None, i100, i93, i84, None, None, None, None, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #261 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #264 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #267 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #270 BINARY_MULTIPLY', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #271 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #274 BINARY_ADD', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #275 BINARY_SUBSCR', 1) +f161 = getarrayitem_raw(i136, i133, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #276 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #279 BINARY_SUBTRACT', 1) +f162 = float_sub(f161, f137) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #280 CALL_FUNCTION', 1) +p163 = getfield_gc(p159, descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_code 24>) +guard_value(p163, ConstPtr(ptr164), descr=<Guard231>) [p1, p0, p12, p163, p159, p2, p3, p22, p4, p5, p6, p7, f162, None, None, None, None, f137, i132, i125, None, i116, None, None, None, i100, i93, i84, None, None, None, None, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +p165 = getfield_gc(p159, descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_w_func_globals 64>) +p166 = getfield_gc(p159, descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_closure 16>) +i167 = force_token() +debug_merge_point('<code object sqr, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 7> #0 LOAD_FAST', 2) +debug_merge_point('<code object sqr, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 7> #3 LOAD_FAST', 2) +debug_merge_point('<code object sqr, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 7> #6 BINARY_MULTIPLY', 2) +f168 = float_mul(f162, f162) +debug_merge_point('<code object sqr, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 7> #7 RETURN_VALUE', 2) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #283 INPLACE_ADD', 1) +f170 = float_add(0.000000, f168) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #284 STORE_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #287 JUMP_ABSOLUTE', 1) +i172 = getfield_raw(38968960, descr=<SignedFieldDescr pypysig_long_struct.c_value 0>) +i174 = int_sub(i172, 100) +setfield_raw(38968960, i174, descr=<SignedFieldDescr pypysig_long_struct.c_value 0>) +i176 = int_lt(i174, 0) +guard_false(i176, descr=<Guard232>) [p1, p0, p12, p2, p3, p22, p4, p5, p6, p7, f170, None, None, None, None, None, f137, i132, i125, None, i116, None, None, None, i100, i93, i84, None, None, None, None, p52, p50, p48, f47, f42, f38, None, p13, i28, i8] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #125 FOR_ITER', 1) +i177 = force_token() +p179 = new_with_vtable(19809200) +setfield_gc(p179, i28, descr=<SignedFieldDescr JitVirtualRef.virtual_token 8>) +setfield_gc(p12, p179, descr=<GcPtrFieldDescr pypy.interpreter.executioncontext.ExecutionContext.inst_topframeref 56>) +setfield_gc(p0, i177, descr=<SignedFieldDescr pypy.interpreter.pyframe.PyFrame.vable_token 24>) +p181 = new_with_vtable(19863424) +setfield_gc(p181, p13, descr=<GcPtrFieldDescr pypy.interpreter.pyframe.PyFrame.inst_f_backref 48>) +setfield_gc(p181, ConstPtr(ptr54), descr=<GcPtrFieldDescr pypy.interpreter.eval.Frame.inst_w_globals 8>) +setfield_gc(p181, 34, descr=<INTFieldDescr pypy.interpreter.pyframe.PyFrame.inst_f_lineno 144>) +setfield_gc(p181, ConstPtr(ptr25), descr=<GcPtrFieldDescr pypy.interpreter.pyframe.PyFrame.inst_pycode 112>) +p184 = new_array(8, descr=<GcPtrArrayDescr>) +p186 = new_with_vtable(19861240) +setfield_gc(p186, i100, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_current 8>) +setfield_gc(p186, i93, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_remaining 16>) +setfield_gc(p186, i84, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_step 24>) +setarrayitem_gc(p184, 0, p186, descr=<GcPtrArrayDescr>) +p189 = new_with_vtable(19861240) +setfield_gc(p189, i132, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_current 8>) +setfield_gc(p189, i125, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_remaining 16>) +setfield_gc(p189, i116, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_step 24>) +setarrayitem_gc(p184, 1, p189, descr=<GcPtrArrayDescr>) +setfield_gc(p181, p184, descr=<GcPtrFieldDescr pypy.interpreter.pyframe.PyFrame.inst_valuestack_w 120>) +setfield_gc(p181, 125, descr=<SignedFieldDescr pypy.interpreter.pyframe.PyFrame.inst_last_instr 96>) +p193 = new_with_vtable(19865144) +setfield_gc(p193, 291, descr=<UnsignedFieldDescr pypy.interpreter.pyopcode.FrameBlock.inst_handlerposition 8>) +setfield_gc(p193, 1, descr=<SignedFieldDescr pypy.interpreter.pyopcode.FrameBlock.inst_valuestackdepth 24>) +p197 = new_with_vtable(19865144) +setfield_gc(p197, 295, descr=<UnsignedFieldDescr pypy.interpreter.pyopcode.FrameBlock.inst_handlerposition 8>) +setfield_gc(p193, p197, descr=<GcPtrFieldDescr pypy.interpreter.pyopcode.FrameBlock.inst_previous 16>) +setfield_gc(p181, p193, descr=<GcPtrFieldDescr pypy.interpreter.pyframe.PyFrame.inst_lastblock 104>) +p200 = new_array(11, descr=<GcPtrArrayDescr>) +setarrayitem_gc(p200, 0, p4, descr=<GcPtrArrayDescr>) +p203 = new_with_vtable(19800744) +setfield_gc(p203, f38, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +setarrayitem_gc(p200, 1, p203, descr=<GcPtrArrayDescr>) +p206 = new_with_vtable(19800744) +setfield_gc(p206, f42, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +setarrayitem_gc(p200, 2, p206, descr=<GcPtrArrayDescr>) +p209 = new_with_vtable(19800744) +setfield_gc(p209, f47, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +setarrayitem_gc(p200, 3, p209, descr=<GcPtrArrayDescr>) +p212 = new_with_vtable(19800744) +setfield_gc(p212, f170, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +setarrayitem_gc(p200, 4, p212, descr=<GcPtrArrayDescr>) +setarrayitem_gc(p200, 5, p48, descr=<GcPtrArrayDescr>) +setarrayitem_gc(p200, 6, p50, descr=<GcPtrArrayDescr>) +setarrayitem_gc(p200, 7, p52, descr=<GcPtrArrayDescr>) +p218 = new_with_vtable(ConstClass(W_IntObject)) +setfield_gc(p218, 1, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +setarrayitem_gc(p200, 8, p218, descr=<GcPtrArrayDescr>) +p221 = new_with_vtable(ConstClass(W_IntObject)) +setfield_gc(p221, 1, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +setarrayitem_gc(p200, 9, p221, descr=<GcPtrArrayDescr>) +p224 = new_with_vtable(19800744) +setfield_gc(p224, f137, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +setarrayitem_gc(p200, 10, p224, descr=<GcPtrArrayDescr>) +setfield_gc(p181, p200, descr=<GcPtrFieldDescr pypy.interpreter.pyframe.PyFrame.inst_fastlocals_w 56>) +setfield_gc(p181, 2, descr=<SignedFieldDescr pypy.interpreter.pyframe.PyFrame.inst_valuestackdepth 128>) +p235 = call_assembler(p181, p12, ConstPtr(ptr25), p193, 2, ConstPtr(ptr227), 0, 125, p186, p189, ConstPtr(ptr229), ConstPtr(ptr230), ConstPtr(ptr231), ConstPtr(ptr232), ConstPtr(ptr233), ConstPtr(ptr234), p4, p203, p206, p209, p212, p48, p50, p52, p218, p221, p224, descr=<Loop1>) +guard_not_forced(, descr=<Guard233>) [p1, p0, p12, p181, p235, p179, p2, p3, p22, p4, p5, p6, p7, i8] +guard_no_exception(, descr=<Guard234>) [p1, p0, p12, p181, p235, p179, p2, p3, p22, p4, p5, p6, p7, i8] +p236 = getfield_gc(p12, descr=<GcPtrFieldDescr pypy.interpreter.executioncontext.ExecutionContext.inst_w_tracefunc 72>) +guard_isnull(p236, descr=<Guard235>) [p1, p0, p12, p235, p181, p236, p179, p2, p3, p22, p4, p5, p6, p7, i8] +i237 = ptr_eq(p181, p0) +guard_false(i237, descr=<Guard236>) [p1, p0, p12, p235, p181, p179, p2, p3, p22, p4, p5, p6, p7, i8] +i238 = getfield_gc(p12, descr=<NonGcPtrFieldDescr pypy.interpreter.executioncontext.ExecutionContext.inst_profilefunc 40>) +setfield_gc(p181, ConstPtr(ptr239), descr=<GcPtrFieldDescr pypy.interpreter.pyframe.PyFrame.inst_last_exception 88>) +i240 = int_is_true(i238) +guard_false(i240, descr=<Guard237>) [p1, p0, p235, p181, p12, p179, p2, p3, p22, p4, p5, p6, p7, i8] +p241 = getfield_gc(p181, descr=<GcPtrFieldDescr pypy.interpreter.pyframe.PyFrame.inst_f_backref 48>) +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #64 STORE_FAST', 0) +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #67 LOAD_FAST', 0) +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #70 LOAD_CONST', 0) +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #73 INPLACE_ADD', 0) +i243 = int_add(i8, 1) +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #74 STORE_FAST', 0) +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #77 JUMP_ABSOLUTE', 0) +i245 = getfield_raw(38968960, descr=<SignedFieldDescr pypysig_long_struct.c_value 0>) +i247 = int_sub(i245, 100) +setfield_raw(38968960, i247, descr=<SignedFieldDescr pypysig_long_struct.c_value 0>) +setfield_gc(p12, p241, descr=<GcPtrFieldDescr pypy.interpreter.executioncontext.ExecutionContext.inst_topframeref 56>) +setfield_gc(p179, p181, descr=<GcPtrFieldDescr JitVirtualRef.forced 16>) +setfield_gc(p179, -3, descr=<SignedFieldDescr JitVirtualRef.virtual_token 8>) +i250 = int_lt(i247, 0) +guard_false(i250, descr=<Guard238>) [p1, p0, p2, p3, p4, p5, p6, p235, i243, None] +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #21 LOAD_FAST', 0) +jump(p0, p1, p2, p3, p4, p5, p6, p235, i243, f9, i10, i238, p12, p241, descr=<Loop2>) +[5ed74fc965fa] jit-log-opt-loop} +[5ed74fe43ee0] {jit-log-opt-loop +# Loop 3 : entry bridge with 413 ops +[p0, p1, p2, p3, i4, p5, i6, i7, p8, p9, p10, p11, p12, p13, p14] +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #21 LOAD_FAST', 0) +guard_value(i4, 0, descr=<Guard239>) [i4, p1, p0, p2, p3, p5, i6, i7, p8, p9, p10, p11, p12, p13, p14] +guard_nonnull_class(p13, 19800744, descr=<Guard240>) [p1, p0, p13, p2, p3, p5, i6, p8, p9, p10, p11, p12, p14] +guard_value(i6, 0, descr=<Guard241>) [i6, p1, p0, p2, p3, p5, p13, p9, p10, p11, p12, p14] +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #24 LOAD_FAST', 0) +guard_nonnull_class(p12, 19800744, descr=<Guard242>) [p1, p0, p12, p2, p3, p5, p13, p9, p10, p11, p14] +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #27 COMPARE_OP', 0) +f19 = getfield_gc_pure(p13, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +f20 = getfield_gc_pure(p12, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +i21 = float_gt(f19, f20) +guard_true(i21, descr=<Guard243>) [p1, p0, p12, p13, p2, p3, p5, p10, p11, p14] +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #30 POP_JUMP_IF_FALSE', 0) +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #33 LOAD_FAST', 0) +guard_nonnull_class(p11, ConstClass(W_IntObject), descr=<Guard244>) [p1, p0, p11, p2, p3, p5, p10, p12, p13, p14] +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #36 POP_JUMP_IF_FALSE', 0) +i23 = getfield_gc_pure(p11, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +i24 = int_is_true(i23) +guard_true(i24, descr=<Guard245>) [p1, p0, p11, p2, p3, p5, p10, p12, p13, p14] +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #39 LOAD_FAST', 0) +guard_nonnull_class(p14, ConstClass(W_IntObject), descr=<Guard246>) [p1, p0, p14, p2, p3, p5, p10, p11, p12, p13] +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #42 LOAD_FAST', 0) +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #45 COMPARE_OP', 0) +i26 = getfield_gc_pure(p14, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +i27 = int_ge(i26, i23) +guard_false(i27, descr=<Guard247>) [p1, p0, p11, p14, p2, p3, p5, p10, p12, p13] +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #48 POP_JUMP_IF_FALSE', 0) +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #55 LOAD_GLOBAL', 0) +guard_value(p2, ConstPtr(ptr28), descr=<Guard248>) [p1, p0, p2, p3, p5, p10, p11, p12, p13, p14] +p29 = getfield_gc(p0, descr=<GcPtrFieldDescr pypy.interpreter.eval.Frame.inst_w_globals 8>) +guard_value(p29, ConstPtr(ptr30), descr=<Guard249>) [p1, p0, p29, p3, p5, p10, p11, p12, p13, p14] +p31 = getfield_gc(p29, descr=<GcPtrFieldDescr pypy.objspace.std.dictmultiobject.W_DictMultiObject.inst_r_dict_content 8>) +guard_isnull(p31, descr=<Guard250>) [p1, p0, p31, p29, p3, p5, p10, p11, p12, p13, p14] +p33 = getfield_gc(ConstPtr(ptr32), descr=<GcPtrFieldDescr pypy.objspace.std.celldict.ModuleCell.inst_w_value 8>) +guard_nonnull_class(p33, ConstClass(Function), descr=<Guard251>) [p1, p0, p33, p3, p5, p10, p11, p12, p13, p14] +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #58 LOAD_FAST', 0) +guard_nonnull_class(p10, 19852624, descr=<Guard252>) [p1, p0, p10, p3, p5, p33, p11, p12, p13, p14] +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #61 CALL_FUNCTION', 0) +p36 = getfield_gc(p33, descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_code 24>) +guard_value(p36, ConstPtr(ptr37), descr=<Guard253>) [p1, p0, p36, p33, p3, p5, p10, p11, p12, p13, p14] +p38 = getfield_gc(p33, descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_w_func_globals 64>) +p39 = getfield_gc(p33, descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_closure 16>) +p41 = call(ConstClass(getexecutioncontext), descr=<GcPtrCallDescr>) +p42 = getfield_gc(p41, descr=<GcPtrFieldDescr pypy.interpreter.executioncontext.ExecutionContext.inst_topframeref 56>) +i43 = force_token() +p44 = getfield_gc(p41, descr=<GcPtrFieldDescr pypy.interpreter.executioncontext.ExecutionContext.inst_w_tracefunc 72>) +guard_isnull(p44, descr=<Guard254>) [p1, p0, p41, p44, p3, p5, p33, p10, p11, p12, p13, p14, i43, p42, p38] +i45 = getfield_gc(p41, descr=<NonGcPtrFieldDescr pypy.interpreter.executioncontext.ExecutionContext.inst_profilefunc 40>) +i46 = int_is_zero(i45) +guard_true(i46, descr=<Guard255>) [p1, p0, p41, p3, p5, p33, p10, p11, p12, p13, p14, i43, p42, p38] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #0 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #3 LOAD_ATTR', 1) +p47 = getfield_gc(p10, descr=<GcPtrFieldDescr pypy.objspace.std.mapdict.W_ObjectObjectSize5.inst_map 48>) +guard_value(p47, ConstPtr(ptr48), descr=<Guard256>) [p1, p0, p41, p10, p47, p3, p5, p33, p11, p12, p13, p14, i43, p42, p38] +p50 = getfield_gc(ConstPtr(ptr49), descr=<GcPtrFieldDescr pypy.objspace.std.typeobject.W_TypeObject.inst__version_tag 16>) +guard_value(p50, ConstPtr(ptr51), descr=<Guard257>) [p1, p0, p41, p10, p50, p3, p5, p33, p11, p12, p13, p14, i43, p42, p38] +p52 = getfield_gc(p10, descr=<GcPtrFieldDescr pypy.objspace.std.mapdict.W_ObjectObjectSize5.inst__value2 24>) +guard_nonnull_class(p52, 19800744, descr=<Guard258>) [p1, p0, p41, p52, p10, p3, p5, p33, p11, p12, p13, p14, i43, p42, p38] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #6 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #9 LOAD_ATTR', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #12 BINARY_MULTIPLY', 1) +f54 = getfield_gc_pure(p52, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +f55 = float_mul(f54, f54) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #13 STORE_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #16 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #19 LOAD_ATTR', 1) +p56 = getfield_gc(p10, descr=<GcPtrFieldDescr pypy.objspace.std.mapdict.W_ObjectObjectSize5.inst__value3 32>) +guard_nonnull_class(p56, 19800744, descr=<Guard259>) [p1, p0, p41, p56, p10, p3, p5, p33, p11, p12, p13, p14, f55, i43, p42, p38] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #22 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #25 LOAD_ATTR', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #28 BINARY_MULTIPLY', 1) +f58 = getfield_gc_pure(p56, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +f59 = float_mul(f58, f58) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #29 STORE_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #32 LOAD_CONST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #35 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #38 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #41 BINARY_ADD', 1) +f60 = float_add(f55, f59) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #42 BINARY_DIVIDE', 1) +i62 = float_eq(f60, 0.000000) +guard_false(i62, descr=<Guard260>) [p1, p0, p41, f60, p3, p5, p33, p10, p11, p12, p13, p14, f59, f55, i43, p42, p38] +f64 = float_truediv(0.500000, f60) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #43 STORE_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #46 LOAD_CONST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #49 STORE_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #52 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #55 LOAD_ATTR', 1) +p65 = getfield_gc(p10, descr=<GcPtrFieldDescr pypy.objspace.std.mapdict.W_ObjectObjectSize5.inst__value0 8>) +guard_nonnull_class(p65, ConstClass(W_IntObject), descr=<Guard261>) [p1, p0, p41, p65, p10, p3, p5, p33, p11, p12, p13, p14, f64, f59, f55, i43, p42, p38] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #58 STORE_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #61 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #64 LOAD_ATTR', 1) +p67 = getfield_gc(p10, descr=<GcPtrFieldDescr pypy.objspace.std.mapdict.W_ObjectObjectSize5.inst__value1 16>) +guard_nonnull_class(p67, ConstClass(W_IntObject), descr=<Guard262>) [p1, p0, p41, p67, p10, p3, p5, p33, p11, p12, p13, p14, p65, f64, f59, f55, i43, p42, p38] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #67 STORE_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #70 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #73 LOAD_ATTR', 1) +p69 = getfield_gc(p10, descr=<GcPtrFieldDescr pypy.objspace.std.mapdict.W_ObjectObjectSize5.inst__value4 40>) +guard_nonnull_class(p69, 19886912, descr=<Guard263>) [p1, p0, p41, p69, p10, p3, p5, p33, p11, p12, p13, p14, p67, p65, f64, f59, f55, i43, p42, p38] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #76 STORE_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #79 SETUP_LOOP', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #82 LOAD_GLOBAL', 1) +guard_value(p38, ConstPtr(ptr71), descr=<Guard264>) [p1, p0, p41, p38, p3, p5, p33, p10, p11, p12, p13, p14, p69, p67, p65, f64, f59, f55, i43, p42, None] +p73 = getfield_gc(p38, descr=<GcPtrFieldDescr pypy.objspace.std.dictmultiobject.W_DictMultiObject.inst_r_dict_content 8>) +guard_isnull(p73, descr=<Guard265>) [p1, p0, p41, p73, p38, p3, p5, p33, p10, p11, p12, p13, p14, p69, p67, p65, f64, f59, f55, i43, p42, None] +p75 = getfield_gc(ConstPtr(ptr74), descr=<GcPtrFieldDescr pypy.objspace.std.celldict.ModuleCell.inst_w_value 8>) +guard_isnull(p75, descr=<Guard266>) [p1, p0, p41, p75, p3, p5, p33, p10, p11, p12, p13, p14, p69, p67, p65, f64, f59, f55, i43, p42, None] +p77 = getfield_gc(ConstPtr(ptr76), descr=<GcPtrFieldDescr pypy.interpreter.module.Module.inst_w_dict 8>) +guard_value(p77, ConstPtr(ptr78), descr=<Guard267>) [p1, p0, p41, p77, p3, p5, p33, p10, p11, p12, p13, p14, p69, p67, p65, f64, f59, f55, i43, p42, None] +p79 = getfield_gc(p77, descr=<GcPtrFieldDescr pypy.objspace.std.dictmultiobject.W_DictMultiObject.inst_r_dict_content 8>) +guard_isnull(p79, descr=<Guard268>) [p1, p0, p41, p79, p77, p3, p5, p33, p10, p11, p12, p13, p14, p69, p67, p65, f64, f59, f55, i43, p42, None] +p81 = getfield_gc(ConstPtr(ptr80), descr=<GcPtrFieldDescr pypy.objspace.std.celldict.ModuleCell.inst_w_value 8>) +guard_value(p81, ConstPtr(ptr82), descr=<Guard269>) [p1, p0, p41, p81, p3, p5, p33, p10, p11, p12, p13, p14, p69, p67, p65, f64, f59, f55, i43, p42, None] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #85 LOAD_CONST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #88 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #91 LOAD_CONST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #94 BINARY_SUBTRACT', 1) +i83 = getfield_gc_pure(p65, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +i85 = int_sub_ovf(i83, 1) +guard_no_overflow(, descr=<Guard270>) [p1, p0, p41, p65, i85, p3, p5, p33, p10, p11, p12, p13, p14, p81, p69, p67, None, f64, f59, f55, i43, p42, None] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #95 CALL_FUNCTION', 1) +p87 = getfield_gc(ConstPtr(ptr86), descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_name 40>) +p88 = getfield_gc(ConstPtr(ptr86), descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_defs 32>) +i89 = getfield_gc_pure(p88, descr=<BoolFieldDescr pypy.interpreter.function.Defaults.inst_promote 16>) +guard_false(i89, descr=<Guard271>) [p1, p0, p41, p87, p88, p3, p5, p33, p10, p11, p12, p13, p14, i85, None, p69, p67, p65, f64, f59, f55, i43, p42, None] +p90 = getfield_gc_pure(p88, descr=<GcPtrFieldDescr pypy.interpreter.function.Defaults.inst_items 8>) +i91 = arraylen_gc(p90, descr=<GcPtrArrayDescr>) +i93 = int_sub(4, i91) +i95 = int_ge(3, i93) +guard_true(i95, descr=<Guard272>) [p1, p0, p41, p87, i93, p88, p3, p5, p33, p10, p11, p12, p13, p14, i85, None, p69, p67, p65, f64, f59, f55, i43, p42, None] +i96 = int_sub(3, i93) +i97 = getfield_gc_pure(p88, descr=<BoolFieldDescr pypy.interpreter.function.Defaults.inst_promote 16>) +guard_false(i97, descr=<Guard273>) [p1, p0, p41, p87, i96, i93, p88, p3, p5, p33, p10, p11, p12, p13, p14, i85, None, p69, p67, p65, f64, f59, f55, i43, p42, None] +p98 = getfield_gc_pure(p88, descr=<GcPtrFieldDescr pypy.interpreter.function.Defaults.inst_items 8>) +p99 = getarrayitem_gc(p98, i96, descr=<GcPtrArrayDescr>) +guard_class(p99, ConstClass(W_IntObject), descr=<Guard274>) [p1, p0, p41, p99, p3, p5, p33, p10, p11, p12, p13, p14, i85, None, p69, p67, p65, f64, f59, f55, i43, p42, None] +i101 = getfield_gc_pure(p99, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +i102 = int_is_zero(i101) +guard_false(i102, descr=<Guard275>) [p1, p0, p41, i101, i85, p3, p5, p33, p10, p11, p12, p13, p14, p99, None, None, p69, p67, p65, f64, f59, f55, i43, p42, None] +i104 = int_lt(i101, 0) +guard_false(i104, descr=<Guard276>) [p1, p0, p41, i101, i85, p3, p5, p33, p10, p11, p12, p13, p14, p99, None, None, p69, p67, p65, f64, f59, f55, i43, p42, None] +i106 = int_lt(1, i85) +guard_true(i106, descr=<Guard277>) [p1, p0, p41, i101, i85, p3, p5, p33, p10, p11, p12, p13, p14, p99, None, None, p69, p67, p65, f64, f59, f55, i43, p42, None] +i107 = int_sub(i85, 1) +i109 = int_sub(i107, 1) +i110 = uint_floordiv(i109, i101) +i112 = int_add(i110, 1) +i114 = int_lt(i112, 0) +guard_false(i114, descr=<Guard278>) [p1, p0, p41, i101, i112, p3, p5, p33, p10, p11, p12, p13, p14, p99, i85, None, p69, p67, p65, f64, f59, f55, i43, p42, None] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #98 GET_ITER', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #99 FOR_ITER', 1) +i116 = int_gt(i112, 0) +guard_true(i116, descr=<Guard279>) [p1, p0, p41, p3, p5, p33, p10, p11, p12, p13, p14, i112, i101, None, None, None, p69, p67, p65, f64, f59, f55, i43, p42, None] +i117 = int_add(1, i101) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #102 STORE_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #105 SETUP_LOOP', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #108 LOAD_GLOBAL', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #111 LOAD_CONST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #114 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #117 LOAD_CONST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #120 BINARY_SUBTRACT', 1) +i118 = getfield_gc_pure(p67, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +i120 = int_sub_ovf(i118, 1) +guard_no_overflow(, descr=<Guard280>) [p1, p0, p41, p67, i120, p3, p5, p33, p10, p11, p12, p13, p14, i110, i117, None, i101, None, None, None, p69, None, p65, f64, f59, f55, i43, p42, None] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #121 CALL_FUNCTION', 1) +i121 = getfield_gc_pure(p88, descr=<BoolFieldDescr pypy.interpreter.function.Defaults.inst_promote 16>) +guard_false(i121, descr=<Guard281>) [p1, p0, p41, p87, p88, p3, p5, p33, p10, p11, p12, p13, p14, i120, i110, i117, None, i101, None, None, None, p69, p67, p65, f64, f59, f55, i43, p42, None] +p122 = getfield_gc_pure(p88, descr=<GcPtrFieldDescr pypy.interpreter.function.Defaults.inst_items 8>) +i123 = arraylen_gc(p122, descr=<GcPtrArrayDescr>) +i125 = int_sub(4, i123) +i127 = int_ge(3, i125) +guard_true(i127, descr=<Guard282>) [p1, p0, p41, p87, i125, p88, p3, p5, p33, p10, p11, p12, p13, p14, i120, i110, i117, None, i101, None, None, None, p69, p67, p65, f64, f59, f55, i43, p42, None] +i128 = int_sub(3, i125) +i129 = getfield_gc_pure(p88, descr=<BoolFieldDescr pypy.interpreter.function.Defaults.inst_promote 16>) +guard_false(i129, descr=<Guard283>) [p1, p0, p41, p87, i128, i125, p88, p3, p5, p33, p10, p11, p12, p13, p14, i120, i110, i117, None, i101, None, None, None, p69, p67, p65, f64, f59, f55, i43, p42, None] +p130 = getfield_gc_pure(p88, descr=<GcPtrFieldDescr pypy.interpreter.function.Defaults.inst_items 8>) +p131 = getarrayitem_gc(p130, i128, descr=<GcPtrArrayDescr>) +guard_class(p131, ConstClass(W_IntObject), descr=<Guard284>) [p1, p0, p41, p131, p3, p5, p33, p10, p11, p12, p13, p14, i120, i110, i117, None, i101, None, None, None, p69, p67, p65, f64, f59, f55, i43, p42, None] +i133 = getfield_gc_pure(p131, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +i134 = int_is_zero(i133) +guard_false(i134, descr=<Guard285>) [p1, p0, p41, i133, i120, p3, p5, p33, p10, p11, p12, p13, p14, p131, None, i110, i117, None, i101, None, None, None, p69, p67, p65, f64, f59, f55, i43, p42, None] +i136 = int_lt(i133, 0) +guard_false(i136, descr=<Guard286>) [p1, p0, p41, i133, i120, p3, p5, p33, p10, p11, p12, p13, p14, p131, None, i110, i117, None, i101, None, None, None, p69, p67, p65, f64, f59, f55, i43, p42, None] +i138 = int_lt(1, i120) +guard_true(i138, descr=<Guard287>) [p1, p0, p41, i133, i120, p3, p5, p33, p10, p11, p12, p13, p14, p131, None, i110, i117, None, i101, None, None, None, p69, p67, p65, f64, f59, f55, i43, p42, None] +i139 = int_sub(i120, 1) +i141 = int_sub(i139, 1) +i142 = uint_floordiv(i141, i133) +i144 = int_add(i142, 1) +i146 = int_lt(i144, 0) +guard_false(i146, descr=<Guard288>) [p1, p0, p41, i133, i144, p3, p5, p33, p10, p11, p12, p13, p14, p131, i120, i110, i117, None, i101, None, None, None, p69, p67, p65, f64, f59, f55, i43, p42, None] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #124 GET_ITER', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #125 FOR_ITER', 1) +i148 = int_gt(i144, 0) +guard_true(i148, descr=<Guard289>) [p1, p0, p41, p3, p5, p33, p10, p11, p12, p13, p14, i144, i133, None, None, i110, i117, None, i101, None, None, None, p69, p67, p65, f64, f59, f55, i43, p42, None] +i149 = int_add(1, i133) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #128 STORE_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #131 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #134 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #137 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #140 BINARY_MULTIPLY', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #141 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #144 BINARY_ADD', 1) +i150 = int_add_ovf(i83, 1) +guard_no_overflow(, descr=<Guard290>) [p1, p0, p41, i150, p3, p5, p33, p10, p11, p12, p13, p14, i83, i149, i142, None, i133, None, None, i110, i117, None, i101, None, None, None, p69, p67, p65, f64, f59, f55, i43, p42, None] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #145 BINARY_SUBSCR', 1) +i151 = getfield_gc(p69, descr=<SignedFieldDescr pypy.module.array.interp_array.W_ArrayTyped.inst_len 32>) +i152 = int_lt(i150, i151) +guard_true(i152, descr=<Guard291>) [p1, p0, p41, p69, i150, p3, p5, p33, p10, p11, p12, p13, p14, None, i149, i142, None, i133, None, None, i110, i117, None, i101, None, None, None, None, p67, p65, f64, f59, f55, i43, p42, None] +i153 = getfield_gc(p69, descr=<NonGcPtrFieldDescr pypy.module.array.interp_array.W_ArrayTyped.inst_buffer 24>) +f154 = getarrayitem_raw(i153, i150, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #146 STORE_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #149 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #152 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #155 LOAD_CONST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #158 BINARY_SUBTRACT', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #159 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #162 BINARY_MULTIPLY', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #163 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #166 BINARY_ADD', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #167 BINARY_SUBSCR', 1) +f155 = getarrayitem_raw(i153, 1, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #168 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #171 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #174 LOAD_CONST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #177 BINARY_ADD', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #178 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #181 BINARY_MULTIPLY', 1) +i157 = int_mul_ovf(2, i83) +guard_no_overflow(, descr=<Guard292>) [p1, p0, p41, p65, i157, p3, p5, p33, p10, p11, p12, p13, p14, f154, f155, None, i149, i142, None, i133, None, None, i110, i117, None, i101, None, None, None, p69, p67, None, f64, f59, f55, i43, p42, None] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #182 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #185 BINARY_ADD', 1) +i158 = int_add_ovf(i157, 1) +guard_no_overflow(, descr=<Guard293>) [p1, p0, p41, i158, p3, p5, p33, p10, p11, p12, p13, p14, i157, f154, f155, None, i149, i142, None, i133, None, None, i110, i117, None, i101, None, None, None, p69, p67, p65, f64, f59, f55, i43, p42, None] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #186 BINARY_SUBSCR', 1) +i160 = int_lt(i158, 0) +guard_false(i160, descr=<Guard294>) [p1, p0, p41, p69, i158, i151, p3, p5, p33, p10, p11, p12, p13, p14, None, f154, f155, None, i149, i142, None, i133, None, None, i110, i117, None, i101, None, None, None, None, p67, p65, f64, f59, f55, i43, p42, None] +i161 = int_lt(i158, i151) +guard_true(i161, descr=<Guard295>) [p1, p0, p41, p69, i158, p3, p5, p33, p10, p11, p12, p13, p14, None, f154, f155, None, i149, i142, None, i133, None, None, i110, i117, None, i101, None, None, None, None, p67, p65, f64, f59, f55, i43, p42, None] +f162 = getarrayitem_raw(i153, i158, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #187 BINARY_ADD', 1) +f163 = float_add(f155, f162) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #188 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #191 BINARY_MULTIPLY', 1) +f164 = float_mul(f163, f59) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #192 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #195 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #198 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #201 BINARY_MULTIPLY', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #202 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #205 BINARY_ADD', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #206 LOAD_CONST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #209 BINARY_SUBTRACT', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #210 BINARY_SUBSCR', 1) +i165 = int_lt(i83, i151) +guard_true(i165, descr=<Guard296>) [p1, p0, p41, p69, i83, p3, p5, p33, p10, p11, p12, p13, p14, f164, None, f154, None, None, i149, i142, None, i133, None, None, i110, i117, None, i101, None, None, None, None, p67, p65, f64, f59, f55, i43, p42, None] +f166 = getarrayitem_raw(i153, i83, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #211 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #214 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #217 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #220 BINARY_MULTIPLY', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #221 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #224 BINARY_ADD', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #225 LOAD_CONST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #228 BINARY_ADD', 1) +i168 = int_add(i150, 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #229 BINARY_SUBSCR', 1) +i169 = int_lt(i168, i151) +guard_true(i169, descr=<Guard297>) [p1, p0, p41, p69, i168, p3, p5, p33, p10, p11, p12, p13, p14, f166, f164, None, f154, None, None, i149, i142, None, i133, None, None, i110, i117, None, i101, None, None, None, None, p67, p65, f64, f59, f55, i43, p42, None] +f170 = getarrayitem_raw(i153, i168, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #230 BINARY_ADD', 1) +f171 = float_add(f166, f170) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #231 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #234 BINARY_MULTIPLY', 1) +f172 = float_mul(f171, f55) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #235 BINARY_ADD', 1) +f173 = float_add(f164, f172) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #236 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #239 BINARY_MULTIPLY', 1) +f174 = float_mul(f173, f64) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #240 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #243 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #246 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #249 BINARY_MULTIPLY', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #250 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #253 BINARY_ADD', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #254 STORE_SUBSCR', 1) +setarrayitem_raw(i153, i150, f174, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #255 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #258 LOAD_GLOBAL', 1) +p176 = getfield_gc(ConstPtr(ptr175), descr=<GcPtrFieldDescr pypy.objspace.std.celldict.ModuleCell.inst_w_value 8>) +guard_nonnull_class(p176, ConstClass(Function), descr=<Guard298>) [p1, p0, p41, p176, p3, p5, p33, p10, p11, p12, p13, p14, None, None, None, f154, None, None, i149, i142, None, i133, None, None, i110, i117, None, i101, None, None, None, p69, p67, p65, f64, f59, f55, i43, p42, None] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #261 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #264 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #267 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #270 BINARY_MULTIPLY', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #271 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #274 BINARY_ADD', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #275 BINARY_SUBSCR', 1) +f178 = getarrayitem_raw(i153, i150, descr=<FloatArrayNoLengthDescr>) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #276 LOAD_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #279 BINARY_SUBTRACT', 1) +f179 = float_sub(f178, f154) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #280 CALL_FUNCTION', 1) +p180 = getfield_gc(p176, descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_code 24>) +guard_value(p180, ConstPtr(ptr181), descr=<Guard299>) [p1, p0, p41, p180, p176, p3, p5, p33, p10, p11, p12, p13, p14, f179, None, None, None, f154, None, None, i149, i142, None, i133, None, None, i110, i117, None, i101, None, None, None, p69, p67, p65, f64, f59, f55, i43, p42, None] +p182 = getfield_gc(p176, descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_w_func_globals 64>) +p183 = getfield_gc(p176, descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_closure 16>) +i184 = force_token() +debug_merge_point('<code object sqr, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 7> #0 LOAD_FAST', 2) +debug_merge_point('<code object sqr, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 7> #3 LOAD_FAST', 2) +debug_merge_point('<code object sqr, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 7> #6 BINARY_MULTIPLY', 2) +f185 = float_mul(f179, f179) +debug_merge_point('<code object sqr, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 7> #7 RETURN_VALUE', 2) +i186 = int_is_true(i45) +guard_false(i186, descr=<Guard300>) [p1, p0, p41, p3, p5, p33, p10, p11, p12, p13, p14, p182, i184, p176, f185, f179, None, None, None, f154, None, None, i149, i142, None, i133, None, None, i110, i117, None, i101, None, None, None, p69, p67, p65, f64, f59, f55, i43, p42, None] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #283 INPLACE_ADD', 1) +f188 = float_add(0.000000, f185) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #284 STORE_FAST', 1) +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #287 JUMP_ABSOLUTE', 1) +i190 = getfield_raw(38968960, descr=<SignedFieldDescr pypysig_long_struct.c_value 0>) +i192 = int_sub(i190, 100) +setfield_raw(38968960, i192, descr=<SignedFieldDescr pypysig_long_struct.c_value 0>) +i194 = int_lt(i192, 0) +guard_false(i194, descr=<Guard301>) [p1, p0, p41, p3, p5, p33, p10, p11, p12, p13, p14, f188, None, None, None, None, None, None, None, None, f154, None, None, i149, i142, None, i133, None, None, i110, i117, None, i101, None, None, None, p69, p67, p65, f64, f59, f55, i43, p42, None] +debug_merge_point('<code object time_step, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 34> #125 FOR_ITER', 1) +i195 = force_token() +p197 = new_with_vtable(19809200) +setfield_gc(p197, i43, descr=<SignedFieldDescr JitVirtualRef.virtual_token 8>) +setfield_gc(p41, p197, descr=<GcPtrFieldDescr pypy.interpreter.executioncontext.ExecutionContext.inst_topframeref 56>) +setfield_gc(p0, i195, descr=<SignedFieldDescr pypy.interpreter.pyframe.PyFrame.vable_token 24>) +p199 = new_with_vtable(19863424) +setfield_gc(p199, p42, descr=<GcPtrFieldDescr pypy.interpreter.pyframe.PyFrame.inst_f_backref 48>) +setfield_gc(p199, ConstPtr(ptr71), descr=<GcPtrFieldDescr pypy.interpreter.eval.Frame.inst_w_globals 8>) +setfield_gc(p199, 34, descr=<INTFieldDescr pypy.interpreter.pyframe.PyFrame.inst_f_lineno 144>) +setfield_gc(p199, ConstPtr(ptr37), descr=<GcPtrFieldDescr pypy.interpreter.pyframe.PyFrame.inst_pycode 112>) +p202 = new_array(8, descr=<GcPtrArrayDescr>) +p204 = new_with_vtable(19861240) +setfield_gc(p204, i117, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_current 8>) +setfield_gc(p204, i110, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_remaining 16>) +setfield_gc(p204, i101, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_step 24>) +setarrayitem_gc(p202, 0, p204, descr=<GcPtrArrayDescr>) +p207 = new_with_vtable(19861240) +setfield_gc(p207, i149, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_current 8>) +setfield_gc(p207, i142, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_remaining 16>) +setfield_gc(p207, i133, descr=<SignedFieldDescr pypy.module.__builtin__.functional.W_XRangeIterator.inst_step 24>) +setarrayitem_gc(p202, 1, p207, descr=<GcPtrArrayDescr>) +setfield_gc(p199, p202, descr=<GcPtrFieldDescr pypy.interpreter.pyframe.PyFrame.inst_valuestack_w 120>) +setfield_gc(p199, 125, descr=<SignedFieldDescr pypy.interpreter.pyframe.PyFrame.inst_last_instr 96>) +p211 = new_with_vtable(19865144) +setfield_gc(p211, 291, descr=<UnsignedFieldDescr pypy.interpreter.pyopcode.FrameBlock.inst_handlerposition 8>) +setfield_gc(p211, 1, descr=<SignedFieldDescr pypy.interpreter.pyopcode.FrameBlock.inst_valuestackdepth 24>) +p215 = new_with_vtable(19865144) +setfield_gc(p215, 295, descr=<UnsignedFieldDescr pypy.interpreter.pyopcode.FrameBlock.inst_handlerposition 8>) +setfield_gc(p211, p215, descr=<GcPtrFieldDescr pypy.interpreter.pyopcode.FrameBlock.inst_previous 16>) +setfield_gc(p199, p211, descr=<GcPtrFieldDescr pypy.interpreter.pyframe.PyFrame.inst_lastblock 104>) +p218 = new_array(11, descr=<GcPtrArrayDescr>) +setarrayitem_gc(p218, 0, p10, descr=<GcPtrArrayDescr>) +p221 = new_with_vtable(19800744) +setfield_gc(p221, f55, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +setarrayitem_gc(p218, 1, p221, descr=<GcPtrArrayDescr>) +p224 = new_with_vtable(19800744) +setfield_gc(p224, f59, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +setarrayitem_gc(p218, 2, p224, descr=<GcPtrArrayDescr>) +p227 = new_with_vtable(19800744) +setfield_gc(p227, f64, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +setarrayitem_gc(p218, 3, p227, descr=<GcPtrArrayDescr>) +p230 = new_with_vtable(19800744) +setfield_gc(p230, f188, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +setarrayitem_gc(p218, 4, p230, descr=<GcPtrArrayDescr>) +setarrayitem_gc(p218, 5, p65, descr=<GcPtrArrayDescr>) +setarrayitem_gc(p218, 6, p67, descr=<GcPtrArrayDescr>) +setarrayitem_gc(p218, 7, p69, descr=<GcPtrArrayDescr>) +p236 = new_with_vtable(ConstClass(W_IntObject)) +setfield_gc(p236, 1, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +setarrayitem_gc(p218, 8, p236, descr=<GcPtrArrayDescr>) +p239 = new_with_vtable(ConstClass(W_IntObject)) +setfield_gc(p239, 1, descr=<SignedFieldDescr pypy.objspace.std.intobject.W_IntObject.inst_intval 8>) +setarrayitem_gc(p218, 9, p239, descr=<GcPtrArrayDescr>) +p242 = new_with_vtable(19800744) +setfield_gc(p242, f154, descr=<FloatFieldDescr pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8>) +setarrayitem_gc(p218, 10, p242, descr=<GcPtrArrayDescr>) +setfield_gc(p199, p218, descr=<GcPtrFieldDescr pypy.interpreter.pyframe.PyFrame.inst_fastlocals_w 56>) +setfield_gc(p199, 2, descr=<SignedFieldDescr pypy.interpreter.pyframe.PyFrame.inst_valuestackdepth 128>) +p253 = call_assembler(p199, p41, ConstPtr(ptr37), p211, 2, ConstPtr(ptr245), 0, 125, p204, p207, ConstPtr(ptr247), ConstPtr(ptr248), ConstPtr(ptr249), ConstPtr(ptr250), ConstPtr(ptr251), ConstPtr(ptr252), p10, p221, p224, p227, p230, p65, p67, p69, p236, p239, p242, descr=<Loop1>) +guard_not_forced(, descr=<Guard302>) [p1, p0, p41, p199, p253, p197, p3, p5, p33, p10, p11, p12, p13, p14] +guard_no_exception(, descr=<Guard303>) [p1, p0, p41, p199, p253, p197, p3, p5, p33, p10, p11, p12, p13, p14] +p254 = getfield_gc(p41, descr=<GcPtrFieldDescr pypy.interpreter.executioncontext.ExecutionContext.inst_w_tracefunc 72>) +guard_isnull(p254, descr=<Guard304>) [p1, p0, p41, p253, p199, p254, p197, p3, p5, p33, p10, p11, p12, p13, p14] +i255 = ptr_eq(p199, p0) +guard_false(i255, descr=<Guard305>) [p1, p0, p41, p253, p199, p197, p3, p5, p33, p10, p11, p12, p13, p14] +i256 = getfield_gc(p41, descr=<NonGcPtrFieldDescr pypy.interpreter.executioncontext.ExecutionContext.inst_profilefunc 40>) +setfield_gc(p199, ConstPtr(ptr257), descr=<GcPtrFieldDescr pypy.interpreter.pyframe.PyFrame.inst_last_exception 88>) +i258 = int_is_true(i256) +guard_false(i258, descr=<Guard306>) [p1, p0, p253, p199, p41, p197, p3, p5, p33, p10, p11, p12, p13, p14] +p259 = getfield_gc(p199, descr=<GcPtrFieldDescr pypy.interpreter.pyframe.PyFrame.inst_f_backref 48>) +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #64 STORE_FAST', 0) +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #67 LOAD_FAST', 0) +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #70 LOAD_CONST', 0) +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #73 INPLACE_ADD', 0) +i261 = int_add(i26, 1) +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #74 STORE_FAST', 0) +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #77 JUMP_ABSOLUTE', 0) +i263 = getfield_raw(38968960, descr=<SignedFieldDescr pypysig_long_struct.c_value 0>) +i265 = int_sub(i263, 100) +setfield_raw(38968960, i265, descr=<SignedFieldDescr pypysig_long_struct.c_value 0>) +setfield_gc(p41, p259, descr=<GcPtrFieldDescr pypy.interpreter.executioncontext.ExecutionContext.inst_topframeref 56>) +setfield_gc(p197, p199, descr=<GcPtrFieldDescr JitVirtualRef.forced 16>) +setfield_gc(p197, -3, descr=<SignedFieldDescr JitVirtualRef.virtual_token 8>) +i268 = int_lt(i265, 0) +guard_false(i268, descr=<Guard307>) [p1, p0, p3, p5, p10, p11, p12, p253, i261] +debug_merge_point('<code object laplace_solve, file '/home/alex/projects/hack/benchmarks/laplace/laplace.py', line 52> #21 LOAD_FAST', 0) +jump(p0, p1, p3, p5, p10, p11, p12, p253, i261, f20, i23, i256, p41, p259, descr=<Loop2>) +[5ed74ff695c8] jit-log-opt-loop} +[5ed8737e9776] {jit-backend-counts +0:493724565 +1:2281802 +2:1283242 +3:993105 +4:2933 +5:2163 +6:2492 +7:1799 +8:963 +9:36 +[5ed8737ee19c] jit-backend-counts} diff --git a/tests/examplefiles/test.rb b/tests/examplefiles/test.rb index 1f609e32..8ac102e6 100644 --- a/tests/examplefiles/test.rb +++ b/tests/examplefiles/test.rb @@ -10,6 +10,9 @@ while x<10000 g=%w{} x=0 +#leere regex +test //, 123 + while x<100 puts"#{g[x]}" x+=1 diff --git a/tests/old_run.py b/tests/old_run.py index 2d6fc368..ae410146 100644 --- a/tests/old_run.py +++ b/tests/old_run.py @@ -8,7 +8,7 @@ python run.py [testfile ...] - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/run.py b/tests/run.py index 954f6f78..c803e276 100644 --- a/tests/run.py +++ b/tests/run.py @@ -8,7 +8,7 @@ python run.py [testfile ...] - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_basic_api.py b/tests/test_basic_api.py index 77c0aaea..02261d24 100644 --- a/tests/test_basic_api.py +++ b/tests/test_basic_api.py @@ -3,7 +3,7 @@ Pygments basic API tests ~~~~~~~~~~~~~~~~~~~~~~~~ - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -42,6 +42,8 @@ def test_lexer_classes(): "%s: %s attribute wrong" % (cls, attr) result = cls.analyse_text("abc") assert isinstance(result, float) and 0.0 <= result <= 1.0 + result = cls.analyse_text(".abc") + assert isinstance(result, float) and 0.0 <= result <= 1.0 inst = cls(opt1="val1", opt2="val2") if issubclass(cls, RegexLexer): @@ -55,6 +57,9 @@ def test_lexer_classes(): assert 'root' in cls._tokens, \ '%s has no root state' % cls + if cls.name == 'XQuery': # XXX temporary + return + tokens = list(inst.get_tokens(test_content)) txt = "" for token in tokens: @@ -115,6 +120,15 @@ def test_get_lexers(): ]: yield verify, func, args + for cls, (_, lname, aliases, _, mimetypes) in lexers.LEXERS.iteritems(): + assert cls == lexers.find_lexer_class(lname).__name__ + + for alias in aliases: + assert cls == lexers.get_lexer_by_name(alias).__class__.__name__ + + for mimetype in mimetypes: + assert cls == lexers.get_lexer_for_mimetype(mimetype).__class__.__name__ + def test_formatter_public_api(): ts = list(lexers.PythonLexer().get_tokens("def f(): pass")) diff --git a/tests/test_clexer.py b/tests/test_clexer.py index c172116c..996f7038 100644 --- a/tests/test_clexer.py +++ b/tests/test_clexer.py @@ -3,7 +3,7 @@ Basic CLexer Test ~~~~~~~~~~~~~~~~~ - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_cmdline.py b/tests/test_cmdline.py index 15134607..00baef3b 100644 --- a/tests/test_cmdline.py +++ b/tests/test_cmdline.py @@ -3,7 +3,7 @@ Command line test ~~~~~~~~~~~~~~~~~ - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_examplefiles.py b/tests/test_examplefiles.py index 877cbecf..e5dbcf4c 100644 --- a/tests/test_examplefiles.py +++ b/tests/test_examplefiles.py @@ -3,7 +3,7 @@ Pygments tests with example files ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -64,6 +64,8 @@ def check_lexer(lx, absfn, outfn): (lx, absfn) tokens.append((type, val)) if u''.join(ntext) != text: + print '\n'.join(difflib.unified_diff(u''.join(ntext).splitlines(), + text.splitlines())) raise AssertionError('round trip failed for ' + absfn) # check output against previous run if enabled diff --git a/tests/test_html_formatter.py b/tests/test_html_formatter.py index ae54b919..5a506755 100644 --- a/tests/test_html_formatter.py +++ b/tests/test_html_formatter.py @@ -3,7 +3,7 @@ Pygments HTML formatter tests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_latex_formatter.py b/tests/test_latex_formatter.py index dc8231be..501eb198 100644 --- a/tests/test_latex_formatter.py +++ b/tests/test_latex_formatter.py @@ -3,7 +3,7 @@ Pygments LaTeX formatter tests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_regexlexer.py b/tests/test_regexlexer.py index f9c1b7ac..e0f167ab 100644 --- a/tests/test_regexlexer.py +++ b/tests/test_regexlexer.py @@ -3,7 +3,7 @@ Pygments regex lexer tests ~~~~~~~~~~~~~~~~~~~~~~~~~~ - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_token.py b/tests/test_token.py index 9a836845..d7abd218 100644 --- a/tests/test_token.py +++ b/tests/test_token.py @@ -3,7 +3,7 @@ Test suite for the token module ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_using_api.py b/tests/test_using_api.py index 3d824f51..b1b6877d 100644 --- a/tests/test_using_api.py +++ b/tests/test_using_api.py @@ -3,7 +3,7 @@ Pygments tests for using() ~~~~~~~~~~~~~~~~~~~~~~~~~~ - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_util.py b/tests/test_util.py index b0fc2579..0876cf70 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -3,7 +3,7 @@ Test suite for the util module ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ |