code-generation

is there a simple compiler for a small language

假如想象 提交于 2019-12-02 14:04:38
I am looking for a simple compiler that compiles a simple language, I need it to write a paper about it and to learn how compilers work, I am not looking for a sophisticated thing just a simple language (by simple I mean a small code because for example gcc is toooooo big). any help is appreciated. If you want to look at code, I'm very impressed with Eijiro Sumii's MinCaml compiler. It's only 2000 lines long. It compiles a pretty interesting source language. It generates real machine code, none of this namby-pamby C or LLVM stuff :-) Speed of compiled code is competetive with gcc and the

Generating a stylesheet based on inline HTML styling?

心已入冬 提交于 2019-12-02 12:31:15
问题 I've been working on styling different parts of my website for a while, however I have yet to put my inline styles into a stylesheet. I was wondering if a tool exists to parse an HTML file and generate a stylesheet from it. For example, here is a snippet of my website: <div class="block" style="border:1px solid"> <img id="profile-pic" style="float:left;border:0px"/> </div> And I would like to be able to generate this: .block { border: 1px solid; } #profile-pic { float: left; border: 0px; }

How build a JOOQ custom generator?

两盒软妹~` 提交于 2019-12-02 10:31:54
I have a specific Postgre schema that gathers all tables that defines types, like Status(name, description) where values could be OPEN, Open item status , CLOSED, Closed item status , etc. We need to fetch all these tables and generate enums based on them to later use it within our app. So, these enums should look like: enum Status { OPEN("Open item status"), CLOSED("Closed item status") ... } We decided to use JOOQ which looks pretty interesting, but we cannot find documentation/examples to create a custom generator that use default java generator behavior plus a custom enum generation

JIBX: Classes generated from maven codegen plugin : No unmarshaller for element

我与影子孤独终老i 提交于 2019-12-02 09:55:39
I use Jibx CodeGen maven Plugin to generate java sources and binding from xsd files. I want to maintain several versions of the xsd in the same applications so I plan to generate to a different target package depending the version of the XSD. JBix seems to generate java package based on the namespaces of the xsd files. ie. for namespace http://www.example.jibx.org/generated/v30/types it generates package org.jibx.example.generated.v30.types During maven build code generation seems to work and binding files are generated but during the binding phase, it says that Verification was a failure :

How to create Clojure `defn` functions automatically without macros?

左心房为你撑大大i 提交于 2019-12-02 09:19:02
Originally motivated by the following question: Mapped calls to clojurescript macro Suppose you want to create many similar functions automatically (i.e. without hand-writing them all). Suppose we have some pre-existing functions and we want wrap them with handlers for a callback of some sort: (defn do-foo [] (println "I foo'ed")) (defn do-bar [] (println "I bar'ed")) (defn do-baz [] (println "I baz'ed")) (defn manual-on-foo [] (do-foo)) (defn manual-on-bar [] (do-bar)) (defn manual-on-baz [] (do-baz)) (println "Calling manual-on-* functions") (manual-on-foo) (manual-on-bar) (manual-on-baz)

MSVC++ 6.0: Fatal error C1509 “Too many exception handler states in function”

杀马特。学长 韩版系。学妹 提交于 2019-12-02 08:06:30
I'm working on a project that uses a lot of generated files for a GUI. After some recent updates, I get this error. If I remove some controls (the new ones or some old ones, doesn't seem to matter which), the error goes away. I've temporarily worked around the problem, but I'd like a more permanent solution. I've seen mentioned on the web that there's a fix for this in VS.Net 2003, but I can't find anything for 6.0. Does anyone know of a hotfix or service pack that fixes this? Mike Dunlavey This is an example of why I became a maverick and developed another way of programming UIs . It has none

Why does visual studio 2008 break my web page?

别来无恙 提交于 2019-12-02 05:43:39
I have a aspx page that has a UpdatePanel and a asp timer. the timer tick is the trigger for the update panel. If add anything to the update panel (even a space!) Visual Studio automagically adds the following <Triggers> <System.Web.UI.AsyncPostBackTrigger ControlID="tm1" EventName="Tick"></System.Web.UI.AsyncPostBackTrigger> </Triggers> Even though the page has already registered the following (albeit in the same triggers section) <Triggers> <asp:AsyncPostBackTrigger ControlID="tm1" EventName="Tick" /> </Triggers> So my questions are these 1) What is the difference between asp

Visually distinguish auto-generated files?

爷,独闯天下 提交于 2019-12-02 04:57:33
We have a bunch of files that are auto-generated based on the database model. I have had some facepalm experiences because I modified some code, only to find out my modifications where overwritten because I'd not noticed that my changes were in those generated files. So, I modified our generator to include a "do not modify" comment in the file header. This helps! Although, when tracing method calls, it's easy to end up in the middle of one of these files, and you wouldn't necessarily know unless you scrolled to the top to check for the header. That is awkward (and error-prone). Is there any

Any good C# code generator for using oracle stored procedures? [closed]

人盡茶涼 提交于 2019-12-02 04:12:16
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I'm looking for a C# code generator which generate C# automatically to access stored procedures on Oracle Database. For instance, if I have some packages on schema DEV like: PACKAGE1 with FUNC1, FUN2 PACKAGE2 with FUNC3, FUN4 The generator creates code to run from C# the following code: int a = PACKAGE1.FUNC1(12

How to create csproj command line?

依然范特西╮ 提交于 2019-12-02 02:05:56
问题 Is there any way to create a CS and WPF solution of Visual Studio templates from command line? I wrote a C# and WPF code generator, and I want that my output be a C# solution. 回答1: To create a Project from command line, simply create and save a Project and use a commandline to copy the folder. Or using Visual Studio DTE2: http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/72d6608b-2e9a-4bc4-b294-b75db17bcad2/ Or to create a Project Template Using the Projectgen.exe Command-Line Tool