From 213c6c539054100c1b53af02d8fc4345a63f82c6 Mon Sep 17 00:00:00 2001 From: Christian Dietrich Date: Fri, 8 Nov 2013 00:20:26 +0100 Subject: [PATCH 1/2] Try to get the https://github.com/Nodeclipse/coffeescript-eclipse/issues/19 fixed --- .../xtend-gen/csep/tests/basic/.gitignore | 20 + .../xtend-gen/csep/tests/coffee/.gitignore | 4 + .../xtend-gen/csep/tests/coffee/Showcase.java | 2 +- .../tests/lexer/.PositionTest.java._trace | Bin 9923 -> 9964 bytes .../xtend-gen/csep/tests/lexer/.gitignore | 4 + .../xtend-gen/csep/tests/other/.gitignore | 6 + .../xtend-gen/csep/tests/parser/.gitignore | 2 + .../AbstractCoffeeScriptProposalProvider.java | 2 +- ...artialCoffeeScriptContentAssistParser.java | 1 + csep/src-gen/csep/CoffeeScript.genmodel | 2 +- csep/src-gen/csep/CoffeeScript.xmi | 2164 ----------------- csep/src-gen/csep/CoffeeScript.xtextbin | Bin 0 -> 14875 bytes .../CoffeeScriptStandaloneSetupGenerated.java | 3 + .../impl/CoffeeScriptFactoryImpl.java | 2 +- .../coffee/parsing/lexer/CoffeeScanner.java | 9 +- csep/src/csep/Main.java | 30 + csep/x.coffee | 38 + csep/xtend-gen/csep/generator/.gitignore | 2 + 18 files changed, 118 insertions(+), 2173 deletions(-) create mode 100644 csep.tests/xtend-gen/csep/tests/basic/.gitignore create mode 100644 csep.tests/xtend-gen/csep/tests/coffee/.gitignore create mode 100644 csep.tests/xtend-gen/csep/tests/lexer/.gitignore create mode 100644 csep.tests/xtend-gen/csep/tests/other/.gitignore create mode 100644 csep.tests/xtend-gen/csep/tests/parser/.gitignore delete mode 100644 csep/src-gen/csep/CoffeeScript.xmi create mode 100644 csep/src-gen/csep/CoffeeScript.xtextbin create mode 100644 csep/src/csep/Main.java create mode 100644 csep/x.coffee create mode 100644 csep/xtend-gen/csep/generator/.gitignore diff --git a/csep.tests/xtend-gen/csep/tests/basic/.gitignore b/csep.tests/xtend-gen/csep/tests/basic/.gitignore new file mode 100644 index 0000000..509bf6f --- /dev/null +++ b/csep.tests/xtend-gen/csep/tests/basic/.gitignore @@ -0,0 +1,20 @@ +/.ArrayTest.java._trace +/.AssignTest.java._trace +/.ClassTest.java._trace +/.ControlFlowTest.java._trace +/.DictionaryTest.java._trace +/.FunctionCallTest.java._trace +/.LambdaTest.java._trace +/.LiteralTest.java._trace +/.OperatorsTest.java._trace +/.ScopeTest.java._trace +/ArrayTest.java +/AssignTest.java +/ClassTest.java +/ControlFlowTest.java +/DictionaryTest.java +/FunctionCallTest.java +/LambdaTest.java +/LiteralTest.java +/OperatorsTest.java +/ScopeTest.java diff --git a/csep.tests/xtend-gen/csep/tests/coffee/.gitignore b/csep.tests/xtend-gen/csep/tests/coffee/.gitignore new file mode 100644 index 0000000..7cf5a2c --- /dev/null +++ b/csep.tests/xtend-gen/csep/tests/coffee/.gitignore @@ -0,0 +1,4 @@ +/.NodesCoffeeTest.java._trace +/.Showcase.java._trace +/NodesCoffeeTest.java +/Showcase.java diff --git a/csep.tests/xtend-gen/csep/tests/coffee/Showcase.java b/csep.tests/xtend-gen/csep/tests/coffee/Showcase.java index ea60dec..3b775fc 100644 --- a/csep.tests/xtend-gen/csep/tests/coffee/Showcase.java +++ b/csep.tests/xtend-gen/csep/tests/coffee/Showcase.java @@ -37,7 +37,7 @@ public void test_interpolation() { _builder.append("quote = \"A picture is a fact. -- #{ author }\""); _builder.newLine(); _builder.newLine(); - _builder.append("sentence = \"#{ 22 / 7 } is a decent approximation of \uFFFD\uFFFD\""); + _builder.append("sentence = \"#{ 22 / 7 } is a decent approximation of \ufffd\ufffd\""); _builder.newLine(); this.ok(_builder); } diff --git a/csep.tests/xtend-gen/csep/tests/lexer/.PositionTest.java._trace b/csep.tests/xtend-gen/csep/tests/lexer/.PositionTest.java._trace index a7a2a26b4e315bbe112e324c8364eef03a6c0511..803038fd76a632d48fc606eb0c20a42f812abc09 100644 GIT binary patch delta 42 ocmX@?`^I;}U2$1P1_r4q3=9lxKztF3fnvPwAhFFC#Xs=@0N}w1SO5S3 delta 12 TcmaFkd)RlwUGdFq63_SmDvSlQ diff --git a/csep.tests/xtend-gen/csep/tests/lexer/.gitignore b/csep.tests/xtend-gen/csep/tests/lexer/.gitignore new file mode 100644 index 0000000..cbcb123 --- /dev/null +++ b/csep.tests/xtend-gen/csep/tests/lexer/.gitignore @@ -0,0 +1,4 @@ +/.PositionTest.java._trace +/.TokenTest.java._trace +/PositionTest.java +/TokenTest.java diff --git a/csep.tests/xtend-gen/csep/tests/other/.gitignore b/csep.tests/xtend-gen/csep/tests/other/.gitignore new file mode 100644 index 0000000..3eae80c --- /dev/null +++ b/csep.tests/xtend-gen/csep/tests/other/.gitignore @@ -0,0 +1,6 @@ +/.CakefileTest.java._trace +/.ErrorLocationTest.java._trace +/.MissingFeaturesTest.java._trace +/CakefileTest.java +/ErrorLocationTest.java +/MissingFeaturesTest.java diff --git a/csep.tests/xtend-gen/csep/tests/parser/.gitignore b/csep.tests/xtend-gen/csep/tests/parser/.gitignore new file mode 100644 index 0000000..b591409 --- /dev/null +++ b/csep.tests/xtend-gen/csep/tests/parser/.gitignore @@ -0,0 +1,2 @@ +/.HelperTest.java._trace +/HelperTest.java diff --git a/csep.ui/src-gen/csep/ui/contentassist/AbstractCoffeeScriptProposalProvider.java b/csep.ui/src-gen/csep/ui/contentassist/AbstractCoffeeScriptProposalProvider.java index 0493e07..642fada 100644 --- a/csep.ui/src-gen/csep/ui/contentassist/AbstractCoffeeScriptProposalProvider.java +++ b/csep.ui/src-gen/csep/ui/contentassist/AbstractCoffeeScriptProposalProvider.java @@ -9,7 +9,7 @@ import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext; /** - * Represents a generated, default implementation of interface {@link IProposalProvider}. + * Represents a generated, default implementation of superclass {@link org.eclipse.xtext.ui.editor.contentassist.AbstractJavaBasedContentProposalProvider}. * Methods are dynamically dispatched on the first parameter, i.e., you can override them * with a more concrete subtype. */ diff --git a/csep.ui/src-gen/csep/ui/contentassist/antlr/PartialCoffeeScriptContentAssistParser.java b/csep.ui/src-gen/csep/ui/contentassist/antlr/PartialCoffeeScriptContentAssistParser.java index 6c99cba..eadbf89 100644 --- a/csep.ui/src-gen/csep/ui/contentassist/antlr/PartialCoffeeScriptContentAssistParser.java +++ b/csep.ui/src-gen/csep/ui/contentassist/antlr/PartialCoffeeScriptContentAssistParser.java @@ -15,6 +15,7 @@ /** * @author Sebastian Zarnekow - Initial contribution and API */ +@SuppressWarnings("restriction") public class PartialCoffeeScriptContentAssistParser extends CoffeeScriptParser implements IPartialContentAssistParser { private AbstractRule rule; diff --git a/csep/src-gen/csep/CoffeeScript.genmodel b/csep/src-gen/csep/CoffeeScript.genmodel index e584106..ff96b17 100644 --- a/csep/src-gen/csep/CoffeeScript.genmodel +++ b/csep/src-gen/csep/CoffeeScript.genmodel @@ -4,7 +4,7 @@ modelPluginID="csep" forceOverwrite="true" modelName="CoffeeScript" updateClasspath="false" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" complianceLevel="5.0" copyrightFields="false" editPluginID="csep.edit" editorPluginID="csep.editor" - runtimeVersion="2.8"> + runtimeVersion="2.9"> diff --git a/csep/src-gen/csep/CoffeeScript.xmi b/csep/src-gen/csep/CoffeeScript.xmi deleted file mode 100644 index 088a97b..0000000 --- a/csep/src-gen/csep/CoffeeScript.xmi +++ /dev/null @@ -1,2164 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/csep/src-gen/csep/CoffeeScript.xtextbin b/csep/src-gen/csep/CoffeeScript.xtextbin new file mode 100644 index 0000000000000000000000000000000000000000..41edaa3579096cb67bbfc48d1e27e7737eb76c0e GIT binary patch literal 14875 zcma)Dd7NBDwNCZD-Lq#SY(iKPAdrwWAfPNEx0X&a$z*1jg@mw-o#{K7HZ#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R0Acro5POEXLEoef(UTMU| zzO@})#>>?wObr|zxkgIQj}%0%32&ZF(B_)K)e=P>5noHfH{J5hpvYnc_lI*c$!Pzt uBsYuV?4^T|0~@9 literal 0 HcmV?d00001 diff --git a/csep/src-gen/csep/CoffeeScriptStandaloneSetupGenerated.java b/csep/src-gen/csep/CoffeeScriptStandaloneSetupGenerated.java index 39c00b6..8fa3284 100644 --- a/csep/src-gen/csep/CoffeeScriptStandaloneSetupGenerated.java +++ b/csep/src-gen/csep/CoffeeScriptStandaloneSetupGenerated.java @@ -24,6 +24,9 @@ public Injector createInjectorAndDoEMFRegistration() { if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("xmi")) Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put( "xmi", new org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl()); + if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("xtextbin")) + Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put( + "xtextbin", new org.eclipse.xtext.resource.impl.BinaryGrammarResourceFactoryImpl()); if (!EPackage.Registry.INSTANCE.containsKey(org.eclipse.xtext.XtextPackage.eNS_URI)) EPackage.Registry.INSTANCE.put(org.eclipse.xtext.XtextPackage.eNS_URI, org.eclipse.xtext.XtextPackage.eINSTANCE); diff --git a/csep/src-gen/csep/coffeeScript/impl/CoffeeScriptFactoryImpl.java b/csep/src-gen/csep/coffeeScript/impl/CoffeeScriptFactoryImpl.java index fe82fcc..8b52a17 100644 --- a/csep/src-gen/csep/coffeeScript/impl/CoffeeScriptFactoryImpl.java +++ b/csep/src-gen/csep/coffeeScript/impl/CoffeeScriptFactoryImpl.java @@ -30,7 +30,7 @@ public static CoffeeScriptFactory init() { try { - CoffeeScriptFactory theCoffeeScriptFactory = (CoffeeScriptFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.coffeescript.org/eclipse"); + CoffeeScriptFactory theCoffeeScriptFactory = (CoffeeScriptFactory)EPackage.Registry.INSTANCE.getEFactory(CoffeeScriptPackage.eNS_URI); if (theCoffeeScriptFactory != null) { return theCoffeeScriptFactory; diff --git a/csep/src/com/aptana/editor/coffee/parsing/lexer/CoffeeScanner.java b/csep/src/com/aptana/editor/coffee/parsing/lexer/CoffeeScanner.java index c8babb7..fdd096c 100644 --- a/csep/src/com/aptana/editor/coffee/parsing/lexer/CoffeeScanner.java +++ b/csep/src/com/aptana/editor/coffee/parsing/lexer/CoffeeScanner.java @@ -359,8 +359,7 @@ private List tokenize(String code, Map opts) code = "\n" + code; this.fOffsetCorrection -= 1; } - code = code.replaceAll("\r", "").replaceFirst( - TRAILING_SPACES.pattern(), ""); + code = code.replaceAll("\r", ""); this.fCode = code; this.fLine = 0; if (opts.containsKey("fLine")) { @@ -891,7 +890,7 @@ private int lineToken() { if (noNewlines) { this.suppressNewlines(); } else { - this.newlineToken(); + this.newlineToken(indent.length()); } return indent.length(); } @@ -969,9 +968,9 @@ private int whitespaceToken() { return 0; } - private void newlineToken() { + private void newlineToken(int i) { if (this.tag() != Terminals.TERMINATOR) { - this.token(Terminals.TERMINATOR, "\n", 1); + this.token(Terminals.TERMINATOR, "\n", i); } // return this; } diff --git a/csep/src/csep/Main.java b/csep/src/csep/Main.java new file mode 100644 index 0000000..88e9857 --- /dev/null +++ b/csep/src/csep/Main.java @@ -0,0 +1,30 @@ +package csep; + +import java.io.FileInputStream; +import java.io.IOException; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.xtext.resource.XtextResource; + +import com.google.inject.Injector; + +public class Main { + + public static void main(String[] args) throws IOException { + FileInputStream in = new FileInputStream("x.coffee"); + int c = 0; + int n = 0; + while((n=in.read())>0) c++; + in.close(); + System.out.println(c); + + + Injector i = new CoffeeScriptStandaloneSetup().createInjectorAndDoEMFRegistration(); + ResourceSet rs = i.getInstance(ResourceSet.class); + XtextResource r = (XtextResource)rs.getResource(URI.createURI("x.coffee"), true); + r.load(null); + System.out.println(r.getParseResult().getRootNode().getTotalLength()); + } + +} diff --git a/csep/x.coffee b/csep/x.coffee new file mode 100644 index 0000000..e7da85e --- /dev/null +++ b/csep/x.coffee @@ -0,0 +1,38 @@ + + + +#xxxxx + +a = 1+1 + + + + + + +1+1 + +1111+1111+111+111 +xx=1+1+1 +1+1 + + +sssss=1+1 + + + + + + + +bla = 1+1 + + + + + + + + + + diff --git a/csep/xtend-gen/csep/generator/.gitignore b/csep/xtend-gen/csep/generator/.gitignore new file mode 100644 index 0000000..4e2b68d --- /dev/null +++ b/csep/xtend-gen/csep/generator/.gitignore @@ -0,0 +1,2 @@ +/.CoffeeScriptGenerator.java._trace +/CoffeeScriptGenerator.java From 2096450e5ee793a378bba35f8f36d6891a81269f Mon Sep 17 00:00:00 2001 From: Christian Dietrich Date: Fri, 8 Nov 2013 01:32:29 +0100 Subject: [PATCH 2/2] Try to get the https://github.com/Nodeclipse/coffeescript-eclipse/issues/19 fixed --- csep/META-INF/MANIFEST.MF | 3 ++- csep/out.coffee | 19 +++++++++++++++++++ .../coffee/parsing/lexer/CoffeeScanner.java | 4 +++- 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 csep/out.coffee diff --git a/csep/META-INF/MANIFEST.MF b/csep/META-INF/MANIFEST.MF index 6f66a23..307dc2d 100644 --- a/csep/META-INF/MANIFEST.MF +++ b/csep/META-INF/MANIFEST.MF @@ -19,7 +19,8 @@ Require-Bundle: org.apache.log4j;bundle-version="1.2.15";visibility:=reexport, org.eclipse.xtext.common.types, org.eclipse.xtext.xbase.lib;bundle-version="2.0.0";visibility:=reexport, org.apache.commons.logging;bundle-version="1.0.4";resolution:=optional;visibility:=reexport, - org.eclipse.xtext.ui.codetemplates;bundle-version="2.0.0" + org.eclipse.xtext.ui.codetemplates;bundle-version="2.0.0", + org.apache.commons.lang;bundle-version="2.6.0" Import-Package: org.apache.commons.logging, org.apache.log4j, org.eclipse.xtext.xbase.lib diff --git a/csep/out.coffee b/csep/out.coffee new file mode 100644 index 0000000..931e69e --- /dev/null +++ b/csep/out.coffee @@ -0,0 +1,19 @@ +(($)->22 +$=jQuery +$.CoreHelper= +{sendAjaxRequest:()->22} +_default={ +dataType:'json' +type:'POST' +data:{} +url:null +beforeSend:->22 +success:(data)->22 +complete:->22} + +)(jQuery) + + + + +s diff --git a/csep/src/com/aptana/editor/coffee/parsing/lexer/CoffeeScanner.java b/csep/src/com/aptana/editor/coffee/parsing/lexer/CoffeeScanner.java index fdd096c..4979964 100644 --- a/csep/src/com/aptana/editor/coffee/parsing/lexer/CoffeeScanner.java +++ b/csep/src/com/aptana/editor/coffee/parsing/lexer/CoffeeScanner.java @@ -20,6 +20,8 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.apache.commons.lang.StringUtils; + import beaver.Scanner; import com.aptana.editor.coffee.parsing.Terminals; @@ -970,7 +972,7 @@ private int whitespaceToken() { private void newlineToken(int i) { if (this.tag() != Terminals.TERMINATOR) { - this.token(Terminals.TERMINATOR, "\n", i); + this.token(Terminals.TERMINATOR, StringUtils.leftPad("", i, "\n"), i); } // return this; }