I heard about there being a cs file on the internet from a couple different sources that has all of the syntax in C# in a single file, which would be really good for a crash course to get ready for a job I have. Unfortunately no one could point me to the exact file, has anyone heard or seen anything like this?
Is this the one you're looking for?
http://blogs.msdn.com/b/kirillosenkov/archive/2010/05/11/updated-c-all-in-one-file.aspx
I've found this one useful:
http://www.harding.edu/fmccown/vbnet_csharp_comparison.html
There is updated AllInOne.cs document in official ANTLR grammars repository (with C# 5 & 6 support). Also you can find document with AllInOne in Roslyn.
Related
Folks,
Does anyone know of a dll or .net code that will generate test data from a REGEX?
I am aware of The Regular Expression Generator and the solutions offered in the stackoverflow question Using Regex to generate Strings rather than match them.
Unfortunately, I am writing in C#, and I need to generate the test data at run time.
I have also tried Rex, but it blows an error when I try to load it on a virtual machine.
Any help would be appreciated.
Regards,
Brett Nieland
There is a Microsoft reasearch tool called Rex that explores .NET regexes and generates members efficiently. http://research.microsoft.com/en-us/projects/rex/
As I have seen, you already tried Rex: Maybe the blog post from Chris Eargle helps you then.
You may also want to look at project Fare. See the answer at this question: convert nfa to dfa
I'm wondering if anyone has done this already.
I want to format C# source code in HTML. But with a twist! I want to turn the names of all types and methods that appear in the code into hyperlinks to the MSDN Library documentation of the types and methods.
To do a good job, the data types of variables and expressions needs to be known, just like how the C# compiler does it. So it's a tall order. If something like this is not available, please point me to any free libraries that can generate a parsed tree of the C# source code in sufficient detail to do this task. (In fact, I'd like to know about such a standalone parser library even if the full solution I am asking for already exists.)
This kind of utility might benefit blogs and forums -- maybe even Stack Overflow!
Have you checked out Docu? It's an open source library that converts .net documentation into HTML documents.
I'd suggest using the Visual Studio SDK.
I need to implement a file based multi-way B-Tree Class for c#. There is similar functionality available for C++ and C but I want to use it in C#. It also need to be available as source code as I wish to use with some alternative .NET implementations like MonoTouch.
If anyone knows of a non file based Multiway b-Tree then this could adapted faily easily to be file based. You make each Multiway page/array of nodes a record/sector in the file. And save them when they change.
Anyone?
From what I've seen the B-Tree isn't widely implemented in C#, but I could be wrong.
However a quick search, turned up this implementation and the comments look positive.
I scrounged up some stuff of CodePlex:
B+ Tree Class
SharpClaw DB Server In C# <- You may need to hunt for it, but there is one implemented in this project.
Create a C# wrapper that calls the C/C++ code?
This appears to be what you are looking for: The WB B-Tree Database for SCM, Java, C#, and C
C5 - http://www.itu.dk/research/c5/
Actually, maybe not full-blown Lex/Yacc. I'm implementing a command-interpreter front-end to administer a webapp. I'm looking for something that'll take a grammar definition and turn it into a parser that directly invokes methods on my object. Similar to how ASP.NET MVC can figure out which controller method to invoke, and how to pony up the arguments.
So, if the user types "create foo" at my command-prompt, it should transparently call a method:
private void Create(string id) { /* ... */ }
Oh, and if it could generate help text from (e.g.) attributes on those controller methods, that'd be awesome, too.
I've done a couple of small projects with GPLEX/GPPG, which are pretty straightforward reimplementations of LEX/YACC in C#. I've not used any of the other tools above, so I can't really compare them, but these worked fine.
GPPG can be found here and GPLEX here.
That being said, I agree, a full LEX/YACC solution probably is overkill for your problem. I would suggest generating a set of bindings using IronPython: it interfaces easily with .NET code, non-programmers seem to find the basic syntax fairly usable, and it gives you a lot of flexibility/power if you choose to use it.
I'm not sure Lex/Yacc will be of any help. You'll just need a basic tokenizer and an interpreter which are faster to write by hand. If you're still into parsing route see Irony.
As a sidenote: have you considered PowerShell and its commandlets?
Also look at Antlr, which has C# support.
Still early CTP so can't be used in production apps but you may be interested in Oslo/MGrammar:
http://msdn.microsoft.com/en-us/oslo/
Jison is getting a lot of traction recently. It is a Bison port to javascript. Because of it's extremely simple nature, I've ported the jison parsing/lexing template to php, and now to C#. It is still very new, but if you get a chance, take a look at it here: https://github.com/robertleeplummerjr/jison/tree/master/ports/csharp/Jison
If you don't fear alpha software and want an alternative to Lex / Yacc for creating your own languages, you might look into Oslo. I would recommend you to sit through session recordings of sessions TL27 and TL31 from last years PDC. TL31 directly addresses the creation of Domain Specific Languages using Oslo.
Coco/R is a compiler generator with a .NET implementation. You could try that out, but I'm not sure if getting such a library to work would be faster than writing your own tokenizer.
http://www.ssw.uni-linz.ac.at/Research/Projects/Coco/
I would suggest csflex - C# port of flex - most famous unix scanner generator.
I believe that lex/yacc are in one of the SDKs already (i.e. RTM). Either Windows or .NET Framework SDK.
Gardens Point Parser Generator here provides Yacc/Bison functionality for C#. It can be donwloaded here. A usefull example using GPPG is provided here
As Anton said, PowerShell is probably the way to go. If you do want a lex/ yacc implementation then Malcolm Crowe has a good set.
Edit: Direct Link to the Compiler Tools
Just for the record, implementation of lexer and LALR parser in C# for C#:
http://code.google.com/p/naive-language-tools/
It should be similar in use to Lex/Yacc, however those tools (NLT) are not generators! Thus, forget about speed.
A month ago I searched for some tools that will generate C# classes out for my SQL database/tables. So I don't have to write DAL classes manually and to save a lot of time.
I came across "ORM" and subsonic. I watched the webcasts on the homepage http://subsonicproject.com/ and was pretty impressed by it.
But I am still missing more documentation/knowledge to feel comfortable with subsonic to use it in our projects. Today I read about the "migration" feature somewhere - accidental.
How to get into subsonic? How to get more comfortable with it? How to know about all the features/possibilities it provides? Are there any good blogs/tutorials/whatever for subsonic?
Unfortunately, the best SubSonic "documentation" is in the form of screencasts, but they are very easy to follow.
Quite a lot about SubSonic on Rob Conery's (original creator) blog http://blog.wekeroad.com/tags/subsonic/.
Personally found the best thing is (like Matt said) to just use it, set it up in external tools in VS, get the connection string and a few other config settings sorted, and you're just about good to go. You can get the basics down in an afternoon.
The forum is quite active http://forums.subsonicproject.com/forums/, and a good place if you get stuck.
SubSonic is irritatingly short on documentation (which is one reason I abandoned it). Scott Kuhl wrote a "Getting Started with SubSonic" document (just Google his name and SubSonic) but parts of it appeared to be out of date.
Here is Scott's blog - a place to start at least.
Here is the document's home page. I was curious as to whether the document is indeed out of date and I think it is: the web page has a last updated date in 2006.
Unfortunately, I know of no other documentation and I did look for it.
Update: See the link to documentation that Rob Conery provided in his answer.
I admit it - our docs suck :(. I did try to put a site together:
http://subsonicproject.com
Hope this helps.
Just start using it.
It is very simple and pretty straight forward. There are several screencasts on how to generate your classes with sub commander, once you have that just hit . and see what you can do with them.
I put together a template project referencing SubSonic generated off the Northwind Database. A very simple project, but should easily be enough to get started on your first project. Check it out here:
http://ajondeck.net/post/2008/12/29/ASPNET-20-SubSonic-Project-Template-With-SQL-Server-2005-Northwind-DB.aspx