preprocessing

Does anyone know how succesfully use preprocessing on J2ME ?

I'll try to better explain my problem. Using Eclipse and MTJ (Mobile Tools for Java) plugin you can set some directives for the preprocessor in order to create different builds of your code, like in C/C++. My problem is that i'm unable to use this feature. I mean, when i build my sources, the resulting output contains every line of code,...

GWT Toolkit: preprocessing files on client side

If there's a way for the client side GWT code to pre-process a file on the client computer? For example, to calculate a checksum of it before submitting the file to the server. ...

Preprocessing route parameters in Python Routes

Hello Folks, I'm using Routes for doing all the URL mapping job. Here's a typical route in my application: map.routes('route', '/show/{title:[^/]+}', controller='generator', filter_=postprocess_title) Quite often I have to strip some characters (like whitespace and underscore) from the {title} parameter. Currently there's one call pe...

Filter C++ through a perl script?

I have a perl script I'd like to filter my cpp/h files through before gcc processes them normally -- basically as an extra preprocessing step. Is there an easy way to do this? I realize I can feed the cpp files to the script and have gcc read the output from stdin, but this doesn't help with the header files. ...

special comments and pre-processing.

Is a comment of the form /*:[url=users/%id]:*/ going to be a problem with any documentation toolkits out there (especially for PHP)? Or any other comment pre-preprocessors? (Related to http://code.google.com/p/caret/ ) ...

SSIS: Strip Characters from Flat File

What's the best way to strip out characters from flat files in SSIS? In my case, I need to remove all quotes from the file before processing. EDIT: How can I run an executable against some files from SSIS? Can I somehow use the source connection as an input or would I have to pass in the file names as parameters? ...

Preprocessing with Javacc/ push front some chars in the stream ?

Hi all, Using javacc can I push some new characters in front of the inputstream ? for example let's say that my parser parses the following syntax: #define Paragraphs "Paragraph+" #define Volume "(Title,(Chapter,${Paragraphs})+)" Book=${Volume}+; How can I tell javacc that its scanner should preprocess ${Volume} to (Title,(Chapter...

Include one file to another

I'm looking for very simple template script for building JS files. It should do only one thing: include one file to another. Template (main.js) /*> script.js */ var style = "/*> style.css */"; script.js var my_script; style.css html, body {margin:0; padding:0} .my-style {background: #fffacc} Output var my_script; var style =...

debug via going into preprocessing, compilation, assembly and linking

Hi, Sometimes when there are errors output by gcc, one will break down the the process for each stage of preprocessing, compilation, assembly, linking by options like -E, -S and -c. Here is an example. I just wonder what types of errors could happen at each of these four stages and if there is one error occuring at one of these stages ...

Can I expand #include files inline and not expand directives?

I'm trying to simplify the deployment of an application. In order to build the final application on an end-user's machine, a couple of C files need to be compiled. This means that dozens of header files need to be shipped along with the application. I'd like to be able to pre-include the contents of the include files, but I also need ...

How to pass variables from one lesscss stylesheet to an included stylesheet?

I am attempting to use lesscss to build a templating system where each template has 3 or 4 alternative colour schemes. So for example, I could have a red.less stylesheet that looks like this: @main_colour: #ff0000; @import 'main.less'; So, I only have one main.less stylesheet to maintain which contains all the main styles, and uses t...

Checking the return value of a function in a macro

I have core function which i can call from the customized module of the product. function_core is the core function which will return and integer we have a macro in header file #define func_cust function_core i am calling func_cust inside my customized code. EDIT: but inside the core we again call some other core function #defin...

Regex for matching markup in PHPish markup?

Hello, I am creating a project, and I need to be able to use a regex(or if something else is preferable?) Basically, I need to convert a PHPish markup code page so that the "non-code" is converted into "code." For instance: Orginal: <?code echo 'some text'; ?> <head> </head> <body> </body> <?code echo '</html>'; ?> Converted: ...

Is there an automated way to merge C++ implementation(.cpp) and header (.h) files

Hi, I am trying to create a unit test framework using CPPUnit for a large code base. I need to be able to test individual modules, all of which are part of a module tree that begins with a specific root module. Due to a non-technical reason, I cannot touch the production file (my original approach involved adding an ifdef to the root m...

Managing highly repetitive code and documentation in Java

Highly repetitive code is generally a bad thing, and there are design patterns that can help minimize this. However, sometimes it's simply inevitable due to the constraints of the language itself. Take the following example from java.util.Arrays: /** * Assigns the specified long value to each element of the specified * range of the sp...

Is there any difference using {} pair or () pair when define function-like macro in C?

For example: #define FOO(x) (printf(x)) and #define FOO(x) {printf(x)} It seems that both are viable for preprocessing, but which is better? ...

Scala, Maven, and preprocessors

I know all of the philosophical arguments against preprocessors and macros in Java. I don't agree that just because some may abuse a language feature, it should be excluded for all. I would like to include __FILE__ and __LINE__ macros in my Java and Scala code for efficient logging. Any use of Exception is unacceptable because of runtim...

Java APT and __LINE__

In another post (http://stackoverflow.com/questions/3396074/scala-maven-and-preprocessors) I asked about preprocessing Java and Scala using a tool like m4. I need to add __FILE__ and __LINE__ capabilities (please, no "use cases" questions). Someone suggested checking out Java compiler plugins (javax.annotation.processing.Processor). How...

Ant replaceTokens with line numbers and file names

Is there any way in an Ant script to use the <copy> task (replaceTokens) to preprocess Java files and replace a "__FILE__" string with the file name of the copied file and "__LINE__" with the line number in that file? This would go a long way toward solving Java's lack of a preprocessor. The docs on replaceTokens show examples of fixed ...

The page template is not loading, but the node template is loading

sys info: drupal 6 installation, with tons of modules... too many to list. the problem: only a certain content type will not load it's template file correctly. some nodes that would be displayed on these pages through views are making it to the markup. they are the only content that gets loaded. the template file that this content falls...