preprocessor

YAML preprocessor / macro processor

孤街浪徒 提交于 2019-12-19 08:14:20
问题 Is there a simple way to use a preproccesor / macro-processor with YAML files? (I.e. I'm thinking of something along the lines of the C preprocessor)? We have a lot of flat text-files that describes various data structures. They're currently in our own in-house format, and are read with an in-house parser. I'd like to switch to YAML files to make use of the various pre-existing libraries for reading and writing. However our files are hierarchical, in that we "include" master files into sub

Looking for a (pseudo) XSLT preprocessor/templater to make it less verbose [closed]

我与影子孤独终老i 提交于 2019-12-19 03:35:13
问题 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 4 years ago . Does anybody know of a preprocessor for XSLT to make it less verbose? Something like what SASS is to CSS, a little proggy that will take light syntax: "/": { <html> <head> <title>My book collection</title> </head> <body> {@ "//media"} {@ quantity = calc_abs_value("//total_quantity")} Price : {@ multiply(price:"/

#ifndef in javascript

十年热恋 提交于 2019-12-18 12:31:22
问题 I am looking for a solution to only define a function once in Javascript using something exactly like #ifndef in compiled languages. I found a couple of libraries that were supposed to mimic this functionality but they didn't work. I am working with MVC 3 Razor and have defined some html helpers do put what are essentially user controls onto the page. Each control has a set of javascript functions that define specific functionality for that control, so herein lies the issue: the functions get

Macro expansion in moc

拟墨画扇 提交于 2019-12-18 08:24:57
问题 I'd like to store some class info using Q_CLASSINFO macro. However I would like to wrap it in my own macro, for example: #define DB_TABLE( TABLE ) \ Q_CLASSINFO( "db_table", #TABLE ) #define DB_FIELD( PROPERTY, COLUMN ) \ Q_CLASSINFO( "dbcol_" #PROPERTY, #COLUMN ) class Foo : public QObject { Q_OBJECT DB_TABLE( some_table ) DB_FIELD( clientName, client_name ) } Unfortunately, moc doesn't expand macros so the Q_CLASSINFO is not added. I've tried to feed moc with already preprocessed source,

Java Preprocessor

笑着哭i 提交于 2019-12-17 23:20:40
问题 If I have a boolean field like: private static final boolean DEBUG = false; and within my code I have statements like: if(DEBUG) System.err.println("err1"); does the Java preprocessor just get rid of the if statement and the unreachable code? 回答1: Most compilers will eliminate the statement. For example: public class Test { private static final boolean DEBUG = false; public static void main(String... args) { if (DEBUG) { System.out.println("Here I am"); } } } After compiling this class, I

Maven example of annotation preprocessing and generation of classes in same compile process?

≯℡__Kan透↙ 提交于 2019-12-17 22:36:17
问题 Does anyone have a clean example of a maven project preprocessing class annotations at compile time with subsequent generation of classes to be compiled in the same compilation process? Does anyone have a step-by-step procedure to implement such a project? 回答1: After navigating a lot in existing documentation on the net, I came up with the following: What needs to be clarified: In order to process annotations on a given project P, you first need an annotation processor compiled in a separate

Using preprocessor directives in BlackBerry JDE plugin for eclipse?

有些话、适合烂在心里 提交于 2019-12-17 07:40:17
问题 How to use preprocessor directives in BlackBerry JDE plugin for eclipse? 回答1: Within the eclipse config file (%ECLIPSE_HOME%\configuration\config.ini) make sure the following line exists. osgi.framework.extensions=net.rim.eide.preprocessing.hook With the current BlackBerry plugin (1.0.0.67) config line is added for you. I'm not sure about older versions of the plugin. Also, checkout this Stack Overflow question for more information on the BlackBerry preprocessor. Preprocessor directives

Inno Setup: How do I see the output (translation) of the Inno Setup Preprocessor?

血红的双手。 提交于 2019-12-17 07:38:28
问题 I have an Inno Setup script with preprocessor directives ( #define s, #if s, etc.) I want to run the Inno Setup preprocessor on my script and see the preprocessor's output (translation in Inno-Setup-speak). That is, I want to look at the result of the preprocessor which it normally feeds into the Inno Setup Compiler, where all the references to {#something} are changed into whatever something was defined as. I look at the command line options (of iscc.exe ) and #pragma directives and did not

Xcode 4 can't locate public header files from static library dependency

丶灬走出姿态 提交于 2019-12-17 03:45:34
问题 Alternate titles to aid search Xcode can't find header Missing .h in Xcode Xcode .h file not found lexical or preprocessor issue file not found I'm working on an iOS application project which came from Xcode 3. I have now moved to Xcode 4 my project builds a number of static libraries. Those static libraries also declare public headers and those headers are used by the application code. In Xcode 3.x the headers were copied (as a build phase) to the public headers directory , then in the

how to use ant in eclipse for preprocessing

倖福魔咒の 提交于 2019-12-14 04:06:26
问题 I need to know how to use an an Ant tool for preprocessing in Blackberry. I have a project which needs to be used in 4.6 and 5.0 versions of Blackberry, since JDE4.6 doesn't support preprocessor. I need to know how we can use Ant tool in Eclipse? Any sites or example will do. I referred this site. 回答1: http://www.blackberryforums.com/developer-forum/138210-setup-up-eclipse-blackberry-development.html and http://bb-ant-tools.sourceforge.net/docs This both links will be very helpful to you as a