I am creating a plugin for Eclipse. Once I downloaded the right package, it was easier than I thought. I want to ask the group whether you think I should write my first full- blown PEG parser, or just a simple scanner? I want the plugin to go beyond syntax highlighting and onto refactoring etc.
Also, I have a bug fix.
Before the fix: evens evens == (returns true, as if it checked all even numbers) odds ones == (returns true) evens ones == (gives a stack exception after a while) After: evens evens == (waits forever while it checks them) odds ones == (returns false) evens ones == (returns false)
The function PairwiseForEach has a missing ! and when this is fixed, it runs out of stack space when comparing possibly-infinite equal lists. When tail recursion optimisation is added, it would give up on unequal sized possibly-infinite lists. This leads to some changes which perhaps don't have the beauty of the original code. While making this change I discovered that you can create a function in C# without giving it a name, and have it access a local variable (like Java's inner classes but more elegant). This is done in an instance of the PairAccessor delegate.
On 8/22/07, Adrian Savage <nothingonte...@googlemail.com> wrote:
> Hello to the Cat language group!
Welcome Adrian!
> I am creating a plugin for Eclipse.
Yay!
> Once I downloaded the right package, it was easier than I thought. > I want to ask the group whether you think I should write my first full- > blown PEG parser, or just a simple scanner?
I'd suggest starting with a simple scanner. It'll probably take much less time, and allow you to get on to more interesting tasks. However, I believe there is already an open-source PEG library in Java
> I want the plugin to go beyond syntax highlighting and onto > refactoring etc.
> Also, I have a bug fix.
> Before the fix: > evens evens == (returns true, as if it checked all even numbers) > odds ones == (returns true) > evens ones == (gives a stack exception after a while) > After: > evens evens == (waits forever while it checks them) > odds ones == (returns false) > evens ones == (returns false)
> The function PairwiseForEach has a missing ! and when this is fixed, > it runs out of stack space when comparing possibly-infinite equal > lists. > When tail recursion optimisation is added, it would give up on unequal > sized possibly-infinite lists. > This leads to some changes which perhaps don't have the beauty of the > original code.
> While making this change I discovered that you can create a function > in C# without giving it a name, and have it access a local variable > (like Java's inner classes but more elegant). This is done in an > instance of the PairAccessor delegate.
> Regards,
> Adrian Savage
Thank you very much for your contributions and bug reports.
Thanks. I released a new version because 1.0.0 didn't work well with Eclipse 3.2.2. The Cat plugin now has a web page. Version 1.0.1 includes source code (.jar files are .zip files with a different extension.) It is available from:
I just tried using the Cat plugin, and when I constructed a ".cat" file from scratch, I could see the neat Cat icon on the project explorer pane (nice touch!). However, no syntax coloring was present (and it red squiggle highlighted various words?). The next problem occured when I tried to open a file:
Error opening the editor. Bad version number in .class file
Any ideas what I could do to resolve the problem? I have no idea where to start, and I don't know which ".class" file is being referred to.
- Christopher
On 8/31/07, Adrian Savage <nothingonte...@googlemail.com> wrote:
> Thanks. I released a new version because 1.0.0 didn't work well with Eclipse > 3.2.2. The Cat plugin now has a web page. Version 1.0.1 includes source code > (.jar files are .zip files with a different extension.) It is available > from:
> I just tried using the Cat plugin, and when I constructed a ".cat" > file from scratch, I could see the neat Cat icon on the project > explorer pane (nice touch!). However, no syntax coloring was present > (and it red squiggle highlighted various words?). The next problem > occured when I tried to open a file:
> Error opening the editor. > Bad version number in .class file
> Any ideas what I could do to resolve the problem? I have no idea where > to start, and I don't know which ".class" file is being referred to.
> - Christopher
> On 8/31/07, Adrian Savage <nothingonte...@googlemail.com> wrote: > > Thanks. I released a new version because 1.0.0 didn't work well with > Eclipse > > 3.2.2. The Cat plugin now has a web page. Version 1.0.1 includes source > code > > (.jar files are .zip files with a different extension.) It is available > > from:
> Which version of Eclipse did you use? > Which operating system?
> On 9/1/07, Christopher Diggins <cdigg...@gmail.com> wrote:
> > Hi Adrian,
> > I just tried using the Cat plugin, and when I constructed a ".cat" > > file from scratch, I could see the neat Cat icon on the project > > explorer pane (nice touch!). However, no syntax coloring was present > > (and it red squiggle highlighted various words?). The next problem > > occured when I tried to open a file:
> > Error opening the editor. > > Bad version number in .class file
> > Any ideas what I could do to resolve the problem? I have no idea where > > to start, and I don't know which ".class" file is being referred to.
> > - Christopher
> > On 8/31/07, Adrian Savage < nothingonte...@googlemail.com> wrote: > > > Thanks. I released a new version because 1.0.0 didn't work well with > Eclipse > > > 3.2.2. The Cat plugin now has a web page. Version 1.0.1 includes source > code > > > (.jar files are .zip files with a different extension.) It is available > > > from:
For some reason, Windows Explorer seems to rename the .jar file to .zip. (I didn't notice this the first time I tested it because I used Download Manager instead.) Instead of unzipping it, try renaming it back to .jar. Just drop the .jar file into the plugins folder as it is.
Does that work?
On 9/2/07, Christopher Diggins <cdigg...@gmail.com> wrote:
> For some reason, Windows Explorer seems to rename the .jar file to .zip. > (I didn't notice this the first time I tested it because I used Download > Manager instead.) > Instead of unzipping it, try renaming it back to .jar. > Just drop the .jar file into the plugins folder as it is.
> Does that work?
> On 9/2/07, Christopher Diggins <cdigg...@gmail.com> wrote:
> > Eclipse 3.3, Windows XP. I have downloaded and unzipped the version > > 1.0.1 of the plugin into my plugins folder.
It's strange. Perhaps you need to delete the files created when the .jar was unzipped. "eclipse -clean" resets the plugin settings. I have now tried it on Windows Vista and Eclipse 3.3. It worked fine but I had to fight IE and change the filename back to .jar. I would expect it to work on Eclipse 3.2 onward. Which Java runtime are you using? Does a fresh install of 3.3 work? If it still doesn't work then I don't know what else to suggest because I am an Eclipse newbie. Sorry!
Got the following error: "Unable to create this part due to an internal error. Reason for the failure: The editor class could not be instantiated. This usually indicates that the editor's class name was mistyped in plugin.xml."
My runtime is Java 2 Runtime Environment, SE v 1.4.2_03.
I doubt reinstalling 3.3 will work (I've already downloaded and installed three different versions of eclipse)
Cheers, Christopher
On 9/3/07, Adrian Savage <nothingonte...@googlemail.com> wrote:
> It's strange. Perhaps you need to delete the files created when the .jar was > unzipped. > "eclipse -clean" resets the plugin settings. > I have now tried it on Windows Vista and Eclipse 3.3. It worked fine but I > had to fight IE and change the filename back to .jar. I would expect it to > work on Eclipse 3.2 onward. > Which Java runtime are you using? Does a fresh install of 3.3 work? > If it still doesn't work then I don't know what else to suggest because I am > an Eclipse newbie. Sorry!