[SCM] Lisaac eclipse plugin branch, master, updated. ccdfb844cc92fcf04ff7f8122ccb106df4a150c7

Damien Bouvarel dams.bouvarel at wanadoo.fr
Thu May 21 18:46:09 UTC 2009


The following commit has been merged in the master branch:
commit ccdfb844cc92fcf04ff7f8122ccb106df4a150c7
Author: Damien Bouvarel <dams.bouvarel at wanadoo.fr>
Date:   Tue May 19 11:22:10 2009 +0200

    problem underline + overview ruler + lisaac lookup bugfix

diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
index da76e01..274e562 100644
--- a/.settings/org.eclipse.jdt.core.prefs
+++ b/.settings/org.eclipse.jdt.core.prefs
@@ -1,12 +1,12 @@
-#Fri Mar 27 19:34:14 CET 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
+#Fri May 08 09:50:14 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/META-INF/MANIFEST.MF b/META-INF/MANIFEST.MF
index 32e5317..1d48dc8 100644
--- a/META-INF/MANIFEST.MF
+++ b/META-INF/MANIFEST.MF
@@ -13,7 +13,8 @@ Require-Bundle: org.eclipse.ui,
  org.eclipse.ui.console,
  org.eclipse.jdt.ui,
  org.eclipse.debug.ui,
- org.eclipse.ui.cheatsheets
+ org.eclipse.ui.cheatsheets,
+ org.eclipse.ltk.core.refactoring
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
 Bundle-ClassPath: .
diff --git a/build.properties b/build.properties
index 20609d8..a97c2fe 100644
--- a/build.properties
+++ b/build.properties
@@ -7,8 +7,9 @@ bin.includes = plugin.xml,\
                *.xml,\
                plugin.properties,\
                help/,\
-               bin/,\
-               plugin_fr.properties
+               plugin_fr.properties,\
+               build.properties,\
+               .classpath
 src.includes = src/,\
                help/,\
                icons/,\
diff --git a/plugin.properties b/plugin.properties
index 09e6d92..5d3c6ed 100644
--- a/plugin.properties
+++ b/plugin.properties
@@ -2,7 +2,7 @@
 Bundle-Name.0 = Lisaac Plug-in
 editor.name.0 = Lisaac Editor
 editor.name.1 = Lip Editor
-perspective.name.0 = Lisaac Perspective
+perspective.name.0 = Lisaac
 page.name.0 = Lisaac
 page.name.1 = Templates
 page.name.2 = Syntax Coloring
diff --git a/plugin.xml b/plugin.xml
index 32697b8..04b540c 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -6,13 +6,13 @@
          id="lisaacProblem"
          name="Lisaac Problem"
          point="org.eclipse.core.resources.markers">
-      <super
-            type="org.eclipse.core.resources.problemmarker">
-      </super>
       <persistent
             value="true">
       </persistent>
       <super
+            type="org.eclipse.core.resources.problemmarker">
+      </super>
+      <super
             type="org.eclipse.core.resources.textmarker">
       </super>
    </extension>
@@ -53,6 +53,9 @@
             icon="$nl$/icons/releng_gears.gif"
             class="org.eclipse.lisaac.perspectives.LisaacPerspective"
             id="org.eclipse.lisaac.perspectives.LisaacPerspective">
+         <description>
+            Perspective for Lisaac Development
+         </description>
       </perspective>
    </extension>
    <extension
@@ -426,17 +429,6 @@
       </type>
    </extension>
    <extension
-         point="org.eclipse.ui.editors.markerAnnotationSpecification">
-      <specification
-            annotationType="org.eclipse.lisaac.annotationtype"
-            colorPreferenceValue="180,207,205"
-            includeOnPreferencePage="true"
-            label="%specification.label.0"
-            presentationLayer="3"
-            symbolicIcon="error">
-      </specification>
-   </extension>
-   <extension
          point="org.eclipse.ui.decorators">
       <decorator
             class="org.eclipse.lisaac.editors.LisaacResourceDecorator"
@@ -452,5 +444,34 @@
          </enablement>
       </decorator>
    </extension>
+   <extension
+         point="org.eclipse.ui.editors.markerAnnotationSpecification">
+      <specification
+            annotationType="org.eclipse.lisaac.annotationtype"
+            colorPreferenceKey="errorIndicationColor"
+            colorPreferenceValue="255,0,128"
+            contributesToHeader="true"
+            highlightPreferenceKey="errorIndicationHighlighting"
+            highlightPreferenceValue="false"
+            includeOnPreferencePage="true"
+            isGoToNextNavigationTarget="true"
+            isGoToNextNavigationTargetKey="isErrorGoToNextNavigationTarget"
+            isGoToPreviousNavigationTarget="true"
+            isGoToPreviousNavigationTargetKey="isErrorGoToPreviousNavigationTarget"
+            label="Lisaac Annotation"
+            overviewRulerPreferenceKey="errorIndicationInOverviewRuler"
+            overviewRulerPreferenceValue="true"
+            presentationLayer="6"
+            showInNextPrevDropdownToolbarAction="true"
+            showInNextPrevDropdownToolbarActionKey="showErrorInNextPrevDropdownToolbarAction"
+            symbolicIcon="error"
+            textPreferenceKey="errorIndication"
+            textPreferenceValue="true"
+            textStylePreferenceKey="errorTextStyle"
+            textStylePreferenceValue="DASHED_BOX"
+            verticalRulerPreferenceKey="errorIndicationInVerticalRuler"
+            verticalRulerPreferenceValue="true">
+      </specification>
+   </extension>
 
 </plugin>
diff --git a/src/org/eclipse/lisaac/LisaacPlugin.java b/src/org/eclipse/lisaac/LisaacPlugin.java
index f1edb25..0923f24 100644
--- a/src/org/eclipse/lisaac/LisaacPlugin.java
+++ b/src/org/eclipse/lisaac/LisaacPlugin.java
@@ -6,7 +6,6 @@ import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.text.templates.ContextTypeRegistry;
 import org.eclipse.jface.text.templates.persistence.TemplateStore;
@@ -54,7 +53,7 @@ public class LisaacPlugin extends AbstractUIPlugin {
 				.log(
 						new Status(
 								IStatus.ERROR,
-								"org.eclipse.lisaac", IStatus.OK, "", e)); //$NON-NLS-1$ //$NON-NLS-2$
+								PLUGIN_ID, IStatus.OK, "", e)); //$NON-NLS-1$ //$NON-NLS-2$
 			}
 		}
 		return fStore;
@@ -93,8 +92,8 @@ public class LisaacPlugin extends AbstractUIPlugin {
 					new LisaacModel(projects[i]);
 					//
 				} catch (Exception e) {
-					MessageDialog.openError(getWorkbench().getActiveWorkbenchWindow().getShell(),
-							"Error loading "+projects[i].getName(), e.getMessage()); //$NON-NLS-1$
+					log(new Status(IStatus.ERROR,
+							PLUGIN_ID, IStatus.OK, "Error loading "+projects[i].getName(), e)); //$NON-NLS-1$
 				}
 			}
 		}
diff --git a/src/org/eclipse/lisaac/builder/LisaacBuilder.java b/src/org/eclipse/lisaac/builder/LisaacBuilder.java
index dac637f..dd273b4 100644
--- a/src/org/eclipse/lisaac/builder/LisaacBuilder.java
+++ b/src/org/eclipse/lisaac/builder/LisaacBuilder.java
@@ -69,6 +69,7 @@ public class LisaacBuilder extends IncrementalProjectBuilder {
 				try {
 					marker.setAttribute(IMarker.CHAR_START, position.getCharStart());
 					marker.setAttribute(IMarker.CHAR_END, position.getCharEnd());
+			
 				} catch (CoreException e) {
 				}
 			}
diff --git a/src/org/eclipse/lisaac/editors/AbstractLisaacEditor.java b/src/org/eclipse/lisaac/editors/AbstractLisaacEditor.java
index 414ee64..20e116b 100644
--- a/src/org/eclipse/lisaac/editors/AbstractLisaacEditor.java
+++ b/src/org/eclipse/lisaac/editors/AbstractLisaacEditor.java
@@ -1,14 +1,12 @@
 package org.eclipse.lisaac.editors;
 
+import java.util.ArrayList;
+import java.util.List;
 import java.util.ListResourceBundle;
-import java.util.Timer;
-import java.util.TimerTask;
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.text.IDocument;
@@ -16,14 +14,17 @@ import org.eclipse.jface.text.ITextViewerExtension2;
 import org.eclipse.jface.text.contentassist.ContentAssistant;
 import org.eclipse.jface.text.contentassist.IContentAssistant;
 import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.lisaac.LisaacMessages;
+import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.lisaac.LisaacPlugin;
 import org.eclipse.lisaac.model.LisaacModel;
 import org.eclipse.lisaac.preferences.PreferenceConstants;
 import org.eclipse.lisaac.views.LisaacOutlineView;
 import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.editors.text.EditorsUI;
 import org.eclipse.ui.editors.text.TextEditor;
 import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.texteditor.AbstractTextEditor;
+import org.eclipse.ui.texteditor.ChainedPreferenceStore;
 import org.eclipse.ui.texteditor.ContentAssistAction;
 import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
 import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
@@ -49,14 +50,31 @@ public class AbstractLisaacEditor extends TextEditor {
 		setDocumentProvider(new LisaacDocumentProvider());
 
 		IPreferenceStore store = LisaacPlugin.getDefault().getPreferenceStore();
-		setPreferenceStore(store);
-
+		
 		// wide caret
 		store.setDefault(PREFERENCE_USE_CUSTOM_CARETS, true);
 		store.setDefault(PREFERENCE_WIDE_CARET, true);
 		refreshDone = false;
+		
+		store = getChainedPreferenceStore();
+		setPreferenceStore(store);
+	
 	}
 
+	 /**
+     * Returns the preference store to be used by this editor.
+     * @return the preference store to be used by this editor
+     */
+    private IPreferenceStore getChainedPreferenceStore() {
+        List<IPreferenceStore> stores = new ArrayList<IPreferenceStore>();
+
+        stores.add(LisaacPlugin.getDefault().getPreferenceStore());
+        stores.add(EditorsUI.getPreferenceStore());
+
+        return new ChainedPreferenceStore(stores.toArray(new IPreferenceStore[0]));
+    }
+
+ 
 	protected void handleCursorPositionChanged() {
 		super.handleCursorPositionChanged();
 		if (! refreshDone) {
diff --git a/src/org/eclipse/lisaac/editors/LisaacConfiguration.java b/src/org/eclipse/lisaac/editors/LisaacConfiguration.java
index 841b766..0a218a2 100644
--- a/src/org/eclipse/lisaac/editors/LisaacConfiguration.java
+++ b/src/org/eclipse/lisaac/editors/LisaacConfiguration.java
@@ -14,6 +14,8 @@ import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
 import org.eclipse.jface.text.hyperlink.URLHyperlinkDetector;
 import org.eclipse.jface.text.presentation.IPresentationReconciler;
 import org.eclipse.jface.text.presentation.PresentationReconciler;
+import org.eclipse.jface.text.quickassist.IQuickAssistAssistant;
+import org.eclipse.jface.text.quickassist.QuickAssistAssistant;
 import org.eclipse.jface.text.rules.Token;
 import org.eclipse.jface.text.source.ISourceViewer;
 import org.eclipse.jface.text.source.SourceViewerConfiguration;
@@ -85,6 +87,7 @@ public class LisaacConfiguration extends SourceViewerConfiguration {
 		}
         return contentAssistant;
 	}
+
 	
 	public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType) {
 		if (textHover != null) {
@@ -163,4 +166,33 @@ public class LisaacConfiguration extends SourceViewerConfiguration {
 		
 		return reconciler;
 	}
+	
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getQuickAssistAssistant(org.eclipse.jface.text.source.ISourceViewer)
+     */
+  /*  public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) {
+        // create a content assistant:
+    	
+    	 QuickAssistAssistant assistant = new QuickAssistAssistant();
+    	 assistant.setQuickAssistProcessor(new LisaacQuickAssistProcessor());
+    	 assistant.setStatusLineVisible(true);
+    	 assistant.setStatusMessage("Lisaac QuickFix");
+    	 
+    	 
+        assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
+
+        
+        return assistant;
+    }
+*/
+	/*
+	public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer){
+        QuickAssistAssistant qaa = new QuickAssistAssistant();
+        qaa.setQuickAssistProcessor(new LisaacQuickAssistProcessor());
+        qaa.setStatusLineVisible(true);
+        qaa.setStatusMessage("Lisaac QuickFix");
+        return qaa;
+    }*/
 }
\ No newline at end of file
diff --git a/src/org/eclipse/lisaac/model/AbstractLisaacParser.java b/src/org/eclipse/lisaac/model/AbstractLisaacParser.java
index a20ca75..dcf3965 100644
--- a/src/org/eclipse/lisaac/model/AbstractLisaacParser.java
+++ b/src/org/eclipse/lisaac/model/AbstractLisaacParser.java
@@ -52,6 +52,40 @@ public class AbstractLisaacParser {
 		result = new Position(pos_line, pos_col, pos_cur, len);
 		return result;
 	}
+	
+	public Position getLine() {
+		Position result=null;
+		int startLine = pos_cur;
+		int endLine = position+1;
+		
+		while (pos_cur < position) {
+			if (source.charAt(pos_cur) == '\n') {
+				pos_col = 0;
+				pos_line++;
+				startLine = pos_cur+1;
+			} else {
+				pos_col++;
+			}
+			pos_cur++;
+		}
+		if (pos_line > 32767) {
+			result = new Position(32767, pos_col, pos_cur);
+			reporter.syntaxError ("Line counter overflow.",result);
+		}
+		if (pos_col > 255) {
+			result = new Position(pos_line, 255, pos_cur);
+			reporter.syntaxError ("Column counter overflow (line too long).",result);
+		};
+		while (endLine <= source.length()-1) {
+			if (source.charAt(endLine) == '\n') {
+				break;
+			}
+			endLine++;
+		}
+		result = new Position(pos_line, pos_col, endLine, endLine - startLine);
+		return result;
+	}
+	
 	public String getSource() {
 		return source;
 	}
diff --git a/src/org/eclipse/lisaac/model/LipParser.java b/src/org/eclipse/lisaac/model/LipParser.java
index c5af3b4..5ca3042 100644
--- a/src/org/eclipse/lisaac/model/LipParser.java
+++ b/src/org/eclipse/lisaac/model/LipParser.java
@@ -1,458 +1,458 @@
-package org.eclipse.lisaac.model;
-
-import java.io.InputStream;
-import java.util.ArrayList;
-
-import org.eclipse.lisaac.model.lip.*;
-
-
-public class LipParser extends AbstractLisaacParser {
-
-	public LIP lipFile;
-
-	public LipParser(InputStream contents, ILisaacModel model) {
-		super(contents, model);
-		this.lipFile = model.getLipCode();
-	}
-
-	//
-	// Parser for LIP file.
-	// 
-
-	////PROGRAM      -> { 'Section' ('Inherit' | 'Public' | 'Private') { SLOT ';' } } 
-	public boolean parse() {
-		boolean result=false;
-
-		while (readThisKeyword(ILisaacModel.keyword_section)) {
-			if (readThisKeyword(ILisaacModel.section_inherit)) {
-				// { '+' string ':' STRING [ ':=' string ] ';' }
-				while (readCharacter('+')) {
-					if (! readIdentifier()) {
-						reporter.syntaxError("Identifier needed.", getPosition());
-						return false;
-					}
-					if (! readCharacter(':')) {
-						reporter.syntaxError("Added ':' is needed.", getPosition());
-						return false;
-					}
-					if (! readWord(ILisaacModel.prototype_string)) {
-						reporter.warning("`STRING' type needed.", getPosition());
-					}
-					if (readSymbol(ILisaacModel.symbol_affect_immediate)) {
-						if (! readString()) {
-							reporter.syntaxError("String needed.", getPosition());
-							return false;
-						}
-						string_tmp = new String(lipFile.getFileName());
-						while (string_tmp.length() > 0) {
-							char c = string_tmp.charAt(string_tmp.length()-1);
-							if (c == '/' || c == '\\') {
-								break;
-							}// FIXME use index
-							string_tmp = string_tmp.substring(0, string_tmp.length()-1);
-						}
-						string_tmp += lastString;
-					} else {
-						string_tmp = "";
-					}
-					// add parent slot
-					lipFile.addParent(getString(string_tmp));
-					//
-					if (! readCharacter(';')) {
-						reporter.syntaxError("Added ';' is needed.", getPosition());
-						return false;
-					}
-					result = true;
-				}
-			} else if (readThisKeyword(ILisaacModel.section_public) ||
-					readThisKeyword(ILisaacModel.section_private)) {
-				String section = new String(lastString);
-				while (readSlot(section)) {
-					if (! readCharacter(';')) {
-						reporter.syntaxError("Added ';' is needed.", getPosition());
-						return false;
-					}
-					result = true;
-				}
-			} else {
-				reporter.syntaxError("`Public' or `Private' or `Inherit' needed.", getPosition());
-				return false;	
-			}
-		}
-		if (position < source.length()-2) {
-			result = false;
-		}
-		return result;
-	} 
-
-	//// SLOT         -> '+' identifier ':' TYPE [ ':=' EXPR_CONSTANT ]
-	////               | '-' identifier [ identifier ':' TYPE ] '<-' '(' { EXPR ';' } ')' 
-	private boolean readSlot(String sec) {
-		boolean result=false;
-		LIPSlotData data=null;
-
-		if (readCharacter('+')) {
-			// Data.
-			result = true;
-			if (sec.equals(ILisaacModel.section_public)) {
-				reporter.syntaxError("No data in Public section.", getPosition());
-			}
-			if (! readIdentifier()) {
-				reporter.syntaxError("Identifier is incorrect.", getPosition());
-				return false;
-			}
-			String n = new String(lastString);
-			if (! readCharacter(':')) {
-				reporter.syntaxError("Added ':' is needed.", getPosition());
-				return false;
-			}
-			LIPConstant t = readType();
-			if (t == null) {
-				reporter.syntaxError("type is incorrect.", getPosition());
-				return false;
-			}
-			data = new LIPSlotData(n, t);
-			//
-			lipFile.addData(data);
-			//
-			if (readSymbol(LisaacModel.symbol_affect_immediate)) {
-				LIPConstant cst = readExprConstant();
-				if (cst == null) {
-					reporter.syntaxError("Incorrect expression.", getPosition());
-					return false;
-				}
-				data.setValue(cst);
-				cst.free();
-			}
-		} else if (readCharacter('-')) {
-			// Function.
-			result = true;
-			if (! readIdentifier()) {
-				reporter.syntaxError("Identifier is incorrect.", getPosition());
-				return false;
-			}
-			//Position pos = getPosition();
-			setCatchComment();
-
-			String n = new String(lastString);
-			if (readIdentifier()) {
-				String na = new String(lastString);
-				if (! readCharacter(':')) {
-					reporter.syntaxError("Added ':' is needed.", getPosition());
-					return false;
-				}
-				LIPConstant t = readType();
-				if (t == null) {
-					reporter.syntaxError("Incorrect type.", getPosition());
-					return false;
-				}
-				data = new LIPSlotData(na, t);// do not add argument do lipFile
-			}
-			//
-			if (! readSymbol(ILisaacModel.symbol_affect_code)) {
-				reporter.syntaxError("Added '<-' is needed.", getPosition());
-				return false;
-			}
-			if (! readCharacter('(')) {
-				reporter.syntaxError("Added '(' is needed.", getPosition());
-				return false;
-			}
-			setCatchCommentOff();
-			ArrayList<LIPCode> code = new ArrayList<LIPCode>();
-			LIPCode instr;
-			while ((instr = readExpr()) != null) {
-				code.add(instr);
-				if (! readCharacter(';')) {
-					reporter.syntaxError("Added ';' is needed.", getPosition());
-					return false;
-				}
-			}
-			if (! readCharacter(')')) {
-				reporter.syntaxError("Added ')' is needed.", getPosition());
-				return false;
-			}
-			LIPSlotCode slotCode = new LIPSlotCode(sec, n, data, code.toArray(new LIPCode[code.size()]));
-			lipFile.addMethod(slotCode);
-			if (sec.equals(ILisaacModel.section_public)) {
-				if (lastComment == null || lastComment.length() == 0) {
-					reporter.syntaxError("Comment needed.", getPosition());
-				} else {
-					slotCode.setComment(lastComment);
-				}
-			}
-		}
-		return result;
-	}
-
-	////TYPE         -> 'BOOLEAN' | 'STRING' | 'INTEGER'
-	private LIPConstant readType() {
-		LIPConstant result=null;
-
-		if (readCapIdentifier()) {
-			if (lastString.equals(ILisaacModel.prototype_integer)) {
-				result = LIPInteger.get(0);
-			} else if (lastString.equals(ILisaacModel.prototype_string)) {
-				result = LIPString.get(getString(""));
-			} else if (lastString.equals(ILisaacModel.prototype_boolean)) {
-				result = LIPBoolean.get(false);
-			} else {
-				reporter.syntaxError("Incorrect type.", getPosition());
-			}
-		}
-		return result;
-	}
-
-	//// EXPR         -> [ identifier !!AMBIGU!! ':=' ] EXPR_OPERATOR [ '.' FUNCTION ]
-	private LIPCode readExpr() {
-		LIPCode result=null;
-
-		saveContext(); // !! SAVE CONTEXT !!
-
-		if (readIdentifier()) {
-			String name = new String(lastString);
-			if (readSymbol(ILisaacModel.symbol_affect_immediate)) {
-				LIPCode val = readExprOperator();
-				if (val == null) {
-					reporter.syntaxError("Incorrect expression.", getPosition());
-					return null;
-				}
-				result = new LIPAffect(name, val);
-			} else {
-				restoreContext(); // !! RESTORE CONTEXT !!
-			}
-		}
-		if (result == null) {
-			result = readExprOperator();
-			if (result != null && readCharacter('.')) {
-				result = readFunction(result);
-				if (result == null) {
-					reporter.syntaxError("Incorrect slot.", getPosition());
-					return null;
-				}
-			}
-		}
-		return result;
-	}
-
-	//// FUNCTION     -> 'if' '{' { EXPR ';' }  '}' [ 'else' '{' { EXPR ';' } '}' ]
-	////               | 'print'
-	private LIPCode readFunction(LIPCode rec) {
-		LIPCode result=null;
-		ArrayList<LIPCode> thenArray=null, elseArray=null;
-
-		if (readWord(ILisaacModel.slot_if)) {
-			thenArray = new ArrayList<LIPCode>();
-			if (! readCharacter('{')) {
-				reporter.syntaxError("Added '{' is needed.", getPosition());
-				return null;
-			}
-			LIPCode val;
-			while ((val = readExpr()) != null) {
-				thenArray.add(val);
-				if (! readCharacter(';')) {
-					reporter.syntaxError("Added ';' is needed.", getPosition());
-					return null;
-				}
-			}
-			if (! readCharacter('}')) {
-				reporter.syntaxError("Added '}' is needed.", getPosition());
-				return null;
-			}
-			if (readWord(ILisaacModel.slot_else)) {
-				elseArray = new ArrayList<LIPCode>();
-				if (! readCharacter('{')) {
-					reporter.syntaxError("Added '{' is needed.", getPosition());
-					return null;
-				}
-				while ((val = readExpr()) != null) {
-					elseArray.add(val);
-					if (! readCharacter(';')) {
-						reporter.syntaxError("Added ';' is needed.", getPosition());
-						return null;
-					}
-				}
-				if (! readCharacter('}')) {
-					reporter.syntaxError("Added '}' is needed.", getPosition());
-					return null;
-				}
-			}
-			result = new LIPIf(rec, thenArray.toArray(new LIPCode[thenArray.size()]),
-					elseArray.toArray(new LIPCode[elseArray.size()]));
-		} else if (readWord(ILisaacModel.slot_print)) {
-			result = new LIPPrint(rec);
-		}
-		return result;
-	}
-
-	////EXPR_OPERATOR-> EXPR_CMP { ('|' | '&') EXPR_CMP }   
-	private LIPCode readExprOperator() {
-		LIPCode result=null;
-		boolean isOr=false;
-
-		result = readExprCmp();
-		if (result != null) {
-			while ((isOr = readCharacter('|')) || readCharacter('&')) {
-				LIPCode right = readExprCmp();
-				if (right == null) {
-					reporter.syntaxError("Incorrect expression.", getPosition());
-					return null;
-				}
-				if (isOr) {
-					result = new LIPBinary(result, '|', right);
-				} else {
-					result = new LIPBinary(result, '&', right);
-				}
-			}
-		}
-		return result;
-	}
-
-	////EXPR_CMP     -> EXPR_BINARY { ('='|'!='|'>'|'<'|'>='|'<=') EXPR_BINARY }
-	private LIPCode readExprCmp() {
-
-		LIPCode result = readExprBinary();
-		if (result != null) {
-			while (readSymbol(ILisaacModel.symbol_great_equal) ||
-					readSymbol(ILisaacModel.symbol_less_equal) ||
-					readSymbol(ILisaacModel.symbol_not_equal) ||
-					readSymbol(ILisaacModel.symbol_equal) ||
-					readSymbol(ILisaacModel.symbol_great) ||
-					readSymbol(ILisaacModel.symbol_less)) {
-				String op = new String(lastString);
-				LIPCode right = readExprBinary();
-				if (right == null) {
-					reporter.syntaxError("Incorrect expression.", getPosition());
-					return null;
-				}
-				char type = 0;
-				if (op.equals(">=")) {
-					type = 'S';
-				} else if (op.equals("<=")) {
-					type = 'I';
-				} else if (op.equals("!=")) {
-					type = 'E';
-				} else if (op.equals("=")) {
-					type = '=';
-				} else if (op.equals(">")) {
-					type = '>';
-				} else if (op.equals("<")) {
-					type = '<';
-				}
-				result = new LIPBinary(result, type, right);	
-			}
-		}
-		return result;
-	}
-
-	////EXPR_BINARY  -> EXPR_UNARY { ('-'|'+') EXPR_UNARY }
-	private LIPCode readExprBinary() {
-		boolean isSub;
-
-		LIPCode result = readExprUnary();
-		if (result != null) {
-			while ((isSub = readCharacter('-')) || readCharacter('+')) {
-				LIPCode right = readExprUnary();
-				if (right == null) {
-					reporter.syntaxError("Incorrect expression.", getPosition());
-					return null;
-				}
-				if (isSub) {
-					result = new LIPBinary(result, '-', right);
-				} else {
-					result = new LIPBinary(result, '+', right);
-				}
-			}
-		}
-		return result;
-	}
-
-	//// EXPR_UNARY   -> ( '-' | '!' ) EXPR_UNARY
-	////               | EXPR_BASE
-	////               | identifier [ EXPR_ARGUMENT ]
-	private LIPCode readExprUnary() {
-		LIPCode result=null;
-		boolean isNeg;
-
-		if ((isNeg = readCharacter('-')) || readCharacter('!')) {
-			result = readExprUnary();
-			if (result == null) {
-				reporter.syntaxError("Incorrect expression.", getPosition());
-				return null;
-			}
-			char type;
-			if (isNeg) {
-				type = '-';
-			} else {
-				type = '+';
-			}
-			result = new LIPUnary(type, result);
-		} else if (readIdentifier()) {
-			String name = new String(lastString);
-			LIPCode arg = readExprArgument();
-			result = new LIPCall(name, arg);
-		} else {
-			result = readExprBase();
-		}
-		return result;
-	}
-
-	//// EXPR_BASE    -> '(' EXPR_OPERATOR ')'
-	////               | EXPR_CONSTANT
-	private LIPCode readExprBase() {
-		LIPCode result=null;
-
-		if (readCharacter('(')) {
-			result = readExprOperator();
-			if (result == null) {
-				reporter.syntaxError("Incorrect expression.", getPosition());
-				return null;
-			}
-			if (! readCharacter(')')) {
-				reporter.syntaxError("Added ')' is needed.", getPosition());
-				return null;
-			}
-		} else {
-			LIPConstant v = readExprConstant();
-			if (v != null) {
-				result = new LIPValue(v);
-			}
-		}
-		return result;
-	}
-
-	////EXPR_CONSTANT-> integer              
-	////               | string
-	////               | TRUE
-	////               | FALSE
-	private LIPConstant readExprConstant() {
-		LIPConstant result=null;
-
-		if (readInteger()) {
-			result = LIPInteger.get((int)lastInteger);
-		} else if (readString()) {
-			result = LIPString.get(lastString);
-		} else if (readCapIdentifier()) {
-			if (lastString.equals(ILisaacModel.prototype_true)) {
-				result = LIPBoolean.get(true);
-			} else if (lastString.equals(ILisaacModel.prototype_false)){
-				result = LIPBoolean.get(false);	
-			} else {
-				reporter.syntaxError("Type incorrect.", getPosition());
-			}
-		}
-		return result;
-	}
-
-	//// EXPR_ARGUMENT-> identifier 
-	////               | EXPR_BASE
-	private LIPCode readExprArgument() {
-		LIPCode result=null;
-
-		if (readIdentifier()) {
-			result = new LIPCall(lastString, null);
-		} else {
-			result = readExprBase();
-		}
-		return result;
-	}
-}
+package org.eclipse.lisaac.model;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+
+import org.eclipse.lisaac.model.lip.*;
+
+
+public class LipParser extends AbstractLisaacParser {
+
+	public LIP lipFile;
+
+	public LipParser(InputStream contents, ILisaacModel model) {
+		super(contents, model);
+		this.lipFile = model.getLipCode();
+	}
+
+	//
+	// Parser for LIP file.
+	// 
+
+	////PROGRAM      -> { 'Section' ('Inherit' | 'Public' | 'Private') { SLOT ';' } } 
+	public boolean parse() {
+		boolean result=false;
+
+		while (readThisKeyword(ILisaacModel.keyword_section)) {
+			if (readThisKeyword(ILisaacModel.section_inherit)) {
+				// { '+' string ':' STRING [ ':=' string ] ';' }
+				while (readCharacter('+')) {
+					if (! readIdentifier()) {
+						reporter.syntaxError("Identifier needed.", getLine());
+						return false;
+					}
+					if (! readCharacter(':')) {
+						reporter.syntaxError("Added ':' is needed.", getLine());
+						return false;
+					}
+					if (! readWord(ILisaacModel.prototype_string)) {
+						reporter.warning("`STRING' type needed.", getLine());
+					}
+					if (readSymbol(ILisaacModel.symbol_affect_immediate)) {
+						if (! readString()) {
+							reporter.syntaxError("String needed.", getLine());
+							return false;
+						}
+						string_tmp = new String(lipFile.getFileName());
+						while (string_tmp.length() > 0) {
+							char c = string_tmp.charAt(string_tmp.length()-1);
+							if (c == '/' || c == '\\') {
+								break;
+							}// FIXME use index
+							string_tmp = string_tmp.substring(0, string_tmp.length()-1);
+						}
+						string_tmp += lastString;
+					} else {
+						string_tmp = "";
+					}
+					// add parent slot
+					lipFile.addParent(getString(string_tmp));
+					//
+					if (! readCharacter(';')) {
+						reporter.syntaxError("Added ';' is needed.", getLine());
+						return false;
+					}
+					result = true;
+				}
+			} else if (readThisKeyword(ILisaacModel.section_public) ||
+					readThisKeyword(ILisaacModel.section_private)) {
+				String section = new String(lastString);
+				while (readSlot(section)) {
+					if (! readCharacter(';')) {
+						reporter.syntaxError("Added ';' is needed.", getLine());
+						return false;
+					}
+					result = true;
+				}
+			} else {
+				reporter.syntaxError("`Public' or `Private' or `Inherit' needed.", getLine());
+				return false;	
+			}
+		}
+		if (position < source.length()-2) {
+			result = false;
+		}
+		return result;
+	} 
+
+	//// SLOT         -> '+' identifier ':' TYPE [ ':=' EXPR_CONSTANT ]
+	////               | '-' identifier [ identifier ':' TYPE ] '<-' '(' { EXPR ';' } ')' 
+	private boolean readSlot(String sec) {
+		boolean result=false;
+		LIPSlotData data=null;
+
+		if (readCharacter('+')) {
+			// Data.
+			result = true;
+			if (sec.equals(ILisaacModel.section_public)) {
+				reporter.syntaxError("No data in Public section.", getPosition(1));
+			}
+			if (! readIdentifier()) {
+				reporter.syntaxError("Identifier is incorrect.", getLine());
+				return false;
+			}
+			String n = new String(lastString);
+			if (! readCharacter(':')) {
+				reporter.syntaxError("Added ':' is needed.", getLine());
+				return false;
+			}
+			LIPConstant t = readType();
+			if (t == null) {
+				reporter.syntaxError("type is incorrect.", getLine());
+				return false;
+			}
+			data = new LIPSlotData(n, t);
+			//
+			lipFile.addData(data);
+			//
+			if (readSymbol(LisaacModel.symbol_affect_immediate)) {
+				LIPConstant cst = readExprConstant();
+				if (cst == null) {
+					reporter.syntaxError("Incorrect expression.", getLine());
+					return false;
+				}
+				data.setValue(cst);
+				cst.free();
+			}
+		} else if (readCharacter('-')) {
+			// Function.
+			result = true;
+			if (! readIdentifier()) {
+				reporter.syntaxError("Identifier is incorrect.", getLine());
+				return false;
+			}
+			//Position pos = getPosition();
+			setCatchComment();
+
+			String n = new String(lastString);
+			if (readIdentifier()) {
+				String na = new String(lastString);
+				if (! readCharacter(':')) {
+					reporter.syntaxError("Added ':' is needed.", getLine());
+					return false;
+				}
+				LIPConstant t = readType();
+				if (t == null) {
+					reporter.syntaxError("Incorrect type.", getLine());
+					return false;
+				}
+				data = new LIPSlotData(na, t);// do not add argument do lipFile
+			}
+			//
+			if (! readSymbol(ILisaacModel.symbol_affect_code)) {
+				reporter.syntaxError("Added '<-' is needed.", getLine());
+				return false;
+			}
+			if (! readCharacter('(')) {
+				reporter.syntaxError("Added '(' is needed.", getLine());
+				return false;
+			}
+			setCatchCommentOff();
+			ArrayList<LIPCode> code = new ArrayList<LIPCode>();
+			LIPCode instr;
+			while ((instr = readExpr()) != null) {
+				code.add(instr);
+				if (! readCharacter(';')) {
+					reporter.syntaxError("Added ';' is needed.", getLine());
+					return false;
+				}
+			}
+			if (! readCharacter(')')) {
+				reporter.syntaxError("Added ')' is needed.", getLine());
+				return false;
+			}
+			LIPSlotCode slotCode = new LIPSlotCode(sec, n, data, code.toArray(new LIPCode[code.size()]));
+			lipFile.addMethod(slotCode);
+			if (sec.equals(ILisaacModel.section_public)) {
+				if (lastComment == null || lastComment.length() == 0) {
+					reporter.syntaxError("Comment needed.", getPosition());
+				} else {
+					slotCode.setComment(lastComment);
+				}
+			}
+		}
+		return result;
+	}
+
+	////TYPE         -> 'BOOLEAN' | 'STRING' | 'INTEGER'
+	private LIPConstant readType() {
+		LIPConstant result=null;
+
+		if (readCapIdentifier()) {
+			if (lastString.equals(ILisaacModel.prototype_integer)) {
+				result = LIPInteger.get(0);
+			} else if (lastString.equals(ILisaacModel.prototype_string)) {
+				result = LIPString.get(getString(""));
+			} else if (lastString.equals(ILisaacModel.prototype_boolean)) {
+				result = LIPBoolean.get(false);
+			} else {
+				reporter.syntaxError("Incorrect type.", getLine());
+			}
+		}
+		return result;
+	}
+
+	//// EXPR         -> [ identifier !!AMBIGU!! ':=' ] EXPR_OPERATOR [ '.' FUNCTION ]
+	private LIPCode readExpr() {
+		LIPCode result=null;
+
+		saveContext(); // !! SAVE CONTEXT !!
+
+		if (readIdentifier()) {
+			String name = new String(lastString);
+			if (readSymbol(ILisaacModel.symbol_affect_immediate)) {
+				LIPCode val = readExprOperator();
+				if (val == null) {
+					reporter.syntaxError("Incorrect expression.", getLine());
+					return null;
+				}
+				result = new LIPAffect(name, val);
+			} else {
+				restoreContext(); // !! RESTORE CONTEXT !!
+			}
+		}
+		if (result == null) {
+			result = readExprOperator();
+			if (result != null && readCharacter('.')) {
+				result = readFunction(result);
+				if (result == null) {
+					reporter.syntaxError("Incorrect slot.", getLine());
+					return null;
+				}
+			}
+		}
+		return result;
+	}
+
+	//// FUNCTION     -> 'if' '{' { EXPR ';' }  '}' [ 'else' '{' { EXPR ';' } '}' ]
+	////               | 'print'
+	private LIPCode readFunction(LIPCode rec) {
+		LIPCode result=null;
+		ArrayList<LIPCode> thenArray=null, elseArray=null;
+
+		if (readWord(ILisaacModel.slot_if)) {
+			thenArray = new ArrayList<LIPCode>();
+			if (! readCharacter('{')) {
+				reporter.syntaxError("Added '{' is needed.", getLine());
+				return null;
+			}
+			LIPCode val;
+			while ((val = readExpr()) != null) {
+				thenArray.add(val);
+				if (! readCharacter(';')) {
+					reporter.syntaxError("Added ';' is needed.", getLine());
+					return null;
+				}
+			}
+			if (! readCharacter('}')) {
+				reporter.syntaxError("Added '}' is needed.", getLine());
+				return null;
+			}
+			if (readWord(ILisaacModel.slot_else)) {
+				elseArray = new ArrayList<LIPCode>();
+				if (! readCharacter('{')) {
+					reporter.syntaxError("Added '{' is needed.", getLine());
+					return null;
+				}
+				while ((val = readExpr()) != null) {
+					elseArray.add(val);
+					if (! readCharacter(';')) {
+						reporter.syntaxError("Added ';' is needed.", getLine());
+						return null;
+					}
+				}
+				if (! readCharacter('}')) {
+					reporter.syntaxError("Added '}' is needed.", getLine());
+					return null;
+				}
+			}
+			result = new LIPIf(rec, thenArray.toArray(new LIPCode[thenArray.size()]),
+					elseArray.toArray(new LIPCode[elseArray.size()]));
+		} else if (readWord(ILisaacModel.slot_print)) {
+			result = new LIPPrint(rec);
+		}
+		return result;
+	}
+
+	////EXPR_OPERATOR-> EXPR_CMP { ('|' | '&') EXPR_CMP }   
+	private LIPCode readExprOperator() {
+		LIPCode result=null;
+		boolean isOr=false;
+
+		result = readExprCmp();
+		if (result != null) {
+			while ((isOr = readCharacter('|')) || readCharacter('&')) {
+				LIPCode right = readExprCmp();
+				if (right == null) {
+					reporter.syntaxError("Incorrect expression.", getLine());
+					return null;
+				}
+				if (isOr) {
+					result = new LIPBinary(result, '|', right);
+				} else {
+					result = new LIPBinary(result, '&', right);
+				}
+			}
+		}
+		return result;
+	}
+
+	////EXPR_CMP     -> EXPR_BINARY { ('='|'!='|'>'|'<'|'>='|'<=') EXPR_BINARY }
+	private LIPCode readExprCmp() {
+
+		LIPCode result = readExprBinary();
+		if (result != null) {
+			while (readSymbol(ILisaacModel.symbol_great_equal) ||
+					readSymbol(ILisaacModel.symbol_less_equal) ||
+					readSymbol(ILisaacModel.symbol_not_equal) ||
+					readSymbol(ILisaacModel.symbol_equal) ||
+					readSymbol(ILisaacModel.symbol_great) ||
+					readSymbol(ILisaacModel.symbol_less)) {
+				String op = new String(lastString);
+				LIPCode right = readExprBinary();
+				if (right == null) {
+					reporter.syntaxError("Incorrect expression.", getLine());
+					return null;
+				}
+				char type = 0;
+				if (op.equals(">=")) {
+					type = 'S';
+				} else if (op.equals("<=")) {
+					type = 'I';
+				} else if (op.equals("!=")) {
+					type = 'E';
+				} else if (op.equals("=")) {
+					type = '=';
+				} else if (op.equals(">")) {
+					type = '>';
+				} else if (op.equals("<")) {
+					type = '<';
+				}
+				result = new LIPBinary(result, type, right);	
+			}
+		}
+		return result;
+	}
+
+	////EXPR_BINARY  -> EXPR_UNARY { ('-'|'+') EXPR_UNARY }
+	private LIPCode readExprBinary() {
+		boolean isSub;
+
+		LIPCode result = readExprUnary();
+		if (result != null) {
+			while ((isSub = readCharacter('-')) || readCharacter('+')) {
+				LIPCode right = readExprUnary();
+				if (right == null) {
+					reporter.syntaxError("Incorrect expression.", getLine());
+					return null;
+				}
+				if (isSub) {
+					result = new LIPBinary(result, '-', right);
+				} else {
+					result = new LIPBinary(result, '+', right);
+				}
+			}
+		}
+		return result;
+	}
+
+	//// EXPR_UNARY   -> ( '-' | '!' ) EXPR_UNARY
+	////               | EXPR_BASE
+	////               | identifier [ EXPR_ARGUMENT ]
+	private LIPCode readExprUnary() {
+		LIPCode result=null;
+		boolean isNeg;
+
+		if ((isNeg = readCharacter('-')) || readCharacter('!')) {
+			result = readExprUnary();
+			if (result == null) {
+				reporter.syntaxError("Incorrect expression.", getLine());
+				return null;
+			}
+			char type;
+			if (isNeg) {
+				type = '-';
+			} else {
+				type = '+';
+			}
+			result = new LIPUnary(type, result);
+		} else if (readIdentifier()) {
+			String name = new String(lastString);
+			LIPCode arg = readExprArgument();
+			result = new LIPCall(name, arg);
+		} else {
+			result = readExprBase();
+		}
+		return result;
+	}
+
+	//// EXPR_BASE    -> '(' EXPR_OPERATOR ')'
+	////               | EXPR_CONSTANT
+	private LIPCode readExprBase() {
+		LIPCode result=null;
+
+		if (readCharacter('(')) {
+			result = readExprOperator();
+			if (result == null) {
+				reporter.syntaxError("Incorrect expression.", getLine());
+				return null;
+			}
+			if (! readCharacter(')')) {
+				reporter.syntaxError("Added ')' is needed.", getLine());
+				return null;
+			}
+		} else {
+			LIPConstant v = readExprConstant();
+			if (v != null) {
+				result = new LIPValue(v);
+			}
+		}
+		return result;
+	}
+
+	////EXPR_CONSTANT-> integer              
+	////               | string
+	////               | TRUE
+	////               | FALSE
+	private LIPConstant readExprConstant() {
+		LIPConstant result=null;
+
+		if (readInteger()) {
+			result = LIPInteger.get((int)lastInteger);
+		} else if (readString()) {
+			result = LIPString.get(lastString);
+		} else if (readCapIdentifier()) {
+			if (lastString.equals(ILisaacModel.prototype_true)) {
+				result = LIPBoolean.get(true);
+			} else if (lastString.equals(ILisaacModel.prototype_false)){
+				result = LIPBoolean.get(false);	
+			} else {
+				reporter.syntaxError("Type incorrect.", getLine());
+			}
+		}
+		return result;
+	}
+
+	//// EXPR_ARGUMENT-> identifier 
+	////               | EXPR_BASE
+	private LIPCode readExprArgument() {
+		LIPCode result=null;
+
+		if (readIdentifier()) {
+			result = new LIPCall(lastString, null);
+		} else {
+			result = readExprBase();
+		}
+		return result;
+	}
+}
diff --git a/src/org/eclipse/lisaac/model/LisaacParser.java b/src/org/eclipse/lisaac/model/LisaacParser.java
index 42deb3e..e560fe9 100644
--- a/src/org/eclipse/lisaac/model/LisaacParser.java
+++ b/src/org/eclipse/lisaac/model/LisaacParser.java
@@ -72,7 +72,7 @@ public class LisaacParser extends AbstractLisaacParser {
 		if (t != null) {
 			if (isSection) {
 				if (! (t instanceof TypeSimple)) {
-					reporter.syntaxError("For a section, the prototype name only (without '('...')').", getPosition());
+					reporter.syntaxError("For a section, the prototype name only (without '('...')').", getLine());
 					return null;
 				}
 			}
@@ -81,12 +81,12 @@ public class LisaacParser extends AbstractLisaacParser {
 			while (readCharacter(',')) {
 				t = readType(false);
 				if (t == null) {
-					reporter.syntaxError("Incorrect type list.", getPosition());
+					reporter.syntaxError("Incorrect type list.", getLine());
 					return null;
 				}
 				if (isSection) {
 					if (! (t instanceof TypeSimple)) {
-						reporter.syntaxError("For a section, the prototype name only (without '('...')').", getPosition());
+						reporter.syntaxError("For a section, the prototype name only (without '('...')').", getLine());
 						return null;
 					}
 				}
@@ -114,7 +114,7 @@ public class LisaacParser extends AbstractLisaacParser {
 				// Read vector argument.
 				lst = readTypeList(false);
 				if (lst == null) {
-					reporter.syntaxError("Incorrect type list.", getPosition());
+					reporter.syntaxError("Incorrect type list.", getLine());
 					return null;
 				}
 				if (lst.length == 1) {
@@ -123,11 +123,11 @@ public class LisaacParser extends AbstractLisaacParser {
 					typ_arg = TypeMulti.get(lst);
 				}
 				if (! readCharacter(')')) {
-					reporter.syntaxError("Added ')'.", getPosition());
+					reporter.syntaxError("Added ')'.", getLine());
 					return null;
 				}
 				if (! readCharacter(';')) {
-					reporter.syntaxError("Added ';'.", getPosition());
+					reporter.syntaxError("Added ';'.", getLine());
 				}
 				// Read result type.
 				lst = readTypeList(false);
@@ -155,7 +155,7 @@ public class LisaacParser extends AbstractLisaacParser {
 				}
 			}
 			if (! readCharacter('}')) {
-				reporter.syntaxError("Added '}'.", getPosition());
+				reporter.syntaxError("Added '}'.", getLine());
 				return null;
 			}
 			result = TypeBlock.get(typ_arg, typ_res);
@@ -166,7 +166,8 @@ public class LisaacParser extends AbstractLisaacParser {
 
 				style = getLastString();
 				if (isLocal && (style.equals(ILisaacModel.keyword_expanded))) {
-					reporter.syntaxError("`Expanded' is not possible.", getPosition());
+					int len = ILisaacModel.keyword_expanded.length();
+					reporter.syntaxError("`Expanded' is not possible.", getPosition(len));
 				}
 			}
 			// PROTOTYPE
@@ -197,7 +198,7 @@ public class LisaacParser extends AbstractLisaacParser {
 				do {
 					ITypeMono t = readParamType();
 					if (t == null) {
-						reporter.syntaxError("Type needed.", getPosition());
+						reporter.syntaxError("Type needed.", getLine());
 						return null;
 					}
 					genericity.add(t);
@@ -207,12 +208,12 @@ public class LisaacParser extends AbstractLisaacParser {
 
 				if (version013) {
 					if (! readCharacter(')') && ! readCharacter(']')) {
-						reporter.syntaxError("Added ')'.", getPosition());
+						reporter.syntaxError("Added ')'.", getLine());
 						return result;
 					}
 				} else {
 					if (! readCharacter(')')) {
-						reporter.syntaxError("Added ')'.", getPosition());
+						reporter.syntaxError("Added ')'.", getLine());
 						return result;
 					}
 				}
@@ -220,14 +221,14 @@ public class LisaacParser extends AbstractLisaacParser {
 				// Simple type.	 
 				if (isParameterType) {
 					if (style != null) {
-						reporter.warning("Style `"+style+"' for parameter type is ignored.", getPosition());
+						reporter.warning("Style `"+style+"' for parameter type is ignored.", getPosition(name.length()));
 					}
 					result = TypeParameter.get(name);
 				} else if (style == null) {
 					result = TypeSimple.get(name);
 				} else {
 					if (name.equals(ILisaacModel.prototype_self)) {
-						reporter.warning("Style `"+style+"' ignored.", getPosition());
+						reporter.warning("Style `"+style+"' ignored.", getPosition(name.length()));
 						result = TypeSimple.getTypeSelf();
 					} else {
 						result = TypeStyle.get(name,style);
@@ -268,7 +269,7 @@ public class LisaacParser extends AbstractLisaacParser {
 			result = true;
 			lastSlot = readTypeSlot();
 			if (lastSlot == null) {
-				reporter.syntaxError("Incorrect slot declaration.", getPosition());
+				reporter.syntaxError("Incorrect slot declaration.", getLine());
 				return false;
 			}
 			lastSlot.setStyle(style);
@@ -283,17 +284,17 @@ public class LisaacParser extends AbstractLisaacParser {
 				if (readCharacter('(')) {
 					ITypeMono[] lt = readTypeList(false);
 					if (lt == null) {
-						reporter.syntaxError("Incorrect result type.", getPosition());
+						reporter.syntaxError("Incorrect result type.", getLine());
 						return false;
 					}
 					if (! readCharacter(')')) {
-						reporter.warning("Added ')' is needed.", getPosition());
+						reporter.warning("Added ')' is needed.", getLine());
 					}
 					t = TypeMulti.get(lt);
 				} else {
 					t = readType(false);
 					if (t == null) {
-						reporter.syntaxError("Incorrect result type.", getPosition());
+						reporter.syntaxError("Incorrect result type.", getLine());
 						return false;
 					}
 				}
@@ -318,7 +319,7 @@ public class LisaacParser extends AbstractLisaacParser {
 				//
 			}
 			if (! readCharacter(';')) {
-				reporter.syntaxError("Added ';'.", getPosition());
+				reporter.syntaxError("Added ';'.", getLine());
 				return false;
 			}
 			if (lastComment != null && lastComment.length() > 0) {
@@ -351,7 +352,7 @@ public class LisaacParser extends AbstractLisaacParser {
 		readRequire();
 		ICode expr = readExpr();
 		if (expr == null) {
-			reporter.syntaxError("Incorrect expression.", getPosition());
+			reporter.syntaxError("Incorrect expression.", getLine());
 		}
 		lastSlot.setValue(expr);
 		readEnsure();
@@ -411,7 +412,7 @@ public class LisaacParser extends AbstractLisaacParser {
 
 						arg = readLocArg(false,false);
 						if (arg == null) {
-							reporter.syntaxError("Incorrect symbol.", getPosition());
+							reporter.syntaxError("Incorrect symbol.", getLine());
 							return null;
 						}
 						list_arg.add(arg);
@@ -442,7 +443,7 @@ public class LisaacParser extends AbstractLisaacParser {
 			if (readCharacter(':') && lastCharacter() != '=') {
 				ITypeMono t = readType(true);
 				if (t == null) {
-					reporter.syntaxError("Incorrect type.", getPosition());
+					reporter.syntaxError("Incorrect type.", getLine());
 					return null;
 				}
 
@@ -457,14 +458,14 @@ public class LisaacParser extends AbstractLisaacParser {
 				result = new ITMArgument(n, t, p);
 			} else {
 				if (! mute) {
-					reporter.warning("Added ':' is needed.", getPosition());
+					reporter.warning("Added ':' is needed.", getLine());
 				}
 			}
 		} else if (readCharacter('(')) {
 			result = readLocalArg(mute, selfFirst);
 			if (result == null) {
 				if (! mute) {
-					reporter.syntaxError("Incorrect argument definition.", getPosition());
+					reporter.syntaxError("Incorrect argument definition.", getLine());
 					return null;
 				}
 			} else {
@@ -492,7 +493,7 @@ public class LisaacParser extends AbstractLisaacParser {
 			
 			do {
 				if (name.size() != 0 && !readIdentifier() && !mute) {
-					reporter.syntaxError("Incorrect argument identifier.", getPosition());
+					reporter.syntaxError("Incorrect argument identifier.", getLine());
 					return null;
 				}
 				
@@ -504,7 +505,7 @@ public class LisaacParser extends AbstractLisaacParser {
 					ITypeMono t = readType(true);
 
 					if (t == null) {
-						reporter.syntaxError("Incorrect argument type.", getPosition());
+						reporter.syntaxError("Incorrect argument type.", getLine());
 						return null;
 					}
 					for (int i=beg; i<name.size(); i++) {
@@ -516,7 +517,7 @@ public class LisaacParser extends AbstractLisaacParser {
 
 			if (beg != name.size()) {
 				if (! mute) {
-					reporter.syntaxError("Incorrect argument type.", getPosition());
+					reporter.syntaxError("Incorrect argument type.", getLine());
 					return null;
 				}
 				// free arrays..
@@ -552,19 +553,19 @@ public class LisaacParser extends AbstractLisaacParser {
 		Position slotPosition = getPosition();
 
 		if (! readOperator()) {
-			reporter.syntaxError("Operator is needed.", getPosition());
+			reporter.syntaxError("Operator is needed.", getLine());
 			return null;
 		}
 		if (lastString.equals(ILisaacModel.symbol_equal) ||
 				lastString.equals(ILisaacModel.symbol_not_equal)) {
-			reporter.syntaxError("Incorrect operator.", getPosition());
+			reporter.syntaxError("Incorrect operator.", getLine());
 			return null;
 		}
 		String name = new String(lastString);
 		slotPosition.setLength(name.length());
 
 		if (! readCharacter('\'')) {
-			reporter.warning("Added `''.", getPosition());
+			reporter.warning("Added `''.", getLine());
 		}
 		if (readThisKeyword(ILisaacModel.keyword_left) ||
 				readThisKeyword(ILisaacModel.keyword_right)) {
@@ -589,7 +590,7 @@ public class LisaacParser extends AbstractLisaacParser {
 			}
 			
 			if (! version013 && arg == null) {
-				reporter.syntaxError("Operator declaration invalid.", getPosition());
+				reporter.syntaxError("Operator declaration invalid.", getLine());
 				return null;
 			}
 			if (arg != null) {
@@ -597,7 +598,7 @@ public class LisaacParser extends AbstractLisaacParser {
 			}
 			name = getOperator("__prefix", name);
 			if (associativity != null && !version013) {
-				reporter.syntaxError("No associativity for postfix operator.", getPosition());
+				reporter.syntaxError("No associativity for postfix operator.", getLine());
 			}
 		} else {
 			IArgument arg = readLocArg(false,false);
@@ -612,7 +613,7 @@ public class LisaacParser extends AbstractLisaacParser {
 				// Postfix operator.
 				name = getOperator("__postfix", name);
 				if (associativity != null) {
-					reporter.syntaxError("No associativity for prefix operator.", getPosition());
+					reporter.syntaxError("No associativity for prefix operator.", getLine());
 				}
 			}
 		}
@@ -691,13 +692,13 @@ public class LisaacParser extends AbstractLisaacParser {
 				char affect = lastString.charAt(0);
 				ICode value = readExpr();
 				if (value == null) {
-					reporter.syntaxError("Incorrect expression.", getPosition());
+					reporter.syntaxError("Incorrect expression.", getLine());
 					return null;
 				}
 				switch (affect) {
 				case ':': break; // TODO code
 				case '<':
-					reporter.syntaxError("Impossible '<-' style assignment with vector.", getPosition());
+					reporter.syntaxError("Impossible '<-' style assignment with vector.", getPosition(lastString.length()));
 					return null;
 				case '?': break; // TODO code	
 				}
@@ -718,7 +719,7 @@ public class LisaacParser extends AbstractLisaacParser {
 				char affect = lastString.charAt(0);
 				ICode value = readExpr();
 				if (value == null) {
-					reporter.syntaxError("Incorrect expression.", getPosition());
+					reporter.syntaxError("Incorrect expression.", getLine());
 					return null;
 				}
 				switch (affect) {
@@ -749,7 +750,7 @@ public class LisaacParser extends AbstractLisaacParser {
 		if (expr == null) {
 			// Error.
 			if (l_expr.size() > 0) {
-				reporter.syntaxError("Incorrect expression.", getPosition());
+				reporter.syntaxError("Incorrect expression.", getLine());
 			}
 			// free l_expr
 		} else {
@@ -815,7 +816,7 @@ public class LisaacParser extends AbstractLisaacParser {
 			while (readCharacter('.')) {
 				result = readSendMsg(result);
 				if (result == null) {
-					reporter.syntaxError("Incorrect message.", getPosition());
+					reporter.syntaxError("Incorrect message.", getLine());
 					return null;
 				}
 			}
@@ -832,7 +833,7 @@ public class LisaacParser extends AbstractLisaacParser {
 		if (readThisKeyword(ILisaacModel.keyword_old)) {
 			ICode old_value = readExpr();
 			if (old_value == null) {
-				reporter.syntaxError("Incorrect `Old' expression.", getPosition());
+				reporter.syntaxError("Incorrect `Old' expression.", getLine());
 				return null;
 			}
 			result = new ITMOld(old_value);
@@ -870,7 +871,7 @@ public class LisaacParser extends AbstractLisaacParser {
 					position = position + 1;
 				}
 				if (string_tmp.length() <= 0) {
-					reporter.syntaxError("Incorrect Result number.", getPosition());
+					reporter.syntaxError("Incorrect Result number.", getLine());
 				}
 				result_id = getString(string_tmp);
 			} else {
@@ -889,7 +890,7 @@ public class LisaacParser extends AbstractLisaacParser {
 
 			lastGroup.setCode(readGroup());
 			if (! readCharacter(')')) {
-				reporter.syntaxError("Added ')'.", getPosition());
+				reporter.syntaxError("Added ')'.", getLine());
 				return null;
 			}
 			lastGroup.setEndOffset(position);
@@ -905,7 +906,7 @@ public class LisaacParser extends AbstractLisaacParser {
 			//
 			if (arg != null) {
 				if (! readCharacter(';')) {
-					reporter.syntaxError("Added ';'.", getPosition());
+					reporter.syntaxError("Added ';'.", getLine());
 					return null;
 				}
 			} else {
@@ -915,7 +916,7 @@ public class LisaacParser extends AbstractLisaacParser {
 
 			lastGroup.setCode(readGroup());
 			if (! readCharacter('}')) {
-				reporter.syntaxError("Added '}'.", getPosition());
+				reporter.syntaxError("Added '}'.", getLine());
 				return null;
 			}
 			lastGroup.setEndOffset(position);
@@ -928,24 +929,24 @@ public class LisaacParser extends AbstractLisaacParser {
 				ITMExternalType ext = new ITMExternalType(new String(lastString), persistant);
 				type = readType(false);
 				if (type == null) {
-					reporter.syntaxError("Incorrect type.", getPosition());
+					reporter.syntaxError("Incorrect type.", getLine());
 					return null;
 				}
 				ext.setType(type);
 				if (readCharacter('{')) {
 					ITypeMono[] ltype = readTypeList(false);
 					if (ltype == null) {
-						reporter.syntaxError("Incorrect live type list.", getPosition());
+						reporter.syntaxError("Incorrect live type list.", getLine());
 						return null;
 					}
 					if (! readCharacter('}')) {
-						reporter.syntaxError("Added '}'.", getPosition());
+						reporter.syntaxError("Added '}'.", getLine());
 						return null;
 					}
 					ext.setTypeList(ltype);
 				}
 				if (ext.isPersistant() && (! readCharacter(')'))) {
-					reporter.syntaxError("Added '}'.", getPosition());
+					reporter.syntaxError("Added '}'.", getLine());
 					return null;
 				}
 				result = ext;
@@ -994,7 +995,7 @@ public class LisaacParser extends AbstractLisaacParser {
 						e = readExpr();
 					}
 					if (e == null) {
-						reporter.syntaxError("Incorrect multiple result expression.", getPosition());
+						reporter.syntaxError("Incorrect multiple result expression.", getLine());
 						return null;
 					}
 				} while (readCharacter(','));
@@ -1024,7 +1025,7 @@ public class LisaacParser extends AbstractLisaacParser {
 					static_list.addAll(loc_lst);
 				}
 				if (! readCharacter(';')) {
-					reporter.syntaxError("Added ';'.", getPosition());
+					reporter.syntaxError("Added ';'.", getLine());
 				}
 				saveContext(); // !! SAVE CONTEXT !!
 
@@ -1065,7 +1066,7 @@ public class LisaacParser extends AbstractLisaacParser {
 					n += "__" + lastString; // FIXME: alias pb
 					arg = readArgument();
 					if (arg == null) {
-						reporter.syntaxError("Incorrect argument.", getPosition());
+						reporter.syntaxError("Incorrect argument.", getLine());
 						return null;
 					}
 					l_arg.addLast(arg);
@@ -1111,7 +1112,7 @@ public class LisaacParser extends AbstractLisaacParser {
 			result = new LinkedList<ITMLocal>();			
 			do {
 				if (result.size() != 0 && !readIdentifier() && !mute) {
-					reporter.syntaxError("Incorrect identifier.", getPosition());
+					reporter.syntaxError("Incorrect identifier.", getLine());
 					return null;
 				}
 				ITMLocal loc = new ITMLocal(new String(lastString), getPosition());
@@ -1120,7 +1121,7 @@ public class LisaacParser extends AbstractLisaacParser {
 					mute = false;
 					ITypeMono t = readType(false);
 					if (t == null) {
-						reporter.syntaxError("Incorrect local type.", getPosition());
+						reporter.syntaxError("Incorrect local type.", getLine());
 						return null;
 					}
 					for (int j=beg; j<result.size(); j++) {
@@ -1134,7 +1135,7 @@ public class LisaacParser extends AbstractLisaacParser {
 					// free result
 					result = null;
 				} else {
-					reporter.syntaxError("Incorrect local type.", getPosition());
+					reporter.syntaxError("Incorrect local type.", getLine());
 					return null;
 				}
 			} else {
@@ -1187,7 +1188,7 @@ public class LisaacParser extends AbstractLisaacParser {
 				} else {
 					lst.add(e);
 					if (! readCharacter(';')) {
-						reporter.syntaxError("Added ';'.", getPosition());
+						reporter.syntaxError("Added ';'.", getLine());
 						return null;
 					}
 					doContinue = true;
@@ -1195,7 +1196,7 @@ public class LisaacParser extends AbstractLisaacParser {
 			} while (doContinue);
 
 			if (! readCharacter(']')) {
-				reporter.syntaxError("Added ']'.", getPosition());
+				reporter.syntaxError("Added ']'.", getLine());
 				return null;
 			}
 			// TODO lst add prototype void
@@ -1503,7 +1504,7 @@ public class LisaacParser extends AbstractLisaacParser {
 			return null;
 		} else {
 			// error
-			reporter.syntaxError("Syntax error", getPosition());
+			reporter.syntaxError("Syntax error", getLine());
 			return sectionContext.getNextContext(); // go to next section
 		}
 	}
diff --git a/src/org/eclipse/lisaac/model/SectionContext.java b/src/org/eclipse/lisaac/model/SectionContext.java
index b0d85d2..c2f6149 100644
--- a/src/org/eclipse/lisaac/model/SectionContext.java
+++ b/src/org/eclipse/lisaac/model/SectionContext.java
@@ -22,7 +22,7 @@ public class SectionContext implements ILisaacContext {
 
 		// read Section
 		if (! parser.readThisKeyword (ILisaacModel.keyword_section)) {
-			parser.getReporter().syntaxError("`Section' is needed.", parser.getPosition());
+			parser.getReporter().syntaxError("`Section' is needed.", parser.getLine());
 			return false;
 		}
 
@@ -31,7 +31,7 @@ public class SectionContext implements ILisaacContext {
 			// Read Section Header.
 			// 
 			if (! parser.readThisKeyword (ILisaacModel.section_header)) {
-				parser.getReporter().syntaxError("Section `Header' is needed.", parser.getPosition());
+				parser.getReporter().syntaxError("Section `Header' is needed.", parser.getLine());
 				return false;
 			}    
 			firstSection = false;
@@ -59,21 +59,21 @@ public class SectionContext implements ILisaacContext {
 					if (lastSection.isInheritOrInsert() &&
 							parser.getLastSlot() != null &&
 							! parser.getLastSlot().getSectionId().isInheritOrInsert()) {
-						parser.getReporter().syntaxError("`Section Inherit/Insert' must to be first section.", parser.getPosition());
+						parser.getReporter().syntaxError("`Section Inherit/Insert' must to be first section.", parser.getLine());
 						return false;
 
 					} else if (prototype.isExpanded() && section.equals(ILisaacModel.section_inherit)) {
-						parser.getReporter().warning("`Section Inherit' is not possible with Expanded object (Use `Section Insert').", parser.getPosition());
+						parser.getReporter().warning("`Section Inherit' is not possible with Expanded object (Use `Section Insert').", parser.getLine());
 					}
 				} else {
-					parser.getReporter().syntaxError("Incorrect type section.", parser.getPosition());
+					parser.getReporter().syntaxError("Incorrect type section.", parser.getLine());
 					return false;
 				}
 			} else {
 				// TYPE_LIST.
 				ITypeMono[] t = parser.readTypeList(true);
 				if (t == null) {
-					parser.getReporter().syntaxError("Incorrect type section.", parser.getPosition());
+					parser.getReporter().syntaxError("Incorrect type section.", parser.getLine());
 					return false;
 				}
 				parser.setLastSection(new Section(prototype, t));
@@ -84,7 +84,7 @@ public class SectionContext implements ILisaacContext {
 	}
 
 	private boolean readSectionHeaderContent(Prototype prototype) {
-		boolean result,comment=false;
+		boolean result;
 		boolean first=true;
 
 		//
@@ -98,7 +98,7 @@ public class SectionContext implements ILisaacContext {
 				result = true;
 
 				if (!first && style == '+') {
-					parser.getReporter().warning("Incorrect style slot ('-').", parser.getPosition());
+					parser.getReporter().warning("Incorrect style slot ('-').", parser.getPosition(1));
 				}
 				if (first) {
 					first = false;
@@ -108,7 +108,7 @@ public class SectionContext implements ILisaacContext {
 						// Read `name' slot.
 						//
 						if (! parser.readSymbol(ILisaacModel.symbol_affect_immediate)) {
-							parser.getReporter().syntaxError("Added ':='.", parser.getPosition());
+							parser.getReporter().syntaxError("Added ':='.", parser.getLine());
 							return false;
 						}
 						if (parser.readThisKeyword(ILisaacModel.keyword_expanded) ||
@@ -116,7 +116,7 @@ public class SectionContext implements ILisaacContext {
 							prototype.setTypeStyle(parser.getLastString());
 						}
 						if (! parser.readCapIdentifier()) {
-							parser.getReporter().syntaxError("Prototype identifier is needed.", parser.getPosition());
+							parser.getReporter().syntaxError("Prototype identifier is needed.", parser.getLine());
 							return false;
 						}
 						if (parser.getLastString().compareTo(prototype.getName()) != 0) {
@@ -140,41 +140,39 @@ public class SectionContext implements ILisaacContext {
 								while (parser.readCharacter(',')) {
 									// TODO error Identifier parameter type is needed.
 									if (! parser.readCapIdentifier()) {
-										parser.getReporter().syntaxError("Identifier parameter type is needed.", parser.getPosition());
+										parser.getReporter().syntaxError("Identifier parameter type is needed.", parser.getLine());
 										return false;
 									}
 								}
 								if (version013) {
 									if (! parser.readCharacter(')') && ! parser.readCharacter(']')) {
-										parser.getReporter().syntaxError("Added ')'.", parser.getPosition());
+										parser.getReporter().syntaxError("Added ')'.", parser.getLine());
 										return false;
 									}
 								} else {
 									if (! parser.readCharacter(')')) {
-										parser.getReporter().syntaxError("Added ')'.", parser.getPosition());
+										parser.getReporter().syntaxError("Added ')'.", parser.getLine());
 										return false;
 									}
 								}
 							} else {
-								parser.getReporter().syntaxError("Identifier parameter type is needed.", parser.getPosition());
+								parser.getReporter().syntaxError("Identifier parameter type is needed.", parser.getLine());
 								return false;
 							}
 						}
-
 					} else {
-						parser.getReporter().syntaxError("Slot `name' must to be first slot.", parser.getPosition());
+						parser.getReporter().syntaxError("Slot `name' must to be first slot.", parser.getLine());
 					}
-
 				} else if (parser.readWord(ILisaacModel.slot_export) ||
 						parser.readWord(ILisaacModel.slot_import)) {
 
 					// - ("export"|"import") ':=' TYPE_LIST 
 					if (! parser.readSymbol(ILisaacModel.symbol_affect_immediate)) {
-						parser.getReporter().syntaxError("Added ':='.", parser.getPosition());
+						parser.getReporter().syntaxError("Added ':='.", parser.getLine());
 						return false;
 					}
 					if (parser.readTypeList(false) == null) {
-						parser.getReporter().syntaxError("Incorrect type list.", parser.getPosition());
+						parser.getReporter().syntaxError("Incorrect type list.", parser.getLine());
 						return false;
 					}
 					//  TODO store export / import
@@ -183,22 +181,22 @@ public class SectionContext implements ILisaacContext {
 					// - "external" ':=' `<code_c>`
 
 					if (! parser.readSymbol(ILisaacModel.symbol_affect_immediate)) {
-						parser.getReporter().syntaxError("Added ':='.", parser.getPosition());
+						parser.getReporter().syntaxError("Added ':='.", parser.getLine());
 						return false;
 					}
 					if (! parser.readExternal()) {
-						parser.getReporter().syntaxError("Incorrect external.", parser.getPosition());
+						parser.getReporter().syntaxError("Incorrect external.", parser.getLine());
 						return false;
 					}
 				} else if (parser.readWord(ILisaacModel.slot_default)) {
 					// '-' "default" ':=' EXPR_PRIMARY
 
 					if (! parser.readSymbol(ILisaacModel.symbol_affect_immediate)) {
-						parser.getReporter().syntaxError("Added ':='.", parser.getPosition());
+						parser.getReporter().syntaxError("Added ':='.", parser.getLine());
 						return false;
 					}
 					if (parser.readExprPrimary() == null) {
-						parser.getReporter().syntaxError("Incorrect expr.", parser.getPosition());
+						parser.getReporter().syntaxError("Incorrect expr.", parser.getLine());
 						return false;
 					}
 					// TODO check double default slot
@@ -207,11 +205,11 @@ public class SectionContext implements ILisaacContext {
 					// '-' "type" ':=' `<type C>`
 
 					if (! parser.readSymbol(ILisaacModel.symbol_affect_immediate)) {
-						parser.getReporter().syntaxError("Added ':='.", parser.getPosition());
+						parser.getReporter().syntaxError("Added ':='.", parser.getLine());
 						return false;
 					}
 					if (! parser.readExternal()) {
-						parser.getReporter().syntaxError("Incorrect external.", parser.getPosition());
+						parser.getReporter().syntaxError("Incorrect external.", parser.getLine());
 						return false;
 					}
 					// TODO check double type declaration
@@ -223,11 +221,11 @@ public class SectionContext implements ILisaacContext {
 
 					// '-' "version" ':=' integer
 					if (! parser.readSymbol(ILisaacModel.symbol_affect_immediate)) {
-						parser.getReporter().syntaxError("Added ':='.", parser.getPosition());
+						parser.getReporter().syntaxError("Added ':='.", parser.getLine());
 						return false;
 					}
 					if (! parser.readInteger()) {
-						parser.getReporter().syntaxError("Incorrect number.", parser.getPosition());
+						parser.getReporter().syntaxError("Incorrect number.", parser.getLine());
 						return false;
 					}
 					// } else if () { TODO lip
@@ -248,11 +246,11 @@ public class SectionContext implements ILisaacContext {
 					// '-' ("date"|"comment"|"author"|"bibliography"|"language"|"copyright"|"bug_report") 
 					// ':=' string
 					if (! parser.readSymbol(ILisaacModel.symbol_affect_immediate)) {
-						parser.getReporter().syntaxError("Added ':='.", parser.getPosition());
+						parser.getReporter().syntaxError("Added ':='.", parser.getLine());
 						return false;
 					}
 					if (! parser.readString()) {
-						parser.getReporter().syntaxError("Incorrect string.", parser.getPosition());
+						parser.getReporter().syntaxError("Incorrect string.", parser.getLine());
 						return false;
 					}
 					if (headerSlot.equals(ILisaacModel.slot_comment)) {
diff --git a/src/org/eclipse/lisaac/model/items/Prototype.java b/src/org/eclipse/lisaac/model/items/Prototype.java
index 3525c1e..e1a16e6 100644
--- a/src/org/eclipse/lisaac/model/items/Prototype.java
+++ b/src/org/eclipse/lisaac/model/items/Prototype.java
@@ -125,7 +125,10 @@ public class Prototype {
 				try {
 					Prototype parent = LisaacCompletionParser.findPrototype(""+typeParent);
 					if (parent != null) {
-						return parent.lookupSlot(n);
+						result = parent.lookupSlot(n);
+						if (result != null) {
+							return result;
+						}
 					}
 				} catch (CoreException e) {
 					return null;
@@ -295,7 +298,7 @@ public class Prototype {
 						(source.charAt(offset+3) == '+' || source.charAt(offset+3) == '-')) {
 					String slotName = parser.readSlotNameFromOffset(offset+4);
 					if (slotName != null) {
-						result = getSlot(slotName);
+						result = lookupSlot(slotName);
 						if (result == null) {
 							return null;
 						}
diff --git a/src/org/eclipse/lisaac/perspectives/LisaacPerspective.java b/src/org/eclipse/lisaac/perspectives/LisaacPerspective.java
index b670060..43a93a8 100644
--- a/src/org/eclipse/lisaac/perspectives/LisaacPerspective.java
+++ b/src/org/eclipse/lisaac/perspectives/LisaacPerspective.java
@@ -66,9 +66,8 @@ public class LisaacPerspective implements IPerspectiveFactory {
 
 	private void addActionSets() {
 		factory.addActionSet("org.eclipse.debug.ui.launchActionSet"); //NON-NLS-1
-		factory.addActionSet("org.eclipse.debug.ui.debugActionSet"); //NON-NLS-1
+		//factory.addActionSet("org.eclipse.debug.ui.debugActionSet"); //NON-NLS-1
 		//factory.addActionSet("org.eclipse.debug.ui.profileActionSet"); //NON-NLS-1
-		factory.addActionSet("org.eclipse.jdt.debug.ui.JDTDebugActionSet"); //NON-NLS-1
 		factory.addActionSet("org.eclipse.team.ui.actionSet"); //NON-NLS-1
 		//factory.addActionSet("org.eclipse.ant.ui.actionSet.presentation"); //NON-NLS-1
 		factory.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET); //NON-NLS-1

-- 
Lisaac eclipse plugin



More information about the Lisaac-commits mailing list