update code and new tag color
authorfuture_wave <future_wave>
Thu, 1 Aug 2002 07:57:01 +0000 (07:57 +0000)
committerfuture_wave <future_wave>
Thu, 1 Aug 2002 07:57:01 +0000 (07:57 +0000)
13 files changed:
net.sourceforge.phpeclipse/.classpath
net.sourceforge.phpeclipse/plugin.xml
net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/editors/ColorManager.java
net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/editors/IPHPColorConstants.java
net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/editors/NonRuleBasedDamagerRepairer.java [deleted file]
net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/editors/PHPConfiguration.java
net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/editors/PHPDocumentProvider.java [deleted file]
net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/editors/PHPDoubleClickStrategy.java [deleted file]
net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/editors/PHPEditor.java
net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/editors/PHPPartitionScanner.java
net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/editors/PHPScanner.java
net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/editors/PHPTagScanner.java [deleted file]
net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/editors/TagRule.java

index 1639ffb..bd48ce5 100644 (file)
@@ -3,16 +3,21 @@
     <classpathentry kind="src" path="src/"/>
     <classpathentry kind="var"
         path="ECLIPSE_HOME/plugins/org.eclipse.core.resources_2.0.0/resources.jar" sourcepath="_ORG_ECLIPSE_PLATFORM_SOURCE/org.eclipse.core.resources_2.0.0/resourcessrc.zip"/>
+    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.core.resources.nl1_2.0.0/nl1.jar"/>
     <classpathentry kind="var"
         path="ECLIPSE_HOME/plugins/org.eclipse.ui_2.0.0/workbench.jar" sourcepath="_ORG_ECLIPSE_PLATFORM_SOURCE/org.eclipse.ui_2.0.0/workbenchsrc.zip"/>
     <classpathentry kind="var"
         path="ECLIPSE_HOME/plugins/org.eclipse.ui.win32_2.0.0/workbenchwin32.jar" sourcepath="_ORG_ECLIPSE_PLATFORM_WIN32_SOURCE/org.eclipse.ui.win32_2.0.0/workbenchwin32src.zip"/>
+    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.ui.nl1_2.0.0/nl1.jar"/>
     <classpathentry kind="var"
         path="ECLIPSE_HOME/plugins/org.eclipse.swt.win32_2.0.0/ws/win32/swt.jar" sourcepath="_ORG_ECLIPSE_PLATFORM_WIN32_SOURCE/org.eclipse.swt.win32_2.0.0/ws/win32/swtsrc.zip"/>
+    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.swt.nl1_2.0.0/nl1.jar"/>
     <classpathentry kind="var"
         path="ECLIPSE_HOME/plugins/org.eclipse.core.runtime_2.0.0/runtime.jar" sourcepath="_ORG_ECLIPSE_PLATFORM_SOURCE/org.eclipse.core.runtime_2.0.0/runtimesrc.zip"/>
+    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.core.runtime.nl1_2.0.0/nl1.jar"/>
     <classpathentry kind="var"
         path="ECLIPSE_HOME/plugins/org.eclipse.core.boot_2.0.0/boot.jar" sourcepath="_ORG_ECLIPSE_PLATFORM_SOURCE/org.eclipse.core.boot_2.0.0/bootsrc.zip"/>
+    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.core.boot.nl1_2.0.0/nl1.jar"/>
     <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
     <classpathentry kind="output" path="bin"/>
 </classpath>
index 98341d8..5daa183 100644 (file)
@@ -1,18 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<plugin
-   id="net.sourceforge.phpeclipse"
-   name="Phpeclipse Plug-in"
-   version="0.0.1"
-   provider-name="phpeclipse"
-   class="net.sourceforge.phpeclipse.PhpeclipsePlugin">
-
+<plugin id="PHPEclipse" name="Plug-in PHP for Eclipse" version="1.0.0" provider-name="" class="net.sourceforge.phpeclipse.pluginPHP">
    <runtime>
-      <library name="phpeclipse.jar"/>
+      <library name="PHPEclipse.jar"/>
    </runtime>
    <requires>
       <import plugin="org.eclipse.core.resources"/>
       <import plugin="org.eclipse.ui"/>
    </requires>
-
-
+   <extension point="org.eclipse.ui.editors">
+      <editor name="Editor PHP" extensions="php" icon="icons/sample.gif" contributorClass="org.eclipse.ui.texteditor.BasicTextEditorActionContributor" class="net.sourceforge.phpeclipse.editors.PHPEditor" id="net.sourceforge.phpeclipse.editors.PHPEditor"/>
+   </extension>
 </plugin>
index 0a5c492..7bcdd21 100644 (file)
@@ -8,18 +8,22 @@ import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.RGB;
 import org.eclipse.swt.widgets.Display;
 
-public class ColorManager {
+public class ColorManager
+{
 
        protected Map fColorTable = new HashMap(10);
 
-       public void dispose() {
+       public void dispose()
+       {
                Iterator e = fColorTable.values().iterator();
                while (e.hasNext())
                         ((Color) e.next()).dispose();
        }
-       public Color getColor(RGB rgb) {
+       public Color getColor(RGB rgb)
+       {
                Color color = (Color) fColorTable.get(rgb);
-               if (color == null) {
+               if (color == null)
+               {
                        color = new Color(Display.getCurrent(), rgb);
                        fColorTable.put(rgb, color);
                }
index 1310050..4ec6924 100644 (file)
@@ -2,19 +2,19 @@ package net.sourceforge.phpeclipse.editors;
 
 import org.eclipse.swt.graphics.RGB;
 
-//todo: make the colors configurable
-
 public interface IPHPColorConstants {
-       RGB XML_COMMENT = new RGB(128, 0, 0);
-       RGB PROC_INSTR = new RGB(128, 128, 128);
-       RGB STRING = new RGB(0, 128, 0);
-       RGB DEFAULT = new RGB(0, 0, 0);
-       RGB PHP_TAG = new RGB(0, 0, 128);
-
-       RGB HTML = new RGB(9, 148, 255);
-
-       RGB PHP_DEFAULT = new RGB(255, 154, 9);
-       RGB PHP_COMMENT = new RGB(227, 22, 22);
-       RGB PHP_STRING = new RGB(51, 167, 30);
-       RGB PHP_FUNCTION = new RGB(255, 100, 10);
+       RGB XML_COMMENT =       new RGB(128,   0,   0);
+       RGB PROC_INSTR =        new RGB(128, 128, 128);
+       RGB STRING=             new RGB(  0, 128,   0);
+       RGB DEFAULT=            new RGB(  0,   0,   0);
+       RGB PHP_TAG=                new RGB(  0,   0, 128);
+       
+       RGB HTML =                              new RGB(  9, 148, 255);
+       
+       RGB PHP_DEFAULT =               new RGB(255, 154,   9);
+       RGB PHP_COMMENT =               new RGB(  0,   0, 255); 
+       RGB PHP_STRING =                new RGB( 51, 167,  30);
+       RGB PHP_FONCTION =              new RGB(255, 100,  10);
+       RGB PHP_OPERATOR =              new RGB(255, 200,  00);
+       RGB PHP_VARIABLE =              new RGB(227,  22,  22);
 }
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/editors/NonRuleBasedDamagerRepairer.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/editors/NonRuleBasedDamagerRepairer.java
deleted file mode 100644 (file)
index b4e077b..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-package net.sourceforge.phpeclipse.editors;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.DocumentEvent;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITypedRegion;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.TextPresentation;
-import org.eclipse.jface.text.presentation.IPresentationDamager;
-import org.eclipse.jface.text.presentation.IPresentationRepairer;
-import org.eclipse.jface.util.Assert;
-import org.eclipse.swt.custom.StyleRange;
-
-public class NonRuleBasedDamagerRepairer
-       implements IPresentationDamager, IPresentationRepairer {
-
-       /** The document this object works on */
-       protected IDocument fDocument;
-       /** The default text attribute if non is returned as data by the current token */
-       protected TextAttribute fDefaultTextAttribute;
-
-       /**
-        * Constructor for NonRuleBasedDamagerRepairer.
-        */
-       public NonRuleBasedDamagerRepairer(TextAttribute defaultTextAttribute) {
-               Assert.isNotNull(defaultTextAttribute);
-
-               fDefaultTextAttribute = defaultTextAttribute;
-       }
-
-       /**
-        * @see IPresentationRepairer#setDocument(IDocument)
-        */
-       public void setDocument(IDocument document) {
-               fDocument = document;
-       }
-
-       /**
-        * Returns the end offset of the line that contains the specified offset or
-        * if the offset is inside a line delimiter, the end offset of the next line.
-        *
-        * @param offset the offset whose line end offset must be computed
-        * @return the line end offset for the given offset
-        * @exception BadLocationException if offset is invalid in the current document
-        */
-       protected int endOfLineOf(int offset) throws BadLocationException {
-
-               IRegion info = fDocument.getLineInformationOfOffset(offset);
-               if (offset <= info.getOffset() + info.getLength())
-                       return info.getOffset() + info.getLength();
-
-               int line = fDocument.getLineOfOffset(offset);
-               try {
-                       info = fDocument.getLineInformation(line + 1);
-                       return info.getOffset() + info.getLength();
-               } catch (BadLocationException x) {
-                       return fDocument.getLength();
-               }
-       }
-
-       /**
-        * @see IPresentationDamager#getDamageRegion(ITypedRegion, DocumentEvent, boolean)
-        */
-       public IRegion getDamageRegion(
-               ITypedRegion partition,
-               DocumentEvent event,
-               boolean documentPartitioningChanged) {
-               if (!documentPartitioningChanged) {
-                       try {
-
-                               IRegion info =
-                                       fDocument.getLineInformationOfOffset(event.getOffset());
-                               int start = Math.max(partition.getOffset(), info.getOffset());
-
-                               int end =
-                                       event.getOffset()
-                                               + (event.getText() == null
-                                                       ? event.getLength()
-                                                       : event.getText().length());
-
-                               if (info.getOffset() <= end
-                                       && end <= info.getOffset() + info.getLength()) {
-                                       // optimize the case of the same line
-                                       end = info.getOffset() + info.getLength();
-                               } else
-                                       end = endOfLineOf(end);
-
-                               end =
-                                       Math.min(
-                                               partition.getOffset() + partition.getLength(),
-                                               end);
-                               return new Region(start, end - start);
-
-                       } catch (BadLocationException x) {
-                       }
-               }
-
-               return partition;
-       }
-
-       /**
-        * @see IPresentationRepairer#createPresentation(TextPresentation, ITypedRegion)
-        */
-       public void createPresentation(
-               TextPresentation presentation,
-               ITypedRegion region) {
-               addRange(
-                       presentation,
-                       region.getOffset(),
-                       region.getLength(),
-                       fDefaultTextAttribute);
-       }
-
-       /**
-        * Adds style information to the given text presentation.
-        *
-        * @param presentation the text presentation to be extended
-        * @param offset the offset of the range to be styled
-        * @param length the length of the range to be styled
-        * @param attr the attribute describing the style of the range to be styled
-        */
-       protected void addRange(
-               TextPresentation presentation,
-               int offset,
-               int length,
-               TextAttribute attr) {
-               if (attr != null)
-                       presentation.addStyleRange(
-                               new StyleRange(
-                                       offset,
-                                       length,
-                                       attr.getForeground(),
-                                       attr.getBackground(),
-                                       attr.getStyle()));
-       }
-}
\ No newline at end of file
index 508ae00..249318a 100644 (file)
@@ -10,72 +10,52 @@ import org.eclipse.jface.text.rules.Token;
 import org.eclipse.jface.text.source.ISourceViewer;
 import org.eclipse.jface.text.source.SourceViewerConfiguration;
 
-public class PHPConfiguration extends SourceViewerConfiguration {
-       private PHPDoubleClickStrategy doubleClickStrategy;
-       private PHPTagScanner tagScanner;
+public class PHPConfiguration extends SourceViewerConfiguration
+{
        private PHPScanner scanner;
        private ColorManager colorManager;
 
-       public PHPConfiguration(ColorManager colorManager) {
+       public PHPConfiguration(ColorManager colorManager)
+       {
                this.colorManager = colorManager;
        }
-       public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
+       public String[] getConfiguredContentTypes(ISourceViewer sourceViewer)
+       {
                return new String[] {
                        IDocument.DEFAULT_CONTENT_TYPE,
                        PHPPartitionScanner.HTML_COMMENT,
                        PHPPartitionScanner.HTML_TAG };
        }
-       public ITextDoubleClickStrategy getDoubleClickStrategy(
-               ISourceViewer sourceViewer,
-               String contentType) {
-               if (doubleClickStrategy == null)
-                       doubleClickStrategy = new PHPDoubleClickStrategy();
-               return doubleClickStrategy;
-       }
 
-       protected PHPScanner getXMLScanner() {
-               if (scanner == null) {
+       protected PHPScanner getXMLScanner()
+       {
+               if (scanner == null)
+               {
                        scanner = new PHPScanner(colorManager);
-                       scanner.setDefaultReturnToken(
-                               new Token(
-                                       new TextAttribute(
-                                               colorManager.getColor(IPHPColorConstants.DEFAULT))));
+                       scanner.setDefaultReturnToken(new Token(new TextAttribute(colorManager.getColor(IPHPColorConstants.DEFAULT))));
                }
                return scanner;
-
+       
+       
        }
+       
+       
 
-       protected PHPTagScanner getXMLTagScanner() {
-               if (tagScanner == null) {
-                       tagScanner = new PHPTagScanner(colorManager);
-                       tagScanner.setDefaultReturnToken(
-                               new Token(
-                                       new TextAttribute(
-                                               colorManager.getColor(IPHPColorConstants.PHP_TAG))));
-               }
-               return tagScanner;
-       }
 
-       public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
+       public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer)
+       {
                PresentationReconciler reconciler = new PresentationReconciler();
 
                DefaultDamagerRepairer dr =
-                       new DefaultDamagerRepairer(getXMLTagScanner());
-               reconciler.setDamager(dr, PHPPartitionScanner.HTML_TAG);
-               reconciler.setRepairer(dr, PHPPartitionScanner.HTML_TAG);
-
-               dr = new DefaultDamagerRepairer(getXMLScanner());
+               new DefaultDamagerRepairer(getXMLScanner());
                reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
                reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
 
-               NonRuleBasedDamagerRepairer ndr =
-                       new NonRuleBasedDamagerRepairer(
-                               new TextAttribute(
-                                       colorManager.getColor(IPHPColorConstants.XML_COMMENT)));
-               reconciler.setDamager(ndr, PHPPartitionScanner.HTML_COMMENT);
-               reconciler.setRepairer(ndr, PHPPartitionScanner.HTML_COMMENT);
-
                return reconciler;
        }
+       
+       
+       
+
+}
 
-}
\ No newline at end of file
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/editors/PHPDocumentProvider.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/editors/PHPDocumentProvider.java
deleted file mode 100644 (file)
index 5bffbd3..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-package net.sourceforge.phpeclipse.editors;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IDocumentPartitioner;
-import org.eclipse.jface.text.rules.DefaultPartitioner;
-import org.eclipse.ui.editors.text.FileDocumentProvider;
-
-public class PHPDocumentProvider extends FileDocumentProvider {
-
-       /**
-        * Constructor for XMLDocumentProvider.
-        */
-       public PHPDocumentProvider() {
-               super();
-       }
-
-       /* (non-Javadoc)
-        * Method declared on AbstractDocumentProvider
-        */
-       protected IDocument createDocument(Object element) throws CoreException {
-               IDocument document = super.createDocument(element);
-               if (document != null) {
-                       IDocumentPartitioner partitioner =
-                               new DefaultPartitioner(
-                                       new PHPPartitionScanner(),
-                                       new String[] {
-                                               PHPPartitionScanner.HTML_TAG,
-                                               PHPPartitionScanner.HTML_COMMENT });
-                       partitioner.connect(document);
-                       document.setDocumentPartitioner(partitioner);
-               }
-               return document;
-       }
-}
\ No newline at end of file
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/editors/PHPDoubleClickStrategy.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/editors/PHPDoubleClickStrategy.java
deleted file mode 100644 (file)
index 5f74b2d..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-package net.sourceforge.phpeclipse.editors;
-
-import org.eclipse.jface.text.*;
-
-public class PHPDoubleClickStrategy implements ITextDoubleClickStrategy {
-       protected ITextViewer fText;
-
-       public PHPDoubleClickStrategy() {
-               super();
-       }
-       public void doubleClicked(ITextViewer part) {
-               int pos = part.getSelectedRange().x;
-
-               if (pos < 0)
-                       return;
-
-               fText = part;
-
-               if (!selectComment(pos)) {
-                       selectWord(pos);
-               }
-       }
-       protected boolean selectComment(int caretPos) {
-               IDocument doc = fText.getDocument();
-               int startPos, endPos;
-
-               try {
-                       int pos = caretPos;
-                       char c = ' ';
-
-                       while (pos >= 0) {
-                               c = doc.getChar(pos);
-                               if (c == '\\') {
-                                       pos -= 2;
-                                       continue;
-                               }
-                               if (c == Character.LINE_SEPARATOR || c == '\"')
-                                       break;
-                               --pos;
-                       }
-
-                       if (c != '\"')
-                               return false;
-
-                       startPos = pos;
-
-                       pos = caretPos;
-                       int length = doc.getLength();
-                       c = ' ';
-
-                       while (pos < length) {
-                               c = doc.getChar(pos);
-                               if (c == Character.LINE_SEPARATOR || c == '\"')
-                                       break;
-                               ++pos;
-                       }
-                       if (c != '\"')
-                               return false;
-
-                       endPos = pos;
-
-                       int offset = startPos + 1;
-                       int len = endPos - offset;
-                       fText.setSelectedRange(offset, len);
-                       return true;
-               } catch (BadLocationException x) {
-               }
-
-               return false;
-       }
-       protected boolean selectWord(int caretPos) {
-
-               IDocument doc = fText.getDocument();
-               int startPos, endPos;
-
-               try {
-
-                       int pos = caretPos;
-                       char c;
-
-                       while (pos >= 0) {
-                               c = doc.getChar(pos);
-                               if (!Character.isJavaIdentifierPart(c))
-                                       break;
-                               --pos;
-                       }
-
-                       startPos = pos;
-
-                       pos = caretPos;
-                       int length = doc.getLength();
-
-                       while (pos < length) {
-                               c = doc.getChar(pos);
-                               if (!Character.isJavaIdentifierPart(c))
-                                       break;
-                               ++pos;
-                       }
-
-                       endPos = pos;
-                       selectRange(startPos, endPos);
-                       return true;
-
-               } catch (BadLocationException x) {
-               }
-
-               return false;
-       }
-
-       private void selectRange(int startPos, int stopPos) {
-               int offset = startPos + 1;
-               int length = stopPos - offset;
-               fText.setSelectedRange(offset, length);
-       }
-}
\ No newline at end of file
index 4374413..e0d5911 100644 (file)
@@ -6,17 +6,17 @@ public class PHPEditor extends TextEditor {
 
        private ColorManager colorManager;
        /**
-        * Constructor for PHPEditor.
+        * Constructor for SampleEditor.
         */
        public PHPEditor() {
                super();
                colorManager = new ColorManager();
                setSourceViewerConfiguration(new PHPConfiguration(colorManager));
-               setDocumentProvider(new PHPDocumentProvider());
+
        }
        public void dispose() {
                colorManager.dispose();
                super.dispose();
        }
-
+       
 }
index 5c56abf..61e7a31 100644 (file)
@@ -1,3 +1,4 @@
+
 package net.sourceforge.phpeclipse.editors;
 
 import java.util.ArrayList;
@@ -16,17 +17,17 @@ public class PHPPartitionScanner extends RuleBasedPartitionScanner {
 
                List rules = new ArrayList();
 
-               IToken php_tag = new Token(HTML_TAG);
-               IToken php_comment = new Token(PHP_COMMENT);
+               IToken php_tag      = new Token(HTML_TAG);
+               IToken php_comment  = new Token(PHP_COMMENT);
                IToken html_comment = new Token(HTML_COMMENT);
 
                rules.add(new MultiLineRule("<!--", "-->", html_comment));
                rules.add(new MultiLineRule("/*", "*/", php_comment));
                rules.add(new MultiLineRule("<script", "script>", php_tag));
+               
+//             rules.add(new TagRule(tag));
 
-               //              rules.add(new TagRule(tag));
-
-               IPredicateRule[] result = new IPredicateRule[rules.size()];
+               IPredicateRule[] result= new IPredicateRule[rules.size()];
                rules.toArray(result);
                setPredicateRules(result);
        }
index e144169..b46005d 100644 (file)
@@ -1,59 +1,30 @@
 package net.sourceforge.phpeclipse.editors;
 
-import java.util.ArrayList;
-import java.util.List;
 
+import java.awt.font.*;
+import java.util.*;
+import org.eclipse.jface.text.rules.*;
+import sun.awt.font.NewArabicShaping;
+import org.eclipse.jface.text.rules.*;
 import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.rules.IRule;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.RuleBasedScanner;
-import org.eclipse.jface.text.rules.SingleLineRule;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.text.rules.WhitespaceRule;
-import org.eclipse.jface.text.rules.WordRule;
 import org.eclipse.swt.SWT;
 
-public class PHPScanner extends RuleBasedScanner {
 
-       public PHPScanner(ColorManager manager) {
-               List rules = new ArrayList();
-               IToken procInstr =
-                       new Token(
-                               new TextAttribute(
-                                       manager.getColor(IPHPColorConstants.PROC_INSTR)));
-
-               ColorManager colors = new ColorManager();
+public class PHPScanner extends RuleBasedScanner
+{
 
-               IToken php_string =
-                       new Token(
-                               new TextAttribute(
-                                       colors.getColor(IPHPColorConstants.PHP_STRING),
-                                       null,
-                                       SWT.DEFAULT));
-               IToken php_default =
-                       new Token(
-                               new TextAttribute(
-                                       colors.getColor(IPHPColorConstants.PHP_DEFAULT),
-                                       null,
-                                       SWT.BOLD));
-               IToken php_tag =
-                       new Token(
-                               new TextAttribute(
-                                       colors.getColor(IPHPColorConstants.PHP_TAG),
-                                       null,
-                                       SWT.DEFAULT));
-               IToken php_comment =
-                       new Token(
-                               new TextAttribute(
-                                       colors.getColor(IPHPColorConstants.PHP_COMMENT),
-                                       null,
-                                       SWT.DEFAULT));
-               IToken php_function =
-                       new Token(
-                               new TextAttribute(
-                                       colors.getColor(IPHPColorConstants.PHP_FUNCTION),
-                                       null,
-                                       SWT.BOLD));
+       public PHPScanner(ColorManager manager)
+       {
+               List rules = new ArrayList();
+               IToken procInstr =new Token(new TextAttribute(manager.getColor(IPHPColorConstants.PROC_INSTR)));
+               
+               IToken php_string   = new Token(new TextAttribute(manager.getColor(IPHPColorConstants.PHP_STRING), null, SWT.DEFAULT) );
+               IToken php_default  = new Token(new TextAttribute(manager.getColor(IPHPColorConstants.PHP_DEFAULT), null, SWT.BOLD) );
+               IToken php_tag      = new Token(new TextAttribute(manager.getColor(IPHPColorConstants.PHP_TAG), null, SWT.DEFAULT) );
+       IToken php_comment  = new Token(new TextAttribute(manager.getColor(IPHPColorConstants.PHP_COMMENT), null, SWT.DEFAULT) );
+       IToken php_fonction = new Token(new TextAttribute(manager.getColor(IPHPColorConstants.PHP_FONCTION), null, SWT.BOLD) );
+               IToken php_operator = new Token(new TextAttribute(manager.getColor(IPHPColorConstants.PHP_OPERATOR))); 
+               IToken php_variable     = new Token(new TextAttribute(manager.getColor(IPHPColorConstants.PHP_VARIABLE)));
 
                //Add rule for processing instructions
                rules.add(new SingleLineRule("<?", "?>", php_tag));
@@ -63,637 +34,639 @@ public class PHPScanner extends RuleBasedScanner {
                rules.add(new SingleLineRule("'", "'", php_string));
                rules.add(new SingleLineRule("//", "//", php_comment));
 
+//             rules.add(new SingleLineRule("[", "]", php_operator));
+//             rules.add(new SingleLineRule("(", ")", php_operator));
+               
                //
-               WordRule rule = new WordRule(new WordDetector());
-               rule.addWord("if", php_default);
-               rule.addWord("else", php_default);
-               rule.addWord("elseif", php_default);
-               rule.addWord("while", php_default);
-               rule.addWord("do", php_default);
-               rule.addWord("for", php_default);
-               rule.addWord("foreach", php_default);
-               rule.addWord("break", php_default);
-               rule.addWord("continue", php_default);
-               rule.addWord("switch", php_default);
-               rule.addWord("declare", php_default);
-               rule.addWord("ticks", php_default);
-               rule.addWord("require", php_default);
-               rule.addWord("include", php_default);
-               rule.addWord("true", php_default);
-               rule.addWord("false", php_default);
+               WordRule rule = new WordRule( new WordDetector() );
+               rule.addWord( "if", php_default);
+               rule.addWord( "else", php_default);
+               rule.addWord( "elseif", php_default);
+               rule.addWord( "while", php_default);
+               rule.addWord( "do", php_default);
+               rule.addWord( "for", php_default);
+               rule.addWord( "foreach", php_default);
+               rule.addWord( "break", php_default);
+               rule.addWord( "continue", php_default);
+               rule.addWord( "switch", php_default);
+               rule.addWord( "declare", php_default);
+               rule.addWord( "ticks", php_default);
+               rule.addWord( "require", php_default);
+               rule.addWord( "include", php_default);
+               rule.addWord( "true", php_default);
+               rule.addWord( "false", php_default);
 
-               /*
-               rule.addWord( "abs", php_function);
-               rule.addWord( "acos", php_function);
-               rule.addWord( "addcslashes", php_function);
-               rule.addWord( "addslashes", php_function);
-               rule.addWord( "apache_lookup_uri", php_function);
-               rule.addWord( "apache_note", php_function);
-               rule.addWord( "array", php_function);
-               rule.addWord( "array_count_values", php_function);
-               rule.addWord( "array_diff", php_function);
-               rule.addWord( "array_filter", php_function);
-               rule.addWord( "array_flip", php_function);
-               rule.addWord( "array_intersect", php_function);
-               rule.addWord( "array_keys", php_function);
-               rule.addWord( "array_map", php_function);
-               rule.addWord( "array_merge", php_function);
-               rule.addWord( "array_merge_recursive", php_function);
-               rule.addWord( "array_multisort", php_function);
-               rule.addWord( "array_pad", php_function);
-               rule.addWord( "array_pop", php_function);
-               rule.addWord( "array_push", php_function);
-               rule.addWord( "array_rand", php_function);
-               rule.addWord( "array_reduce", php_function);
-               rule.addWord( "array_reverse", php_function);
-               rule.addWord( "array_search", php_function);
-               rule.addWord( "array_shift", php_function);
-               rule.addWord( "array_slice", php_function);
-               rule.addWord( "array_splice", php_function);
-               rule.addWord( "array_sum", php_function);
-               rule.addWord( "array_unique", php_function);
-               rule.addWord( "array_unshift", php_function);
-               rule.addWord( "array_values", php_function);
-               rule.addWord( "array_walk", php_function);
-               rule.addWord( "arsort", php_function);
-               rule.addWord( "ascii2ebcdic", php_function);
-               rule.addWord( "asin", php_function);
-               rule.addWord( "asort", php_function);
-               rule.addWord( "assert", php_function);
-               rule.addWord( "assert-options", php_function);
-               rule.addWord( "atan", php_function);
-               rule.addWord( "atan2", php_function);
-               rule.addWord( "base64_decode", php_function);
-               rule.addWord( "base64_encode", php_function);
-               rule.addWord( "base_convert", php_function);
-               rule.addWord( "basename", php_function);
-               rule.addWord( "bin2hex", php_function);
-               rule.addWord( "bindec", php_function);
-               rule.addWord( "call_user_method", php_function);
-               rule.addWord( "call_user_method_array", php_function);
-               rule.addWord( "ceil", php_function);
-               rule.addWord( "chdir", php_function);
-               rule.addWord( "checkdate", php_function);
-               rule.addWord( "checkdnsrr", php_function);
-               rule.addWord( "chgrp", php_function);
-               rule.addWord( "chmod", php_function);
-               rule.addWord( "chop", php_function);
-               rule.addWord( "chown", php_function);
-               rule.addWord( "chr", php_function);
-               rule.addWord( "chroot", php_function);
-               rule.addWord( "chunk_split", php_function);
-               rule.addWord( "class_exists", php_function);
-               rule.addWord( "clearstatcache", php_function);
-               rule.addWord( "closedir", php_function);
-               rule.addWord( "closelog", php_function);
-               rule.addWord( "compact", php_function);
-               rule.addWord( "connection_aborted", php_function);
-               rule.addWord( "connection_status", php_function);
-               rule.addWord( "connection_timeout", php_function);
-               rule.addWord( "constant", php_function);
-               rule.addWord( "convert_cyr_string", php_function);
-               rule.addWord( "copy", php_function);
-               rule.addWord( "cos", php_function);
-               rule.addWord( "count", php_function);
-               rule.addWord( "count_chars", php_function);
-               rule.addWord( "crc32", php_function);
-               rule.addWord( "crypt", php_function);
-               rule.addWord( "current", php_function);
-               rule.addWord( "date", php_function);
-               rule.addWord( "debugger_off", php_function);
-               rule.addWord( "debugger_on", php_function);
-               rule.addWord( "decbin", php_function);
-               rule.addWord( "dechex", php_function);
-               rule.addWord( "decoct", php_function);
-               rule.addWord( "define", php_function);
-               rule.addWord( "define_syslog_variables", php_function);
-               rule.addWord( "defined", php_function);
-               rule.addWord( "deg2rad", php_function);
-               rule.addWord( "delete", php_function);
-               rule.addWord( "die", php_function);
-               rule.addWord( "dir", php_function);
-               rule.addWord( "dirname", php_function);
-               rule.addWord( "disk_total_space", php_function);
-               rule.addWord( "diskfreespace", php_function);
-               rule.addWord( "dl", php_function);
-               rule.addWord( "doubleval", php_function);
-               rule.addWord( "each", php_function);
-               rule.addWord( "easter_date", php_function);
-               rule.addWord( "easter_days", php_function);
-               rule.addWord( "ebcdic2ascii", php_function);
-               rule.addWord( "echo", php_function);
-               rule.addWord( "empty", php_function);
-               rule.addWord( "end", php_function);
-               rule.addWord( "error_log", php_function);
-               rule.addWord( "error_reporting", php_function);
-               rule.addWord( "eval", php_function);
-               rule.addWord( "exit", php_function);
-               rule.addWord( "exp", php_function);
-               rule.addWord( "explode", php_function);
-               rule.addWord( "extension_loaded", php_function);
-               rule.addWord( "extract", php_function);
-               rule.addWord( "ezmlm_hash", php_function);
-               rule.addWord( "fclose", php_function);
-               rule.addWord( "feof", php_function);
-               rule.addWord( "fflush", php_function);
-               rule.addWord( "fgetc", php_function);
-               rule.addWord( "fgetcsv", php_function);
-               rule.addWord( "fgets", php_function);
-               rule.addWord( "fgetss", php_function);
-               rule.addWord( "file", php_function);
-               rule.addWord( "file_exists", php_function);
-               rule.addWord( "fileatime", php_function);
-               rule.addWord( "filectime", php_function);
-               rule.addWord( "filegroup", php_function);
-               rule.addWord( "fileinode", php_function);
-               rule.addWord( "filemtime", php_function);
-               rule.addWord( "fileowner", php_function);
-               rule.addWord( "fileperms", php_function);
-               rule.addWord( "filesize", php_function);
-               rule.addWord( "filetype", php_function);
-               rule.addWord( "flock", php_function);
-               rule.addWord( "floor", php_function);
-               rule.addWord( "flush", php_function);
-               rule.addWord( "fopen", php_function);
-               rule.addWord( "fpassthru", php_function);
-               rule.addWord( "fputs", php_function);
-               rule.addWord( "fread", php_function);
-               rule.addWord( "frenchtojd", php_function);
-               rule.addWord( "fscanf", php_function);
-               rule.addWord( "fseek", php_function);
-               rule.addWord( "fsockopen", php_function);
-               rule.addWord( "fstat", php_function);
-               rule.addWord( "ftell", php_function);
-               rule.addWord( "ftp_cdup", php_function);
-               rule.addWord( "ftp_chdir", php_function);
-               rule.addWord( "ftp_connect", php_function);
-               rule.addWord( "ftp_delete", php_function);
-               rule.addWord( "ftp_fget", php_function);
-               rule.addWord( "ftp_fput", php_function);
-               rule.addWord( "ftp_get", php_function);
-               rule.addWord( "ftp_login", php_function);
-               rule.addWord( "ftp_mdtm", php_function);
-               rule.addWord( "ftp_mkdir", php_function);
-               rule.addWord( "ftp_nlist", php_function);
-               rule.addWord( "ftp_pasv", php_function);
-               rule.addWord( "ftp_put", php_function);
-               rule.addWord( "ftp_pwd", php_function);
-               rule.addWord( "ftp_quit", php_function);
-               rule.addWord( "ftp_rawlist", php_function);
-               rule.addWord( "ftp_rename", php_function);
-               rule.addWord( "ftp_rmdir", php_function);
-               rule.addWord( "ftp_site", php_function);
-               rule.addWord( "ftp_size", php_function);
-               rule.addWord( "ftp_systype", php_function);
-               rule.addWord( "ftruncate", php_function);
-               rule.addWord( "fwrite", php_function);
-               rule.addWord( "get_browser", php_function);
-               rule.addWord( "get_cfg_var", php_function);
-               rule.addWord( "get_class", php_function);
-               rule.addWord( "get_class_methods", php_function);
-               rule.addWord( "get_class_vars", php_function);
-               rule.addWord( "get_current_user", php_function);
-               rule.addWord( "get_declared_classes", php_function);
-               rule.addWord( "get_defined_constants", php_function);
-               rule.addWord( "get_defined_vars", php_function);
-               rule.addWord( "get_extension_funcs", php_function);
-               rule.addWord( "get_html_translation_table", php_function);
-               rule.addWord( "get_included_files", php_function);
-               rule.addWord( "get_loaded_extensions", php_function);
-               rule.addWord( "get_magic_quotes_gpc", php_function);
-               rule.addWord( "get_magic_quotes_runtime", php_function);
-               rule.addWord( "get_meta_tags", php_function);
-               rule.addWord( "get_object_vars", php_function);
-               rule.addWord( "get_parent_class", php_function);
-               rule.addWord( "get_required_files", php_function);
-               rule.addWord( "get_resource_type", php_function);
-               rule.addWord( "getallheaders", php_function);
-               rule.addWord( "getcwd", php_function);
-               rule.addWord( "getdate", php_function);
-               rule.addWord( "getenv", php_function);
-               rule.addWord( "gethostbyaddr", php_function);
-               rule.addWord( "gethostbyname", php_function);
-               rule.addWord( "gethostbynamel", php_function);
-               rule.addWord( "getimagesize", php_function);
-               rule.addWord( "getlastmod", php_function);
-               rule.addWord( "getmxrr", php_function);
-               rule.addWord( "getmyinode", php_function);
-               rule.addWord( "getmypid", php_function);
-               rule.addWord( "getmyuid", php_function);
-               rule.addWord( "getprotobyname", php_function);
-               rule.addWord( "getprotobynumber", php_function);
-               rule.addWord( "getrandmax", php_function);
-               rule.addWord( "getrusage", php_function);
-               rule.addWord( "getservbyname", php_function);
-               rule.addWord( "getservbyport", php_function);
-               rule.addWord( "gettimeofday", php_function);
-               rule.addWord( "gettype", php_function);
-               rule.addWord( "gmdate", php_function);
-               rule.addWord( "gmmktime", php_function);
-               rule.addWord( "gmstrftime", php_function);
-               rule.addWord( "gregoriantojd", php_function);
-               rule.addWord( "header", php_function);
-               rule.addWord( "headers_sent", php_function);
-               rule.addWord( "hebrev", php_function);
-               rule.addWord( "hebrevc", php_function);
-               rule.addWord( "hexdec", php_function);
-               rule.addWord( "highlight_file", php_function);
-               rule.addWord( "highlight_string", php_function);
-               rule.addWord( "htmlentities", php_function);
-               rule.addWord( "htmlspecialchars", php_function);
-               rule.addWord( "ignore_user_abort", php_function);
-               rule.addWord( "imagealphablending", php_function);
-               rule.addWord( "imagearc", php_function);
-               rule.addWord( "imagechar", php_function);
-               rule.addWord( "imagecharup", php_function);
-               rule.addWord( "imagecolorallocate", php_function);
-               rule.addWord( "imagecolorat", php_function);
-               rule.addWord( "imagecolorclosest", php_function);
-               rule.addWord( "imagecolorclosestalpha", php_function);
-               rule.addWord( "imagecolordeallocate", php_function);
-               rule.addWord( "imagecolorexact", php_function);
-               rule.addWord( "imagecolorexactalpha", php_function);
-               rule.addWord( "imagecolorresolve", php_function);
-               rule.addWord( "imagecolorresolvealpha", php_function);
-               rule.addWord( "imagecolorset", php_function);
-               rule.addWord( "imagecolorsforindex", php_function);
-               rule.addWord( "imagecolorstotal", php_function);
-               rule.addWord( "imagecolortransparent", php_function);
-               rule.addWord( "imagecopy", php_function);
-               rule.addWord( "imagecopymerge", php_function);
-               rule.addWord( "imagecopymergegray", php_function);
-               rule.addWord( "imagecopyresampled", php_function);
-               rule.addWord( "imagecopyresized", php_function);
-               rule.addWord( "imagecreate", php_function);
-               rule.addWord( "imagecreatefromgif", php_function);
-               rule.addWord( "imagecreatefromjpeg", php_function);
-               rule.addWord( "imagecreatefrompng", php_function);
-               rule.addWord( "imagecreatefromstring", php_function);
-               rule.addWord( "imagecreatefromwbmp", php_function);
-               rule.addWord( "imagecreatetruecolor", php_function);
-               rule.addWord( "imagedashedline", php_function);
-               rule.addWord( "imagedestroy", php_function);
-               rule.addWord( "imageellipse", php_function);
-               rule.addWord( "imagefill", php_function);
-               rule.addWord( "imagefilledarc", php_function);
-               rule.addWord( "imagefilledellipse", php_function);
-               rule.addWord( "imagefilledpolygon", php_function);
-               rule.addWord( "imagefilledrectangle", php_function);
-               rule.addWord( "imagefilltoborder", php_function);
-               rule.addWord( "imagefontheight", php_function);
-               rule.addWord( "imagefontwidth", php_function);
-               rule.addWord( "imagegammacorrect", php_function);
-               rule.addWord( "imagegif", php_function);
-               rule.addWord( "imageinterlace", php_function);
-               rule.addWord( "imagejpeg", php_function);
-               rule.addWord( "imageline", php_function);
-               rule.addWord( "imageloadfont", php_function);
-               rule.addWord( "imagepng", php_function);
-               rule.addWord( "imagepolygon", php_function);
-               rule.addWord( "imagepsbbox", php_function);
-               rule.addWord( "imagepsencodefont", php_function);
-               rule.addWord( "imagepsextendfont", php_function);
-               rule.addWord( "imagepsfreefont", php_function);
-               rule.addWord( "imagepsloadfont", php_function);
-               rule.addWord( "imagepsslantfont", php_function);
-               rule.addWord( "imagepstext", php_function);
-               rule.addWord( "imagerectangle", php_function);
-               rule.addWord( "imagesetbrush", php_function);
-               rule.addWord( "imagesetpixel", php_function);
-               rule.addWord( "imagesetthickness", php_function);
-               rule.addWord( "imagesettile", php_function);
-               rule.addWord( "imagestring", php_function);
-               rule.addWord( "imagestringup", php_function);
-               rule.addWord( "imagesx", php_function);
-               rule.addWord( "imagesy", php_function);
-               rule.addWord( "imagetruecolortopalette", php_function);
-               rule.addWord( "imagettfbbox", php_function);
-               rule.addWord( "imagettftext", php_function);
-               rule.addWord( "imagetypes", php_function);
-               rule.addWord( "imagewbmp", php_function);
-               rule.addWord( "implode", php_function);
-               rule.addWord( "in_array", php_function);
-               rule.addWord( "Include()", php_function);
-               rule.addWord( "Include_once()", php_function);
-               rule.addWord( "ini_alter", php_function);
-               rule.addWord( "ini_get", php_function);
-               rule.addWord( "ini_restore", php_function);
-               rule.addWord( "ini_set", php_function);
-               rule.addWord( "intval", php_function);
-               rule.addWord( "ip2long", php_function);
-               rule.addWord( "iptcparse", php_function);
-               rule.addWord( "is_array", php_function);
-               rule.addWord( "is_bool", php_function);
-               rule.addWord( "is_dir", php_function);
-               rule.addWord( "is_double", php_function);
-               rule.addWord( "is_executable", php_function);
-               rule.addWord( "is_file", php_function);
-               rule.addWord( "is_float", php_function);
-               rule.addWord( "is_int", php_function);
-               rule.addWord( "is_integer", php_function);
-               rule.addWord( "is_link", php_function);
-               rule.addWord( "is_long", php_function);
-               rule.addWord( "is_null", php_function);
-               rule.addWord( "is_numeric", php_function);
-               rule.addWord( "is_object", php_function);
-               rule.addWord( "is_readable", php_function);
-               rule.addWord( "is_real", php_function);
-               rule.addWord( "is_resource", php_function);
-               rule.addWord( "is_scalar", php_function);
-               rule.addWord( "is_string", php_function);
-               rule.addWord( "is_subclass_of", php_function);
-               rule.addWord( "is_uploaded_file", php_function);
-               rule.addWord( "is_writable", php_function);
-               rule.addWord( "is_writeable", php_function);
-               rule.addWord( "isset", php_function);
-               rule.addWord( "jddayofweek", php_function);
-               rule.addWord( "jdmonthname", php_function);
-               rule.addWord( "jdtofrench", php_function);
-               rule.addWord( "jdtogregorian", php_function);
-               rule.addWord( "jdtojewish", php_function);
-               rule.addWord( "jdtojulian", php_function);
-               rule.addWord( "jdtounix", php_function);
-               rule.addWord( "jewishtojd", php_function);
-               rule.addWord( "join", php_function);
-               rule.addWord( "juliantojd", php_function);
-               rule.addWord( "key", php_function);
-               rule.addWord( "krsort", php_function);
-               rule.addWord( "ksort", php_function);
-               rule.addWord( "lcg_value", php_function);
-               rule.addWord( "leak", php_function);
-               rule.addWord( "levenshtein", php_function);
-               rule.addWord( "link", php_function);
-               rule.addWord( "linkinfo", php_function);
-               rule.addWord( "list", php_function);
-               rule.addWord( "localeconv", php_function);
-               rule.addWord( "localtime", php_function);
-               rule.addWord( "log", php_function);
-               rule.addWord( "log10", php_function);
-               rule.addWord( "long2ip", php_function);
-               rule.addWord( "lstat", php_function);
-               rule.addWord( "ltrim", php_function);
-               rule.addWord( "mail", php_function);
-               rule.addWord( "max", php_function);
-               rule.addWord( "mcrypt_cbc", php_function);
-               rule.addWord( "mcrypt_cfb", php_function);
-               rule.addWord( "mcrypt_create_iv", php_function);
-               rule.addWord( "mcrypt_decrypt", php_function);
-               rule.addWord( "mcrypt_ecb", php_function);
-               rule.addWord( "mcrypt_enc_get_algorithms_name", php_function);
-               rule.addWord( "mcrypt_enc_get_block_size", php_function);
-               rule.addWord( "mcrypt_enc_get_iv_size", php_function);
-               rule.addWord( "mcrypt_enc_get_key_size", php_function);
-               rule.addWord( "mcrypt_enc_get_modes_name", php_function);
-               rule.addWord( "mcrypt_enc_get_supported_key_sizes", php_function);
-               rule.addWord( "mcrypt_enc_is_block_algorithm", php_function);
-               rule.addWord( "mcrypt_enc_is_block_algorithm_mode", php_function);
-               rule.addWord( "mcrypt_enc_is_block_mode", php_function);
-               rule.addWord( "mcrypt_enc_self_test", php_function);
-               rule.addWord( "mcrypt_encrypt", php_function);
-               rule.addWord( "mcrypt_generic", php_function);
-               rule.addWord( "mcrypt_generic_end", php_function);
-               rule.addWord( "mcrypt_generic_init", php_function);
-               rule.addWord( "mcrypt_get_block_size", php_function);
-               rule.addWord( "mcrypt_get_cipher_name", php_function);
-               rule.addWord( "mcrypt_get_iv_size", php_function);
-               rule.addWord( "mcrypt_get_key_size", php_function);
-               rule.addWord( "mcrypt_list_algorithms", php_function);
-               rule.addWord( "mcrypt_list_modes", php_function);
-               rule.addWord( "mcrypt_module_get_algo_block_size", php_function);
-               rule.addWord( "mcrypt_module_get_algo_key_size", php_function);
-               rule.addWord( "mcrypt_module_get_algo_supported_key_sizes", php_function);
-               rule.addWord( "mcrypt_module_is_block_algorithm", php_function);
-               rule.addWord( "mcrypt_module_is_block_algorithm_mode", php_function);
-               rule.addWord( "mcrypt_module_is_block_mode", php_function);
-               rule.addWord( "mcrypt_module_open", php_function);
-               rule.addWord( "mcrypt_module_self_test", php_function);
-               rule.addWord( "mcrypt_ofb", php_function);
-               rule.addWord( "md5", php_function);
-               rule.addWord( "mdecrypt_generic", php_function);
-               rule.addWord( "metaphone", php_function);
-               rule.addWord( "method_exists", php_function);
-               rule.addWord( "microtime", php_function);
-               rule.addWord( "min", php_function);
-               rule.addWord( "mkdir", php_function);
-               rule.addWord( "mktime", php_function);
-               rule.addWord( "move_uploaded_file", php_function);
-               rule.addWord( "mt_getrandmax", php_function);
-               rule.addWord( "mt_rand", php_function);
-               rule.addWord( "mt_srand", php_function);
-               rule.addWord( "mysql_affected_rows", php_function);
-               rule.addWord( "mysql_change_user", php_function);
-               rule.addWord( "mysql_close", php_function);
-               rule.addWord( "mysql_connect", php_function);
-               rule.addWord( "mysql_create_db", php_function);
-               rule.addWord( "mysql_data_seek", php_function);
-               rule.addWord( "mysql_db_name", php_function);
-               rule.addWord( "mysql_db_query", php_function);
-               rule.addWord( "mysql_drop_db", php_function);
-               rule.addWord( "mysql_errno", php_function);
-               rule.addWord( "mysql_error", php_function);
-               rule.addWord( "mysql_escape_string", php_function);
-               rule.addWord( "mysql_fetch_array", php_function);
-               rule.addWord( "mysql_fetch_assoc", php_function);
-               rule.addWord( "mysql_fetch_field", php_function);
-               rule.addWord( "mysql_fetch_lengths", php_function);
-               rule.addWord( "mysql_fetch_object", php_function);
-               rule.addWord( "mysql_fetch_row", php_function);
-               rule.addWord( "mysql_field_flags", php_function);
-               rule.addWord( "mysql_field_len", php_function);
-               rule.addWord( "mysql_field_name", php_function);
-               rule.addWord( "mysql_field_seek", php_function);
-               rule.addWord( "mysql_field_table", php_function);
-               rule.addWord( "mysql_field_type", php_function);
-               rule.addWord( "mysql_free_result", php_function);
-               rule.addWord( "mysql_get_client_info", php_function);
-               rule.addWord( "mysql_get_host_info", php_function);
-               rule.addWord( "mysql_get_proto_info", php_function);
-               rule.addWord( "mysql_get_server_info", php_function);
-               rule.addWord( "mysql_insert_id", php_function);
-               rule.addWord( "mysql_list_dbs", php_function);
-               rule.addWord( "mysql_list_fields", php_function);
-               rule.addWord( "mysql_list_tables", php_function);
-               rule.addWord( "mysql_num_fields", php_function);
-               rule.addWord( "mysql_num_rows", php_function);
-               rule.addWord( "mysql_pconnect", php_function);
-               rule.addWord( "mysql_query", php_function);
-               rule.addWord( "mysql_result", php_function);
-               rule.addWord( "mysql_select_db", php_function);
-               rule.addWord( "mysql_tablename", php_function);
-               rule.addWord( "mysql_unbuffered_query", php_function);
-               rule.addWord( "natcasesort", php_function);
-               rule.addWord( "natsort", php_function);
-               rule.addWord( "next", php_function);
-               rule.addWord( "nl2br", php_function);
-               rule.addWord( "number_format", php_function);
-               rule.addWord( "ob_end_clean", php_function);
-               rule.addWord( "ob_end_flush", php_function);
-               rule.addWord( "ob_get_contents", php_function);
-               rule.addWord( "ob_get_length", php_function);
-               rule.addWord( "ob_gzhandler", php_function);
-               rule.addWord( "ob_implicit_flush", php_function);
-               rule.addWord( "ob_start", php_function);
-               rule.addWord( "octdec", php_function);
-               rule.addWord( "opendir", php_function);
-               rule.addWord( "openlog", php_function);
-               rule.addWord( "ord", php_function);
-               rule.addWord( "pack", php_function);
-               rule.addWord( "parse_str", php_function);
-               rule.addWord( "parse_url", php_function);
-               rule.addWord( "pathinfo", php_function);
-               rule.addWord( "pclose", php_function);
-               rule.addWord( "pfsockopen", php_function);
-               rule.addWord( "php_logo_guid", php_function);
-               rule.addWord( "php_sapi_name", php_function);
-               rule.addWord( "php_uname", php_function);
-               rule.addWord( "phpcredits", php_function);
-               rule.addWord( "phpinfo", php_function);
-               rule.addWord( "phpversion", php_function);
-               rule.addWord( "pi", php_function);
-               rule.addWord( "popen", php_function);
-               rule.addWord( "pos", php_function);
-               rule.addWord( "pow", php_function);
-               rule.addWord( "prev", php_function);
-               rule.addWord( "print", php_function);
-               rule.addWord( "print_r", php_function);
-               rule.addWord( "printf", php_function);
-               rule.addWord( "putenv", php_function);
-               rule.addWord( "quoted_printable_decode", php_function);
-               rule.addWord( "quotemeta", php_function);
-               rule.addWord( "rad2deg", php_function);
-               rule.addWord( "rand", php_function);
-               rule.addWord( "range", php_function);
-               rule.addWord( "rawurldecode", php_function);
-               rule.addWord( "rawurlencode", php_function);
-               rule.addWord( "read_exif_data", php_function);
-               rule.addWord( "readdir", php_function);
-               rule.addWord( "readfile", php_function);
-               rule.addWord( "readlink", php_function);
-               rule.addWord( "realpath", php_function);
-               rule.addWord( "rename", php_function);
-               rule.addWord( "Require()", php_function);
-               rule.addWord( "Require_once()", php_function);
-               rule.addWord( "reset", php_function);
-               rule.addWord( "restore_error_handler", php_function);
-               rule.addWord( "rewind", php_function);
-               rule.addWord( "rewinddir", php_function);
-               rule.addWord( "rmdir", php_function);
-               rule.addWord( "round", php_function);
-               rule.addWord( "rsort", php_function);
-               rule.addWord( "rtrim", php_function);
-               rule.addWord( "serialize", php_function);
-               rule.addWord( "session_cache_limiter", php_function);
-               rule.addWord( "session_decode", php_function);
-               rule.addWord( "session_destroy", php_function);
-               rule.addWord( "session_encode", php_function);
-               rule.addWord( "session_get_cookie_params", php_function);
-               rule.addWord( "session_id", php_function);
-               rule.addWord( "session_is_registered", php_function);
-               rule.addWord( "session_module_name", php_function);
-               rule.addWord( "session_name", php_function);
-               rule.addWord( "session_register", php_function);
-               rule.addWord( "session_save_path", php_function);
-               rule.addWord( "session_set_cookie_params", php_function);
-               rule.addWord( "session_set_save_handler", php_function);
-               rule.addWord( "session_start", php_function);
-               rule.addWord( "session_unregister", php_function);
-               rule.addWord( "session_unset", php_function);
-               rule.addWord( "session_write_close", php_function);
-               rule.addWord( "set_error_handler", php_function);
-               rule.addWord( "set_file_buffer", php_function);
-               rule.addWord( "set_magic_quotes_runtime", php_function);
-               rule.addWord( "set_time_limit", php_function);
-               rule.addWord( "setcookie", php_function);
-               rule.addWord( "setlocale", php_function);
-               rule.addWord( "settype", php_function);
-               rule.addWord( "show_source", php_function);
-               rule.addWord( "shuffle", php_function);
-               rule.addWord( "similar_text", php_function);
-               rule.addWord( "sin", php_function);
-               rule.addWord( "sizeof", php_function);
-               rule.addWord( "sleep", php_function);
-               rule.addWord( "socket_get_status", php_function);
-               rule.addWord( "socket_set_blocking", php_function);
-               rule.addWord( "socket_set_timeout", php_function);
-               rule.addWord( "sort", php_function);
-               rule.addWord( "soundex", php_function);
-               rule.addWord( "sprintf", php_function);
-               rule.addWord( "sqrt", php_function);
-               rule.addWord( "srand", php_function);
-               rule.addWord( "sscanf", php_function);
-               rule.addWord( "stat", php_function);
-               rule.addWord( "str_pad", php_function);
-               rule.addWord( "str_repeat", php_function);
-               rule.addWord( "str_replace", php_function);
-               rule.addWord( "strcasecmp", php_function);
-               rule.addWord( "strchr", php_function);
-               rule.addWord( "strcmp", php_function);
-               rule.addWord( "strcoll", php_function);
-               rule.addWord( "strcspn", php_function);
-               rule.addWord( "strftime", php_function);
-               rule.addWord( "strip_tags", php_function);
-               rule.addWord( "stripcslashes", php_function);
-               rule.addWord( "stripslashes", php_function);
-               rule.addWord( "stristr", php_function);
-               rule.addWord( "strlen", php_function);
-               rule.addWord( "strnatcasecmp", php_function);
-               rule.addWord( "strnatcmp", php_function);
-               rule.addWord( "strncasecmp", php_function);
-               rule.addWord( "strncmp", php_function);
-               rule.addWord( "strpos", php_function);
-               rule.addWord( "strrchr", php_function);
-               rule.addWord( "strrev", php_function);
-               rule.addWord( "strrpos", php_function);
-               rule.addWord( "strspn", php_function);
-               rule.addWord( "strstr", php_function);
-               rule.addWord( "strtok", php_function);
-               rule.addWord( "strtolower", php_function);
-               rule.addWord( "strtotime", php_function);
-               rule.addWord( "strtoupper", php_function);
-               rule.addWord( "strtr", php_function);
-               rule.addWord( "strval", php_function);
-               rule.addWord( "substr", php_function);
-               rule.addWord( "substr_count", php_function);
-               rule.addWord( "substr_replace", php_function);
-               rule.addWord( "symlink", php_function);
-               rule.addWord( "syslog", php_function);
-               rule.addWord( "tan", php_function);
-               rule.addWord( "tempnam", php_function);
-               rule.addWord( "time", php_function);
-               rule.addWord( "tmpfile", php_function);
-               rule.addWord( "touch", php_function);
-               rule.addWord( "trigger_error", php_function);
-               rule.addWord( "trim", php_function);
-               rule.addWord( "uasort", php_function);
-               rule.addWord( "ucfirst", php_function);
-               rule.addWord( "ucwords", php_function);
-               rule.addWord( "uksort", php_function);
-               rule.addWord( "umask", php_function);
-               rule.addWord( "uniqid", php_function);
-               rule.addWord( "unixtojd", php_function);
-               rule.addWord( "unlink", php_function);
-               rule.addWord( "unpack", php_function);
-               rule.addWord( "unserialize", php_function);
-               rule.addWord( "unset", php_function);
-               rule.addWord( "urldecode", php_function);
-               rule.addWord( "urlencode", php_function);
-               rule.addWord( "user_error", php_function);
-               rule.addWord( "usleep", php_function);
-               rule.addWord( "usort", php_function);
-               rule.addWord( "var_dump", php_function);
-               rule.addWord( "virtual", php_function);
-               rule.addWord( "wordwrap", php_function);
-               rule.addWord( "zend_logo_guid", php_function);
-               rule.addWord( "zend_version ", php_function);
-               */
-               rules.add(rule);
+               rule.addWord( "abs", php_fonction);
+               rule.addWord( "acos", php_fonction);
+               rule.addWord( "addcslashes", php_fonction);
+               rule.addWord( "addslashes", php_fonction);
+               rule.addWord( "apache_lookup_uri", php_fonction);
+               rule.addWord( "apache_note", php_fonction);
+               rule.addWord( "array", php_fonction);
+               rule.addWord( "array_count_values", php_fonction);
+               rule.addWord( "array_diff", php_fonction);
+               rule.addWord( "array_filter", php_fonction);
+               rule.addWord( "array_flip", php_fonction);
+               rule.addWord( "array_intersect", php_fonction);
+               rule.addWord( "array_keys", php_fonction);
+               rule.addWord( "array_map", php_fonction);
+               rule.addWord( "array_merge", php_fonction);
+               rule.addWord( "array_merge_recursive", php_fonction);
+               rule.addWord( "array_multisort", php_fonction);
+               rule.addWord( "array_pad", php_fonction);
+               rule.addWord( "array_pop", php_fonction);
+               rule.addWord( "array_push", php_fonction);
+               rule.addWord( "array_rand", php_fonction);
+               rule.addWord( "array_reduce", php_fonction);
+               rule.addWord( "array_reverse", php_fonction);
+               rule.addWord( "array_search", php_fonction);
+               rule.addWord( "array_shift", php_fonction);
+               rule.addWord( "array_slice", php_fonction);
+               rule.addWord( "array_splice", php_fonction);
+               rule.addWord( "array_sum", php_fonction);
+               rule.addWord( "array_unique", php_fonction);
+               rule.addWord( "array_unshift", php_fonction);
+               rule.addWord( "array_values", php_fonction);
+               rule.addWord( "array_walk", php_fonction);
+               rule.addWord( "arsort", php_fonction);
+               rule.addWord( "ascii2ebcdic", php_fonction);
+               rule.addWord( "asin", php_fonction);
+               rule.addWord( "asort", php_fonction);
+               rule.addWord( "assert", php_fonction);
+               rule.addWord( "assert-options", php_fonction);
+               rule.addWord( "atan", php_fonction);
+               rule.addWord( "atan2", php_fonction);
+               rule.addWord( "base64_decode", php_fonction);
+               rule.addWord( "base64_encode", php_fonction);
+               rule.addWord( "base_convert", php_fonction);
+               rule.addWord( "basename", php_fonction);
+               rule.addWord( "bin2hex", php_fonction);
+               rule.addWord( "bindec", php_fonction);
+               rule.addWord( "call_user_method", php_fonction);
+               rule.addWord( "call_user_method_array", php_fonction);
+               rule.addWord( "ceil", php_fonction);
+               rule.addWord( "chdir", php_fonction);
+               rule.addWord( "checkdate", php_fonction);
+               rule.addWord( "checkdnsrr", php_fonction);
+               rule.addWord( "chgrp", php_fonction);
+               rule.addWord( "chmod", php_fonction);
+               rule.addWord( "chop", php_fonction);
+               rule.addWord( "chown", php_fonction);
+               rule.addWord( "chr", php_fonction);
+               rule.addWord( "chroot", php_fonction);
+               rule.addWord( "chunk_split", php_fonction);
+               rule.addWord( "class_exists", php_fonction);
+               rule.addWord( "clearstatcache", php_fonction);
+               rule.addWord( "closedir", php_fonction);
+               rule.addWord( "closelog", php_fonction);
+               rule.addWord( "compact", php_fonction);
+               rule.addWord( "connection_aborted", php_fonction);
+               rule.addWord( "connection_status", php_fonction);
+               rule.addWord( "connection_timeout", php_fonction);
+               rule.addWord( "constant", php_fonction);
+               rule.addWord( "convert_cyr_string", php_fonction);
+               rule.addWord( "copy", php_fonction);
+               rule.addWord( "cos", php_fonction);
+               rule.addWord( "count", php_fonction);
+               rule.addWord( "count_chars", php_fonction);
+               rule.addWord( "crc32", php_fonction);
+               rule.addWord( "crypt", php_fonction);
+               rule.addWord( "current", php_fonction);
+               rule.addWord( "date", php_fonction);
+               rule.addWord( "debugger_off", php_fonction);
+               rule.addWord( "debugger_on", php_fonction);
+               rule.addWord( "decbin", php_fonction);
+               rule.addWord( "dechex", php_fonction);
+               rule.addWord( "decoct", php_fonction);
+               rule.addWord( "define", php_fonction);
+               rule.addWord( "define_syslog_variables", php_fonction);
+               rule.addWord( "defined", php_fonction);
+               rule.addWord( "deg2rad", php_fonction);
+               rule.addWord( "delete", php_fonction);
+               rule.addWord( "die", php_fonction);
+               rule.addWord( "dir", php_fonction);
+               rule.addWord( "dirname", php_fonction);
+               rule.addWord( "disk_total_space", php_fonction);
+               rule.addWord( "diskfreespace", php_fonction);
+               rule.addWord( "dl", php_fonction);
+               rule.addWord( "doubleval", php_fonction);
+               rule.addWord( "each", php_fonction);
+               rule.addWord( "easter_date", php_fonction);
+               rule.addWord( "easter_days", php_fonction);
+               rule.addWord( "ebcdic2ascii", php_fonction);
+               rule.addWord( "echo", php_fonction);
+               rule.addWord( "empty", php_fonction);
+               rule.addWord( "end", php_fonction);
+               rule.addWord( "error_log", php_fonction);
+               rule.addWord( "error_reporting", php_fonction);
+               rule.addWord( "eval", php_fonction);
+               rule.addWord( "exit", php_fonction);
+               rule.addWord( "exp", php_fonction);
+               rule.addWord( "explode", php_fonction);
+               rule.addWord( "extension_loaded", php_fonction);
+               rule.addWord( "extract", php_fonction);
+               rule.addWord( "ezmlm_hash", php_fonction);
+               rule.addWord( "fclose", php_fonction);
+               rule.addWord( "feof", php_fonction);
+               rule.addWord( "fflush", php_fonction);
+               rule.addWord( "fgetc", php_fonction);
+               rule.addWord( "fgetcsv", php_fonction);
+               rule.addWord( "fgets", php_fonction);
+               rule.addWord( "fgetss", php_fonction);
+               rule.addWord( "file", php_fonction);
+               rule.addWord( "file_exists", php_fonction);
+               rule.addWord( "fileatime", php_fonction);
+               rule.addWord( "filectime", php_fonction);
+               rule.addWord( "filegroup", php_fonction);
+               rule.addWord( "fileinode", php_fonction);
+               rule.addWord( "filemtime", php_fonction);
+               rule.addWord( "fileowner", php_fonction);
+               rule.addWord( "fileperms", php_fonction);
+               rule.addWord( "filesize", php_fonction);
+               rule.addWord( "filetype", php_fonction);
+               rule.addWord( "flock", php_fonction);
+               rule.addWord( "floor", php_fonction);
+               rule.addWord( "flush", php_fonction);
+               rule.addWord( "fopen", php_fonction);
+               rule.addWord( "fpassthru", php_fonction);
+               rule.addWord( "fputs", php_fonction);
+               rule.addWord( "fread", php_fonction);
+               rule.addWord( "frenchtojd", php_fonction);
+               rule.addWord( "fscanf", php_fonction);
+               rule.addWord( "fseek", php_fonction);
+               rule.addWord( "fsockopen", php_fonction);
+               rule.addWord( "fstat", php_fonction);
+               rule.addWord( "ftell", php_fonction);
+               rule.addWord( "ftp_cdup", php_fonction);
+               rule.addWord( "ftp_chdir", php_fonction);
+               rule.addWord( "ftp_connect", php_fonction);
+               rule.addWord( "ftp_delete", php_fonction);
+               rule.addWord( "ftp_fget", php_fonction);
+               rule.addWord( "ftp_fput", php_fonction);
+               rule.addWord( "ftp_get", php_fonction);
+               rule.addWord( "ftp_login", php_fonction);
+               rule.addWord( "ftp_mdtm", php_fonction);
+               rule.addWord( "ftp_mkdir", php_fonction);
+               rule.addWord( "ftp_nlist", php_fonction);
+               rule.addWord( "ftp_pasv", php_fonction);
+               rule.addWord( "ftp_put", php_fonction);
+               rule.addWord( "ftp_pwd", php_fonction);
+               rule.addWord( "ftp_quit", php_fonction);
+               rule.addWord( "ftp_rawlist", php_fonction);
+               rule.addWord( "ftp_rename", php_fonction);
+               rule.addWord( "ftp_rmdir", php_fonction);
+               rule.addWord( "ftp_site", php_fonction);
+               rule.addWord( "ftp_size", php_fonction);
+               rule.addWord( "ftp_systype", php_fonction);
+               rule.addWord( "ftruncate", php_fonction);
+               rule.addWord( "fwrite", php_fonction);
+               rule.addWord( "get_browser", php_fonction);
+               rule.addWord( "get_cfg_var", php_fonction);
+               rule.addWord( "get_class", php_fonction);
+               rule.addWord( "get_class_methods", php_fonction);
+               rule.addWord( "get_class_vars", php_fonction);
+               rule.addWord( "get_current_user", php_fonction);
+               rule.addWord( "get_declared_classes", php_fonction);
+               rule.addWord( "get_defined_constants", php_fonction);
+               rule.addWord( "get_defined_vars", php_fonction);
+               rule.addWord( "get_extension_funcs", php_fonction);
+               rule.addWord( "get_html_translation_table", php_fonction);
+               rule.addWord( "get_included_files", php_fonction);
+               rule.addWord( "get_loaded_extensions", php_fonction);
+               rule.addWord( "get_magic_quotes_gpc", php_fonction);
+               rule.addWord( "get_magic_quotes_runtime", php_fonction);
+               rule.addWord( "get_meta_tags", php_fonction);
+               rule.addWord( "get_object_vars", php_fonction);
+               rule.addWord( "get_parent_class", php_fonction);
+               rule.addWord( "get_required_files", php_fonction);
+               rule.addWord( "get_resource_type", php_fonction);
+               rule.addWord( "getallheaders", php_fonction);
+               rule.addWord( "getcwd", php_fonction);
+               rule.addWord( "getdate", php_fonction);
+               rule.addWord( "getenv", php_fonction);
+               rule.addWord( "gethostbyaddr", php_fonction);
+               rule.addWord( "gethostbyname", php_fonction);
+               rule.addWord( "gethostbynamel", php_fonction);
+               rule.addWord( "getimagesize", php_fonction);
+               rule.addWord( "getlastmod", php_fonction);
+               rule.addWord( "getmxrr", php_fonction);
+               rule.addWord( "getmyinode", php_fonction);
+               rule.addWord( "getmypid", php_fonction);
+               rule.addWord( "getmyuid", php_fonction);
+               rule.addWord( "getprotobyname", php_fonction);
+               rule.addWord( "getprotobynumber", php_fonction);
+               rule.addWord( "getrandmax", php_fonction);
+               rule.addWord( "getrusage", php_fonction);
+               rule.addWord( "getservbyname", php_fonction);
+               rule.addWord( "getservbyport", php_fonction);
+               rule.addWord( "gettimeofday", php_fonction);
+               rule.addWord( "gettype", php_fonction);
+               rule.addWord( "gmdate", php_fonction);
+               rule.addWord( "gmmktime", php_fonction);
+               rule.addWord( "gmstrftime", php_fonction);
+               rule.addWord( "gregoriantojd", php_fonction);
+               rule.addWord( "header", php_fonction);
+               rule.addWord( "headers_sent", php_fonction);
+               rule.addWord( "hebrev", php_fonction);
+               rule.addWord( "hebrevc", php_fonction);
+               rule.addWord( "hexdec", php_fonction);
+               rule.addWord( "highlight_file", php_fonction);
+               rule.addWord( "highlight_string", php_fonction);
+               rule.addWord( "htmlentities", php_fonction);
+               rule.addWord( "htmlspecialchars", php_fonction);
+               rule.addWord( "ignore_user_abort", php_fonction);
+               rule.addWord( "imagealphablending", php_fonction);
+               rule.addWord( "imagearc", php_fonction);
+               rule.addWord( "imagechar", php_fonction);
+               rule.addWord( "imagecharup", php_fonction);
+               rule.addWord( "imagecolorallocate", php_fonction);
+               rule.addWord( "imagecolorat", php_fonction);
+               rule.addWord( "imagecolorclosest", php_fonction);
+               rule.addWord( "imagecolorclosestalpha", php_fonction);
+               rule.addWord( "imagecolordeallocate", php_fonction);
+               rule.addWord( "imagecolorexact", php_fonction);
+               rule.addWord( "imagecolorexactalpha", php_fonction);
+               rule.addWord( "imagecolorresolve", php_fonction);
+               rule.addWord( "imagecolorresolvealpha", php_fonction);
+               rule.addWord( "imagecolorset", php_fonction);
+               rule.addWord( "imagecolorsforindex", php_fonction);
+               rule.addWord( "imagecolorstotal", php_fonction);
+               rule.addWord( "imagecolortransparent", php_fonction);
+               rule.addWord( "imagecopy", php_fonction);
+               rule.addWord( "imagecopymerge", php_fonction);
+               rule.addWord( "imagecopymergegray", php_fonction);
+               rule.addWord( "imagecopyresampled", php_fonction);
+               rule.addWord( "imagecopyresized", php_fonction);
+               rule.addWord( "imagecreate", php_fonction);
+               rule.addWord( "imagecreatefromgif", php_fonction);
+               rule.addWord( "imagecreatefromjpeg", php_fonction);
+               rule.addWord( "imagecreatefrompng", php_fonction);
+               rule.addWord( "imagecreatefromstring", php_fonction);
+               rule.addWord( "imagecreatefromwbmp", php_fonction);
+               rule.addWord( "imagecreatetruecolor", php_fonction);
+               rule.addWord( "imagedashedline", php_fonction);
+               rule.addWord( "imagedestroy", php_fonction);
+               rule.addWord( "imageellipse", php_fonction);
+               rule.addWord( "imagefill", php_fonction);
+               rule.addWord( "imagefilledarc", php_fonction);
+               rule.addWord( "imagefilledellipse", php_fonction);
+               rule.addWord( "imagefilledpolygon", php_fonction);
+               rule.addWord( "imagefilledrectangle", php_fonction);
+               rule.addWord( "imagefilltoborder", php_fonction);
+               rule.addWord( "imagefontheight", php_fonction);
+               rule.addWord( "imagefontwidth", php_fonction);
+               rule.addWord( "imagegammacorrect", php_fonction);
+               rule.addWord( "imagegif", php_fonction);
+               rule.addWord( "imageinterlace", php_fonction);
+               rule.addWord( "imagejpeg", php_fonction);
+               rule.addWord( "imageline", php_fonction);
+               rule.addWord( "imageloadfont", php_fonction);
+               rule.addWord( "imagepng", php_fonction);
+               rule.addWord( "imagepolygon", php_fonction);
+               rule.addWord( "imagepsbbox", php_fonction);
+               rule.addWord( "imagepsencodefont", php_fonction);
+               rule.addWord( "imagepsextendfont", php_fonction);
+               rule.addWord( "imagepsfreefont", php_fonction);
+               rule.addWord( "imagepsloadfont", php_fonction);
+               rule.addWord( "imagepsslantfont", php_fonction);
+               rule.addWord( "imagepstext", php_fonction);
+               rule.addWord( "imagerectangle", php_fonction);
+               rule.addWord( "imagesetbrush", php_fonction);
+               rule.addWord( "imagesetpixel", php_fonction);
+               rule.addWord( "imagesetthickness", php_fonction);
+               rule.addWord( "imagesettile", php_fonction);
+               rule.addWord( "imagestring", php_fonction);
+               rule.addWord( "imagestringup", php_fonction);
+               rule.addWord( "imagesx", php_fonction);
+               rule.addWord( "imagesy", php_fonction);
+               rule.addWord( "imagetruecolortopalette", php_fonction);
+               rule.addWord( "imagettfbbox", php_fonction);
+               rule.addWord( "imagettftext", php_fonction);
+               rule.addWord( "imagetypes", php_fonction);
+               rule.addWord( "imagewbmp", php_fonction);
+               rule.addWord( "implode", php_fonction);
+               rule.addWord( "in_array", php_fonction);
+               rule.addWord( "Include()", php_fonction);
+               rule.addWord( "Include_once()", php_fonction);
+               rule.addWord( "ini_alter", php_fonction);
+               rule.addWord( "ini_get", php_fonction);
+               rule.addWord( "ini_restore", php_fonction);
+               rule.addWord( "ini_set", php_fonction);
+               rule.addWord( "intval", php_fonction);
+               rule.addWord( "ip2long", php_fonction);
+               rule.addWord( "iptcparse", php_fonction);
+               rule.addWord( "is_array", php_fonction);
+               rule.addWord( "is_bool", php_fonction);
+               rule.addWord( "is_dir", php_fonction);
+               rule.addWord( "is_double", php_fonction);
+               rule.addWord( "is_executable", php_fonction);
+               rule.addWord( "is_file", php_fonction);
+               rule.addWord( "is_float", php_fonction);
+               rule.addWord( "is_int", php_fonction);
+               rule.addWord( "is_integer", php_fonction);
+               rule.addWord( "is_link", php_fonction);
+               rule.addWord( "is_long", php_fonction);
+               rule.addWord( "is_null", php_fonction);
+               rule.addWord( "is_numeric", php_fonction);
+               rule.addWord( "is_object", php_fonction);
+               rule.addWord( "is_readable", php_fonction);
+               rule.addWord( "is_real", php_fonction);
+               rule.addWord( "is_resource", php_fonction);
+               rule.addWord( "is_scalar", php_fonction);
+               rule.addWord( "is_string", php_fonction);
+               rule.addWord( "is_subclass_of", php_fonction);
+               rule.addWord( "is_uploaded_file", php_fonction);
+               rule.addWord( "is_writable", php_fonction);
+               rule.addWord( "is_writeable", php_fonction);
+               rule.addWord( "isset", php_fonction);
+               rule.addWord( "jddayofweek", php_fonction);
+               rule.addWord( "jdmonthname", php_fonction);
+               rule.addWord( "jdtofrench", php_fonction);
+               rule.addWord( "jdtogregorian", php_fonction);
+               rule.addWord( "jdtojewish", php_fonction);
+               rule.addWord( "jdtojulian", php_fonction);
+               rule.addWord( "jdtounix", php_fonction);
+               rule.addWord( "jewishtojd", php_fonction);
+               rule.addWord( "join", php_fonction);
+               rule.addWord( "juliantojd", php_fonction);
+               rule.addWord( "key", php_fonction);
+               rule.addWord( "krsort", php_fonction);
+               rule.addWord( "ksort", php_fonction);
+               rule.addWord( "lcg_value", php_fonction);
+               rule.addWord( "leak", php_fonction);
+               rule.addWord( "levenshtein", php_fonction);
+               rule.addWord( "link", php_fonction);
+               rule.addWord( "linkinfo", php_fonction);
+               rule.addWord( "list", php_fonction);
+               rule.addWord( "localeconv", php_fonction);
+               rule.addWord( "localtime", php_fonction);
+               rule.addWord( "log", php_fonction);
+               rule.addWord( "log10", php_fonction);
+               rule.addWord( "long2ip", php_fonction);
+               rule.addWord( "lstat", php_fonction);
+               rule.addWord( "ltrim", php_fonction);
+               rule.addWord( "mail", php_fonction);
+               rule.addWord( "max", php_fonction);
+               rule.addWord( "mcrypt_cbc", php_fonction);
+               rule.addWord( "mcrypt_cfb", php_fonction);
+               rule.addWord( "mcrypt_create_iv", php_fonction);
+               rule.addWord( "mcrypt_decrypt", php_fonction);
+               rule.addWord( "mcrypt_ecb", php_fonction);
+               rule.addWord( "mcrypt_enc_get_algorithms_name", php_fonction);
+               rule.addWord( "mcrypt_enc_get_block_size", php_fonction);
+               rule.addWord( "mcrypt_enc_get_iv_size", php_fonction);
+               rule.addWord( "mcrypt_enc_get_key_size", php_fonction);
+               rule.addWord( "mcrypt_enc_get_modes_name", php_fonction);
+               rule.addWord( "mcrypt_enc_get_supported_key_sizes", php_fonction);
+               rule.addWord( "mcrypt_enc_is_block_algorithm", php_fonction);
+               rule.addWord( "mcrypt_enc_is_block_algorithm_mode", php_fonction);
+               rule.addWord( "mcrypt_enc_is_block_mode", php_fonction);
+               rule.addWord( "mcrypt_enc_self_test", php_fonction);
+               rule.addWord( "mcrypt_encrypt", php_fonction);
+               rule.addWord( "mcrypt_generic", php_fonction);
+               rule.addWord( "mcrypt_generic_end", php_fonction);
+               rule.addWord( "mcrypt_generic_init", php_fonction);
+               rule.addWord( "mcrypt_get_block_size", php_fonction);
+               rule.addWord( "mcrypt_get_cipher_name", php_fonction);
+               rule.addWord( "mcrypt_get_iv_size", php_fonction);
+               rule.addWord( "mcrypt_get_key_size", php_fonction);
+               rule.addWord( "mcrypt_list_algorithms", php_fonction);
+               rule.addWord( "mcrypt_list_modes", php_fonction);
+               rule.addWord( "mcrypt_module_get_algo_block_size", php_fonction);
+               rule.addWord( "mcrypt_module_get_algo_key_size", php_fonction);
+               rule.addWord( "mcrypt_module_get_algo_supported_key_sizes", php_fonction);
+               rule.addWord( "mcrypt_module_is_block_algorithm", php_fonction);
+               rule.addWord( "mcrypt_module_is_block_algorithm_mode", php_fonction);
+               rule.addWord( "mcrypt_module_is_block_mode", php_fonction);
+               rule.addWord( "mcrypt_module_open", php_fonction);
+               rule.addWord( "mcrypt_module_self_test", php_fonction);
+               rule.addWord( "mcrypt_ofb", php_fonction);
+               rule.addWord( "md5", php_fonction);
+               rule.addWord( "mdecrypt_generic", php_fonction);
+               rule.addWord( "metaphone", php_fonction);
+               rule.addWord( "method_exists", php_fonction);
+               rule.addWord( "microtime", php_fonction);
+               rule.addWord( "min", php_fonction);
+               rule.addWord( "mkdir", php_fonction);
+               rule.addWord( "mktime", php_fonction);
+               rule.addWord( "move_uploaded_file", php_fonction);
+               rule.addWord( "mt_getrandmax", php_fonction);
+               rule.addWord( "mt_rand", php_fonction);
+               rule.addWord( "mt_srand", php_fonction);
+               rule.addWord( "mysql_affected_rows", php_fonction);
+               rule.addWord( "mysql_change_user", php_fonction);
+               rule.addWord( "mysql_close", php_fonction);
+               rule.addWord( "mysql_connect", php_fonction);
+               rule.addWord( "mysql_create_db", php_fonction);
+               rule.addWord( "mysql_data_seek", php_fonction);
+               rule.addWord( "mysql_db_name", php_fonction);
+               rule.addWord( "mysql_db_query", php_fonction);
+               rule.addWord( "mysql_drop_db", php_fonction);
+               rule.addWord( "mysql_errno", php_fonction);
+               rule.addWord( "mysql_error", php_fonction);
+               rule.addWord( "mysql_escape_string", php_fonction);
+               rule.addWord( "mysql_fetch_array", php_fonction);
+               rule.addWord( "mysql_fetch_assoc", php_fonction);
+               rule.addWord( "mysql_fetch_field", php_fonction);
+               rule.addWord( "mysql_fetch_lengths", php_fonction);
+               rule.addWord( "mysql_fetch_object", php_fonction);
+               rule.addWord( "mysql_fetch_row", php_fonction);
+               rule.addWord( "mysql_field_flags", php_fonction);
+               rule.addWord( "mysql_field_len", php_fonction);
+               rule.addWord( "mysql_field_name", php_fonction);
+               rule.addWord( "mysql_field_seek", php_fonction);
+               rule.addWord( "mysql_field_table", php_fonction);
+               rule.addWord( "mysql_field_type", php_fonction);
+               rule.addWord( "mysql_free_result", php_fonction);
+               rule.addWord( "mysql_get_client_info", php_fonction);
+               rule.addWord( "mysql_get_host_info", php_fonction);
+               rule.addWord( "mysql_get_proto_info", php_fonction);
+               rule.addWord( "mysql_get_server_info", php_fonction);
+               rule.addWord( "mysql_insert_id", php_fonction);
+               rule.addWord( "mysql_list_dbs", php_fonction);
+               rule.addWord( "mysql_list_fields", php_fonction);
+               rule.addWord( "mysql_list_tables", php_fonction);
+               rule.addWord( "mysql_num_fields", php_fonction);
+               rule.addWord( "mysql_num_rows", php_fonction);
+               rule.addWord( "mysql_pconnect", php_fonction);
+               rule.addWord( "mysql_query", php_fonction);
+               rule.addWord( "mysql_result", php_fonction);
+               rule.addWord( "mysql_select_db", php_fonction);
+               rule.addWord( "mysql_tablename", php_fonction);
+               rule.addWord( "mysql_unbuffered_query", php_fonction);
+               rule.addWord( "natcasesort", php_fonction);
+               rule.addWord( "natsort", php_fonction);
+               rule.addWord( "next", php_fonction);
+               rule.addWord( "nl2br", php_fonction);
+               rule.addWord( "number_format", php_fonction);
+               rule.addWord( "ob_end_clean", php_fonction);
+               rule.addWord( "ob_end_flush", php_fonction);
+               rule.addWord( "ob_get_contents", php_fonction);
+               rule.addWord( "ob_get_length", php_fonction);
+               rule.addWord( "ob_gzhandler", php_fonction);
+               rule.addWord( "ob_implicit_flush", php_fonction);
+               rule.addWord( "ob_start", php_fonction);
+               rule.addWord( "octdec", php_fonction);
+               rule.addWord( "opendir", php_fonction);
+               rule.addWord( "openlog", php_fonction);
+               rule.addWord( "ord", php_fonction);
+               rule.addWord( "pack", php_fonction);
+               rule.addWord( "parse_str", php_fonction);
+               rule.addWord( "parse_url", php_fonction);
+               rule.addWord( "pathinfo", php_fonction);
+               rule.addWord( "pclose", php_fonction);
+               rule.addWord( "pfsockopen", php_fonction);
+               rule.addWord( "php_logo_guid", php_fonction);
+               rule.addWord( "php_sapi_name", php_fonction);
+               rule.addWord( "php_uname", php_fonction);
+               rule.addWord( "phpcredits", php_fonction);
+               rule.addWord( "phpinfo", php_fonction);
+               rule.addWord( "phpversion", php_fonction);
+               rule.addWord( "pi", php_fonction);
+               rule.addWord( "popen", php_fonction);
+               rule.addWord( "pos", php_fonction);
+               rule.addWord( "pow", php_fonction);
+               rule.addWord( "prev", php_fonction);
+               rule.addWord( "print", php_fonction);
+               rule.addWord( "print_r", php_fonction);
+               rule.addWord( "printf", php_fonction);
+               rule.addWord( "putenv", php_fonction);
+               rule.addWord( "quoted_printable_decode", php_fonction);
+               rule.addWord( "quotemeta", php_fonction);
+               rule.addWord( "rad2deg", php_fonction);
+               rule.addWord( "rand", php_fonction);
+               rule.addWord( "range", php_fonction);
+               rule.addWord( "rawurldecode", php_fonction);
+               rule.addWord( "rawurlencode", php_fonction);
+               rule.addWord( "read_exif_data", php_fonction);
+               rule.addWord( "readdir", php_fonction);
+               rule.addWord( "readfile", php_fonction);
+               rule.addWord( "readlink", php_fonction);
+               rule.addWord( "realpath", php_fonction);
+               rule.addWord( "rename", php_fonction);
+               rule.addWord( "Require()", php_fonction);
+               rule.addWord( "Require_once()", php_fonction);
+               rule.addWord( "reset", php_fonction);
+               rule.addWord( "restore_error_handler", php_fonction);
+               rule.addWord( "rewind", php_fonction);
+               rule.addWord( "rewinddir", php_fonction);
+               rule.addWord( "rmdir", php_fonction);
+               rule.addWord( "round", php_fonction);
+               rule.addWord( "rsort", php_fonction);
+               rule.addWord( "rtrim", php_fonction);
+               rule.addWord( "serialize", php_fonction);
+               rule.addWord( "session_cache_limiter", php_fonction);
+               rule.addWord( "session_decode", php_fonction);
+               rule.addWord( "session_destroy", php_fonction);
+               rule.addWord( "session_encode", php_fonction);
+               rule.addWord( "session_get_cookie_params", php_fonction);
+               rule.addWord( "session_id", php_fonction);
+               rule.addWord( "session_is_registered", php_fonction);
+               rule.addWord( "session_module_name", php_fonction);
+               rule.addWord( "session_name", php_fonction);
+               rule.addWord( "session_register", php_fonction);
+               rule.addWord( "session_save_path", php_fonction);
+               rule.addWord( "session_set_cookie_params", php_fonction);
+               rule.addWord( "session_set_save_handler", php_fonction);
+               rule.addWord( "session_start", php_fonction);
+               rule.addWord( "session_unregister", php_fonction);
+               rule.addWord( "session_unset", php_fonction);
+               rule.addWord( "session_write_close", php_fonction);
+               rule.addWord( "set_error_handler", php_fonction);
+               rule.addWord( "set_file_buffer", php_fonction);
+               rule.addWord( "set_magic_quotes_runtime", php_fonction);
+               rule.addWord( "set_time_limit", php_fonction);
+               rule.addWord( "setcookie", php_fonction);
+               rule.addWord( "setlocale", php_fonction);
+               rule.addWord( "settype", php_fonction);
+               rule.addWord( "show_source", php_fonction);
+               rule.addWord( "shuffle", php_fonction);
+               rule.addWord( "similar_text", php_fonction);
+               rule.addWord( "sin", php_fonction);
+               rule.addWord( "sizeof", php_fonction);
+               rule.addWord( "sleep", php_fonction);
+               rule.addWord( "socket_get_status", php_fonction);
+               rule.addWord( "socket_set_blocking", php_fonction);
+               rule.addWord( "socket_set_timeout", php_fonction);
+               rule.addWord( "sort", php_fonction);
+               rule.addWord( "soundex", php_fonction);
+               rule.addWord( "sprintf", php_fonction);
+               rule.addWord( "sqrt", php_fonction);
+               rule.addWord( "srand", php_fonction);
+               rule.addWord( "sscanf", php_fonction);
+               rule.addWord( "stat", php_fonction);
+               rule.addWord( "str_pad", php_fonction);
+               rule.addWord( "str_repeat", php_fonction);
+               rule.addWord( "str_replace", php_fonction);
+               rule.addWord( "strcasecmp", php_fonction);
+               rule.addWord( "strchr", php_fonction);
+               rule.addWord( "strcmp", php_fonction);
+               rule.addWord( "strcoll", php_fonction);
+               rule.addWord( "strcspn", php_fonction);
+               rule.addWord( "strftime", php_fonction);
+               rule.addWord( "strip_tags", php_fonction);
+               rule.addWord( "stripcslashes", php_fonction);
+               rule.addWord( "stripslashes", php_fonction);
+               rule.addWord( "stristr", php_fonction);
+               rule.addWord( "strlen", php_fonction);
+               rule.addWord( "strnatcasecmp", php_fonction);
+               rule.addWord( "strnatcmp", php_fonction);
+               rule.addWord( "strncasecmp", php_fonction);
+               rule.addWord( "strncmp", php_fonction);
+               rule.addWord( "strpos", php_fonction);
+               rule.addWord( "strrchr", php_fonction);
+               rule.addWord( "strrev", php_fonction);
+               rule.addWord( "strrpos", php_fonction);
+               rule.addWord( "strspn", php_fonction);
+               rule.addWord( "strstr", php_fonction);
+               rule.addWord( "strtok", php_fonction);
+               rule.addWord( "strtolower", php_fonction);
+               rule.addWord( "strtotime", php_fonction);
+               rule.addWord( "strtoupper", php_fonction);
+               rule.addWord( "strtr", php_fonction);
+               rule.addWord( "strval", php_fonction);
+               rule.addWord( "substr", php_fonction);
+               rule.addWord( "substr_count", php_fonction);
+               rule.addWord( "substr_replace", php_fonction);
+               rule.addWord( "symlink", php_fonction);
+               rule.addWord( "syslog", php_fonction);
+               rule.addWord( "tan", php_fonction);
+               rule.addWord( "tempnam", php_fonction);
+               rule.addWord( "time", php_fonction);
+               rule.addWord( "tmpfile", php_fonction);
+               rule.addWord( "touch", php_fonction);
+               rule.addWord( "trigger_error", php_fonction);
+               rule.addWord( "trim", php_fonction);
+               rule.addWord( "uasort", php_fonction);
+               rule.addWord( "ucfirst", php_fonction);
+               rule.addWord( "ucwords", php_fonction);
+               rule.addWord( "uksort", php_fonction);
+               rule.addWord( "umask", php_fonction);
+               rule.addWord( "uniqid", php_fonction);
+               rule.addWord( "unixtojd", php_fonction);
+               rule.addWord( "unlink", php_fonction);
+               rule.addWord( "unpack", php_fonction);
+               rule.addWord( "unserialize", php_fonction);
+               rule.addWord( "unset", php_fonction);
+               rule.addWord( "urldecode", php_fonction);
+               rule.addWord( "urlencode", php_fonction);
+               rule.addWord( "user_error", php_fonction);
+               rule.addWord( "usleep", php_fonction);
+               rule.addWord( "usort", php_fonction);
+               rule.addWord( "var_dump", php_fonction);
+               rule.addWord( "virtual", php_fonction);
+               rule.addWord( "wordwrap", php_fonction);
+               rule.addWord( "zend_logo_guid", php_fonction);
+               rule.addWord( "zend_version ", php_fonction);
 
+               rules.add(rule);
+               
                // Add generic whitespace rule.
                rules.add(new WhitespaceRule(new WhitespaceDetector()));
 
                IRule[] result = new IRule[rules.size()];
                rules.toArray(result);
-
+               
                setRules(result);
        }
 }
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/editors/PHPTagScanner.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/editors/PHPTagScanner.java
deleted file mode 100644 (file)
index e39eff8..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-package net.sourceforge.phpeclipse.editors;
-
-import org.eclipse.jface.text.*;
-import java.util.*;
-import org.eclipse.jface.text.rules.*;
-
-public class PHPTagScanner extends RuleBasedScanner {
-
-       public PHPTagScanner(ColorManager manager) {
-               IToken string =
-                       new Token(
-                               new TextAttribute(manager.getColor(IPHPColorConstants.STRING)));
-
-               Vector rules = new Vector();
-
-               // Add rule for single and double quotes
-               rules.add(new SingleLineRule("\"", "\"", string, '\\'));
-               rules.add(new SingleLineRule("'", "'", string, '\\'));
-
-               // Add generic whitespace rule.
-               rules.add(new WhitespaceRule(new WhitespaceDetector()));
-
-               IRule[] result = new IRule[rules.size()];
-               rules.copyInto(result);
-               setRules(result);
-       }
-       public IToken nextToken() {
-               return super.nextToken();
-       }
-}
index 7a53f1c..b0b3ac3 100644 (file)
@@ -4,28 +4,29 @@ import org.eclipse.jface.text.rules.*;
 
 public class TagRule extends MultiLineRule {
 
-       public TagRule(IToken token) {
-               super("<", ">", token);
-       }
-       protected boolean sequenceDetected(
-               ICharacterScanner scanner,
-               char[] sequence,
-               boolean eofAllowed) {
-               int c = scanner.read();
-               if (sequence[0] == '<') {
-                       if (c == '?') {
-                               // processing instruction - abort
-                               scanner.unread();
-                               return false;
-                       }
-                       if (c == '!') {
-                               scanner.unread();
-                               // comment - abort
-                               return false;
-                       }
-               } else if (sequence[0] == '>') {
+public TagRule(IToken token) {
+       super("<", ">", token);
+}
+
+protected boolean sequenceDetected(
+       ICharacterScanner scanner,
+       char[] sequence,
+       boolean eofAllowed) {
+       int c = scanner.read();
+       if (sequence[0] == '<') {
+               if (c == '?') {
+                       // processing instruction - abort
                        scanner.unread();
+                       return false;
                }
-               return super.sequenceDetected(scanner, sequence, eofAllowed);
+               if (c == '!') {
+                       scanner.unread();
+                       // comment - abort
+                       return false;
+               }
+       } else if (sequence[0] == '>') {
+               scanner.unread();
        }
+       return super.sequenceDetected(scanner, sequence, eofAllowed);
+}
 }