Main > Free Download Search >

Free macros software for linux

macros

Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 286
Text::MacroScript 1.38

Text::MacroScript 1.38


Text::MacroScript is a macro pre-processor with embedded perl capability. more>>
Text::MacroScript is a macro pre-processor with embedded perl capability.

SYNOPSIS

use Text::MacroScript ;

# new() for macro processing

my $Macro = Text::MacroScript->new ;
while( ) {
print $Macro->expand( $_ ) if $_ ;
}

# Canonical use (the filename improves error messages):
my $Macro = Text::MacroScript->new ;
while( ) {
print $Macro->expand( $_, $ARGV ) if $_ ;
}

# new() for embedded macro processing

my $Macro = Text::MacroScript->new( -embedded => 1 ) ;
# Delimiters default to
# or
my $Macro = Text::MacroScript->new( -opendelim => [[, -closedelim => ]] ) ;
while( ) {
print $Macro->expand_delimited( $_, $ARGV ) if $_ ;
}

# Create a macro object and create initial macros/scripts from the file(s)
# given:
my $Macro = Text::MacroScript->new(
-file => [ local.macro, ~/.macro/global.macro ]
) ;

# Create a macro object and create initial macros/scripts from the
# definition(s) given:
my $Macro = Text::MacroScript->new(
-macro => [
[ MAX_INT => 32767 ],
],
-script => [
[ DHM2S =>
[
my $s = (#0*24*60*60)+(#1*60*60)+(#2*60) ;
"#0 days, #1 hrs, #2 mins = $s secs"
],
],
-variable => [ *MARKER* => 0 ],
) ;

# We may of course use any combination of the options.

my $Macro = Text::MacroScript->new( -comment => 1 ) ; # Create the %%[] macro.

# define()

$Macro->define( -macro, $macroname, $macrobody ) ;

$Macro->define( -script, $scriptname, $scriptbody ) ;

$Macro->define( -variable, $variablename, $variablebody ) ;

# undefine()

$Macro->undefine( -macro, $macroname ) ;

$Macro->undefine( -script, $scriptname ) ;

$Macro->undefine( -variable, $variablename ) ;

# undefine_all()

$Macro->undefine( -macro ) ;

$Macro->undefine( -script ) ;

$Macro->undefine( -variable ) ;

# list()

@macros = $Macro->list( -macro ) ;
@macros = $Macro->list( -macro, -namesonly ) ;

@scripts = $Macro->list( -script ) ;
@scripts = $Macro->list( -script, -namesonly ) ;

@variables = $Macro->list( -variable ) ;
@variables = $Macro->list( -variable, -namesonly ) ;

# load_file() - always treats the contents as within delimiters if we are
# doing embedded processing.

$Macro->load_file( $filename ) ;

# expand_file() - calls expand_embedded() if we are doing embedded
# processing otherwise calls expand().

$Macro->expand_file( $filename ) ;
@expanded = $Macro->expand_file( $filename ) ;


# expand()

$expanded = $Macro->expand( $unexpanded ) ;
$expanded = $Macro->expand( $unexpanded, $filename ) ;

# expand_embedded()

$expanded = $Macro->expand_embedded( $unexpanded ) ;
$expanded = $Macro->expand_embedded( $unexpanded, $filename ) ;

This bundle also includes the macro and macrodir scripts which allows us to expand macros without having to use/understand Text::MacroScript.pm, although you will have to learn the handful of macro commands available and which are documented here and in macro. macro provides more documentation on the embedded approach.

The macroutil.pl library supplied provides some functions which you may choose to use in HTML work for example.

<<less
Download (0.036MB)
Added: 2007-05-31 License: Perl Artistic License Price:
876 downloads
XMacroj 0.1.0

XMacroj 0.1.0


XMacroJ is an XML macro language for building text documents from XML components. more>>
XMacroJ is an XML macro language for building text documents from XML components. The project removes the reliance on using the include directives and frees the programmer from locking the development directly into a specific framework.
Using XMacroJ, the developer can loosely couple the development process to a framework by developing macros that wrap the framework and then creating target documents that are based on the macros.
If the developer chooses to use a different framework, then only the macros are changed and the target documents can be recompiled.
Build:
1. You must have Apache ant installed.
2. Edit the build.properties file and update the mainbuild path to your desired
directory
3. Just run ant in the directory that contains the ant build.xml file
The build directory will contain the compiled jar. You will need to link this into ant if you wish to use the com.embsoft.tools.xml.macro.XMacroAnt task.
See the doc/doc.txt for details on how to use the xml macro language
Enhancements:
- Insertions functionality was added.
- Insertions allow XML macros to insert into multiple streams which are then concatenated together in the target destination file.
- For example, you could use an insertion in a macro to insert an include directive in an XHTML document header element, or an import line when generating a Java file.
<<less
Download (0.085MB)
Added: 2006-11-17 License: LGPL (GNU Lesser General Public License) Price:
1072 downloads
Ooo-macro 2.2en

Ooo-macro 2.2en


ooo-macro is a toolkit for OpenOffice.org or StarOffice. more>>
Ooo-macro is a toolkit for OpenOffice.org or StarOffice including macros written in StarBasic, associated shortcuts, the template SPECIAL.stw, and the Perl script.
It is a complete kit of macros and shortcuts for everyday usage of StarWriter and OpenOffice.org Writer. (English version.)
Enhancements:
- This release includes a shell script and a Midnight Commander plug-in for fast dumping and viewing of the contents of OpenOffice.org 2.x ODT and ODS files and version 1.x SXW and SXC files.
<<less
Download (0.095MB)
Added: 2005-10-19 License: GPL (GNU General Public License) Price:
1473 downloads
HTML::Macro 1.27

HTML::Macro 1.27


HTML::Macro can process HTML templates with loops, conditionals, macros and more! more>>
HTML::Macro can process HTML templates with loops, conditionals, macros and more!

SYNOPSIS

use HTML::Macro;
$htm = new HTML::Macro (template.html);
$htm->print;

sub myfunc {
$htm->declare (var, missing);
$htm->set (var, value);
return $htm->process;
}

( in template.html ):

< html >< body >
< eval expr="&myfunc" >
< if def="missing" >
Message about missing stuff...
< else / >
Vars value is #var#.
< /if >
< /eval >
< /body >< /html >

HTML::Macro is a module to be used behind a web server (in CGI scripts). It provides a convenient mechanism for generating HTML pages by combining "dynamic" data derived from a database or other computation with HTML templates that represent fixed or "static" content of a page.

There are many different ways to accomplish what HTML::Macro does, including ASP, embedded perl, CFML, etc, etc. The motivation behind HTML::Macro is to keep everything that a graphic designer wants to play with *in a single HTML template*, and to keep as much as possible of what a perl programmer wants to play with *in a perl file*. Our thinking is that there are two basically dissimilar tasks involved in producing a dynamic web page: graphic design and programming. Even if one person is responsible for both tasks, it is useful to separate them in order to aid clear thinking and organized work. I guess you could say the main motivation for this separation is to make it easier for emacs (and other text processors, including humans) to parse your files: its yucky to have a lot of HTML in a string in your perl file, and its yucky to have perl embedded in a special tag in an HTML file.

HTML::Macro began with some simple programming constructs: macro expansions, include files, conditionals, loops and block quotes. Since then weve added very little: only a define tag to allow setting values and an eval tag to allow perl function calls in a nested macro scope. Our creed is "less is more, more or less."

HTML::Macro variables will look familiar to C preprocessor users or especially to Cold Fusion people. They are always surrounded with single or double hash marks: "#" or "##". Variables surrounded by double hash marks are subject to html entity encoding; variables with single hash marks are substituted "as is" (like single quotes in perl or UNIX shells). Conditionals are denoted by the and tags, and loops by the tag. Quoting used to be done using a tag, but we now deprecate that in favor of the more familiar CFML quoting syntax: < !--- --- >.

<<less
Download (0.023MB)
Added: 2006-07-31 License: Perl Artistic License Price:
1180 downloads
mod_macro 1.1.7

mod_macro 1.1.7


mod_macro is a third-party module to the Apache Http Server, distributed with a BSD-style license like Apache. more>>
mod_macro is a third-party module to the Apache Http Server, distributed with a BSD-style license like Apache.

mod_macro allows the definition and use of macros within apache runtime configuration files. The syntax is a natural extension to apache html-like configuration style.

Examples

Here is a sample use of mod_macro within a configuration file:
## Define a VHost Macro.

< Macro VHost $host $port $dir >
Listen $port
< VirtualHost $host:$port >

DocumentRoot $dir

< Directory $dir >
# do something here...
< /Directory >

# limit access to intranet subdir.
< Directory $dir/intranet >
order deny,allow
deny from all
allow from 10.0.0.0/8
< /Directory >
< /VirtualHost >
< /Macro >

## Use of VHost with different arguments.

Use VHost www.apache.org 80 /projects/apache/web
Use VHost www.perl.com 8080 /projects/perl/web
Use VHost www.ensmp.fr 1234 /projects/mines/web

## Done.

<<less
Download (0.013MB)
Added: 2006-05-08 License: BSD License Price:
1264 downloads
Text::Macro 0.07

Text::Macro 0.07


Text::Macro Perl module is a template facility whos focus is on generating code such as c, java or sql. more>>
Text::Macro Perl module is a template facility whos focus is on generating code such as c, java or sql. While generating perl code is also possible, there is a potential conflict between the control-symbol and the perl comment symbol.
Perl is excelent at manipulating text, and it begs the question why one would need such a tool.
The answer is that good code design should be such that applications should not have to be modified so as to make configuration changes. Thus external configuration files/data is used. However, if these files are read in as perl-code, then simple errors could crash the whole application (or provide subtle security risks). Further, it is often desired to invert the control flow and text-data (namely, make the embedded strings primary, and control-flow secondary). This is the ASP model, and for 90% HTML, 10% code, this works great.
This module supports many control facilities which directly translate into perl-control facilities (e.g. inverting the ASP-style code back into perl-style behind the scenes). The inversion process is cached in a simple user object.
The module was initially inspired by Text::FastTemplate by Robert Lehr, whos module didnt completely fullfill my needs.
Main features:
- fast, simple, robust
- code-generating-centric feature-set
- substitutions stand-out from template
- macro-code embedded in text
- OOP
- external and internal includes (for clearifying complex control-flow)
- scoped variable-substitutions
- line-based processing (like cpp)
- usable error messages
<<less
Download (0.012MB)
Added: 2007-05-31 License: Perl Artistic License Price:
877 downloads
Filter::Macro 0.11

Filter::Macro 0.11


Filter::Macro is a Perl module to make macro modules that are expanded inline. more>>
Filter::Macro is a Perl module to make macro modules that are expanded inline.

SYNOPSIS

In MyHandyModules.pm:

package MyHandyModules;
use Filter::Macro;
# lines below will be expanded into callers code
use strict;
use warnings;
use Switch;
use IO::All;
use Quantum::Superpositions;

In your program or module:

use MyHandyModules; # lines above are expanded here

If many of your programs begin with the same lines, it may make sense to abstract them away into a module, and use that module instead.

Sadly, it does not work that way, because by default, all lexical pragmas, source filters and subroutine imports invoked in MyHandyModules.pm takes effect in that module, not the calling programs.

One way to solve this problem is to use Filter::Include:

use Filter::Include;
include MyHandyModules;

However, it would be really nice if MyHandyModules.pm could define the macro-like semantic itself, instead of placing the burden on the caller.

This module lets you do precisely that. All you need to do is to put one line in MyHandyModules.pm, after the package MyHandyModules; line:

use Filter::Macro;

With this, a program or module that says use Filter::Macro will expand lines below use Filter::Macro into their own code, instead of the default semantic of evaluating them in the MyHandyModules package.

Line numbers in error and warning messages are unaffected by this module; they still point to the correct file name and line numbers.

<<less
Download (0.013MB)
Added: 2007-02-20 License: MIT/X Consortium License Price:
976 downloads
METAGRAPH 0.2

METAGRAPH 0.2


METAGRAPH is a small set of macros that help in drawing (un)directed graphs with METAPOST and the boxes package. more>>
METAGRAPH is a small set of macros that help in drawing (un)directed graphs with METAPOST and the boxes package.
METAGRAPH project provides low-impact definitions that automatically produce (labelled) nodes/vertices and (labelled) edges/arcs that connect correctly boxed items.
Moreover, circular boxes with fixed radius are available to produce more aesthetically pleasant graphs.
Usage:
Just include metagraph.mp in your source files. Full documentation is provided with the package.
Enhancements:
- Loops can now be custom-curled using a global parameter.
<<less
Download (0.036MB)
Added: 2006-01-22 License: GPL (GNU General Public License) Price:
1370 downloads
ModAssy 1.5.1

ModAssy 1.5.1


This is an advanced portable C++ library with 80 variations of the ASSERT macro, to add expressions, levels and optional actions. 48 are modular because they can also use Rich Boolies, allowing much more combinations than non-modular ASSERT macros. It is very flexible because it allows you to create custom loggers and assertion displayers, but you can also use the provided ones for Windows, wxWidgets or console applications. more>>

ModAssy - This is an advanced portable C++ library with 80 variations of the ASSERT macro, to add expressions, levels and optional actions. 48 are modular because they can also use Rich Boolies, allowing much more combinations than non-modular ASSERT macros. It is very flexible because it allows you to create custom loggers and assertion displayers, but you can also use the provided ones for Windows, wxWidgets or console applications. The loggers and displayers show extra information, like the date and time, the thread id, the current working directory, etc. and you can add infoprovider objects to ModAssy, to provide similar custom information.

It has eight basic assertions, that each have 16 variations, by adding four suffixes that add functionality.

It is very reliable and portable, as it has been tested with five different compilers (VC++ 6.0, .NET 2003, .NET 2005, gcc on Windows and Linux), with nearly all warnings enabled.

The Rich Boolies can do all kinds of checks and generate elaborate information:

* Relations between two objects: rbEQUAL, rbLESS, ...

* Bitwise comparisons: rbEQUAL_BITWISE, rbBITS_ON, rbBITS_OFF, ...

* Type checking (with RTTI): rbEQUAL_TYPES, rbHAS_TYPE, ...

* Working on ranges and containers: rbIN_RANGE, rbIN_RANGES, rbIN_CONTAINER, rbIN_CONTAINERS, ... These have an extra argument that tells what kind of check to do, e.g. Sorted, Compare, Has, Unique, ...

* String comparisons: rbSTRING, rbSTRING_BEGINS_WITH, rbSTRING_ENDS_WITH, rbSTRING_CONTAINS. These have an extra argument that tells what kind of check to do, e.g. case sensitive or not.

* Logical expressions: rbAND, rbOR, rbXOR. These can have Rich Boolies or plain boolean expressions as their arguments.

* Exceptions: rbEXCEPTION takes an exception as its argument, and uses the information in it.


Enhancements:
Version 1.5.1
System Requirements:
<<less
Download (1000.7Kb)
Added: 2006-10-15 License: Free Price: Free
15 downloads
BlogMax

BlogMax


BlogMax is an Emacs package that aids in the creation of a weblog. more>>
BlogMax project is an Emacs package that aids in the creation of a weblog.

You define templates and an FTP site for uploads. Most of your sites content is defined by text files. Saving a text file automatically wraps the template around it, expands macros and shortcuts, and saves the HTML file.

Other commands in "weblog" mode upload files via FTP, create an RSS file, yank links or blockquotes into the buffer, create shortcuts, etc. The BlogMax Web site was, of course, created with BlogMax.
<<less
Download (0.17MB)
Added: 2007-06-18 License: GPL (GNU General Public License) Price:
858 downloads
mod_spin 1.1.5

mod_spin 1.1.5


mod_spin is an Apache module that provides a simple template language with data replacement capabilities. more>>
mod_spin is an Apache module that provides a simple template language with data replacement capabilities, persistent application and session tracking, database connection pooling, dynamic linking of applications into Apache as shared libraries, parameters, cookies, and multipart/form data parsing, and a simple API for MVC controller functionality.
Main features:
- a simple template language with data replacement capabilities only
- persistent application and session tracking
- dynamic linking of applications into Apache 2 as shared libraries
- parameters, cookies and multipart/form-data parsing via libapreq2
- simple API for (kind of) MVC controller functionality
- simple API for pooled (or not) access to SQL databases
Enhancements:
- Application/session data is now saved in XML format.
- There is a new file-based store backend.
- The build configuration script now uses pkg-config.
- Private M4 macros are no longer in the publicly available mod_spin.m4.
<<less
Download (0.082MB)
Added: 2007-08-14 License: GPL (GNU General Public License) Price:
801 downloads
Parrot::OpTrans 0.4.5

Parrot::OpTrans 0.4.5


Parrot::OpTrans is a Perl module that can transform Ops to C Code. more>>
Parrot::OpTrans is a Perl module that can transform Ops to C Code.

Parrot::OpTrans is the abstract superclass for the Parrot op to C transforms. Each transform contains various bits of information needed to generate the C code, and creates a different type of run loop. The methods defined here supply various default values and behaviour common to all transforms.

The subclass hierarchy is as follows:

OpTrans
|_________________________
| | |
C CGoto Compiled
| |
CPrederef |
| | |
| |_________|
| |
CSwitch CGP

Class Methods

new()

Returns a new instance.

Instance Methods

prefix()

Returns the default Parrot_ prefix.

Used by Parrot::Ops func_name() to individuate op function names.

suffix()

Implemented in subclasses to return a suffix with which to individuate variable names. This default implementation returns an empty string.

defines()

Implemented in subclasses to return the C #define macros required.

opsarraytype()

Returns the type for the array of opcodes. By default here its an array opcode_t, but the prederef runops core uses an array of void* to do its clever tricks.

core_type()

Implemented in subclasses to return the type of core created by the transform. This default implementation raises an exception indicating that the core type is missing. See the Parrot_Run_core_t enum in include/parrot/interpreter.h for a list of the core types.

core_prefix()

Implemented in subclasses to return a short prefix indicating the core type used to individuate core function names.

run_core_func_decl($base)

Optionally implemented in subclasses to return the C code for the run core function declaration. $base is the name of the main ops file minus the .ops extension.

ops_addr_decl($base_suffix)

Optionally implemented in subclasses to return the C code for the ops address declaration. $base_suffix is the name of the main ops file minus the .ops extension with suffix() and an underscore appended.

run_core_func_decl($base)

Optionally implemented in subclasses to return the C code for the run core function declaration. $base is the same as for run_core_func_decl().

run_core_func_start()

Implemented in subclasses, if run_core_func_decl() is implemented, to return the C code prior to the run core function.

run_core_after_addr_table($base_suffix)

Optionally implemented in subclasses to return the run core C code for section after the address table. $base_suffix is the same as for ops_addr_decl().

run_core_finish($base)

Implemented in subclasses to return the C code following the run core function. $base is the same as for run_core_func_decl().

init_func_init1($base)

Optionally implemented in subclasses to return the C code for the cores init function. $base is the same as for run_core_func_decl().

init_set_dispatch($base_suffix)

Optionally implemented in subclasses to return the C code for initializing the dispatch mechanism within the cores init function. $base_suffix is the same as for ops_addr_decl().

Macro Substitutions

The following methods are called by Parrot::OpFile to perform ops file macro substitutions.

access_arg($type, $value, $op)

Implemented in subclasses to return the C code for the specified op argument type and value. $op is an instance of Parrot::Op.

gen_goto($where)

The various goto_X methods below call this method with the return value of an expr_X method (implemented in subclass).

restart_address($address)

Implemented in subclasses to return the C code for restart ADDRESS($address).

restart_offset($offset)

Implemented in subclasses to return the C code for restart OFFSET($offset).

goto_address($address)

Transforms the goto ADDRESS($address) macro in an ops file into the relevant C code.

goto_offset($offset)

Transforms the goto OFFSET($offset) macro in an ops file into the relevant C code.

goto_pop()

Transforms the goto POP($address) macro in an ops file into the relevant C code.

expr_offset($offset)

Implemented in subclasses to return the C code for OFFSET($offset). Called by goto_offset().

expr_address($address)

Implemented in subclasses to return the C code for ADDRESS($address). Called by goto_address().

<<less
Download (3.1MB)
Added: 2006-07-06 License: Perl Artistic License Price:
1205 downloads
IMathAS 1beta16

IMathAS 1beta16


IMathAS project is a Web-based math testing and homework system. more>>
IMathAS project is a Web-based math testing and homework system.
IMathAS (Internet Mathematics Assessment System) is a Web-based math testing and homework system.
It is a light course/learning management system and testing system, similar to and inspired by WebWork and WIMS, and similar to textbook-bundled systems like iLrn and MathXL.
It requires a browser with MathML and SVG support such as Firefox 1.5 or IE6 with plugins.
Main features:
- Math: The system was designed for Math assessment; no effort was made for the system to be multi-purpose.
- Sharing: The system was setup to encourage sharing of questions within a system and outside. Questions are grouped into question libraries, and are not tied directly to a specific assessment. Unless marked Private, questions can be used by anyone on the system, or used as a template for writing new questions. Export and Import allows the sharing of question sets between systems. Also, macro libraries allow for the expansion of IMathASs question language. Users with expertise in a field can develop macro extensions, and share them with other users.
- Ease of Install: The system uses standard PHP and MySQL. It requires no special compilation options or installation of external programs
- Display:
- Rich Math and Graph display, using standards-based MathML and SVG, powered by Peter Jipsens ASCIIsvg and ASCIIMathML
- Rich Text Editor with built-in Math and Graph support for text items displayed in a course
- Alternate display options for screenreaders and browsers without needed support
- Assessment:
- Question types including:
- Functions, with answers like "sin(x)"
- Numbers, compared to a given tolerance
- Calculated Numbers, like 5/3 or 2^5
- Multiple-Choice
- Multiple-Answer
- Matching
- String
- Numerical Matrix
- Calculated Matrix
- Multipart
- Multiple display options and assessment settings, including an option for practice sets, and due date exceptions for individual students
- Algorithmically generated questions, with a relatively simple-to-use question language (loosely based on PHP) with many built-in randomizers and display macros
- Expandable question language, by installing additional macros
- Other Course Features
- Post text items, uploaded files, or web links to the classroom
- Basic Discussion Forums
- Administration:
- Flexible administration: IMathAS can be centrally administered, or teachers can be given rights to create their own courses
- Courses can have one or more teachers
<<less
Download (0.46MB)
Added: 2006-11-02 License: GPL (GNU General Public License) Price:
1091 downloads
cpphs 1.0

cpphs 1.0


cpphs is a Haskell re-implementation of cpp, the C pre-processor. more>>
cpphs is a liberalised re-implementation of cpp, the C pre-processor, in Haskell.
Why re-implement cpp? Rightly or wrongly, the C pre-processor is widely used in Haskell source code. It enables conditional compilation for different compilers, different versions of the same compiler, and different OS platforms.
It is also occasionally used for its macro language, which can enable certain forms of platform-specific detail-filling, such as the tedious boilerplate generation of instance definitions and FFI declarations. However, there are two problems with cpp, aside from the obvious aesthetic ones:
- For some Haskell systems, notably Hugs on Windows, a true cpp is not available by default. * Even for the other Haskell systems, the common cpp provided by the gcc 3.x series is changing subtly in ways that are incompatible with Haskells syntax. There have always been problems with, for instance, string gaps, and prime characters in identifiers. These problems are only going to get worse.
So, it seemed right to provide an alternative to cpp, both more compatible with Haskell, and itself written in Haskell so that it can be distributed with compilers.
This version of the C pre-processor is pretty-much feature-complete, and compatible with the -traditional style. It has two main modes:
- conditional compilation only (--nomacro),
- and full macro-expansion (default).
In --nomacro mode, cpphs performs only conditional compilation actions, namely #includes, #ifs, and #ifdefs are processed according to text-replacement definitions (both command-line and internal), but no parameterised macro expansion is performed. In full compatibility mode (the default), textual replacements and macro expansions are also processed in the remaining body of non-cpp text.
Working features:
#ifdef simple conditional compilation
#if the full boolean language of defined(), &&, ||, ==, etc.
#elif chained conditionals
#define in-line definitions (text replacements and macros)
#undef in-line revocation of definitions
#include file inclusion
#line line number directives
line continuations within all # directives
/**/ token catenation within a macro definition
## ANSI-style token catenation
# ANSI-style token stringisation
__FILE__ special text replacement for DIY error messages
__LINE__ special text replacement for DIY error messages
__DATE__ special text replacement
__TIME__ special text replacement
Macro expansion is recursive. Redefinition of a macro name does not generate a warning. Macros can be defined on the command-line with -D just like textual replacements. Macro names are permitted to be Haskell identifiers e.g. with the prime and backtick ` characters, which is slightly looser than in C, but they still may not include operator symbols.
Numbering of lines in the output is preserved so that any later processor can give meaningful error messages. When a file is #included, cpphs inserts #line directives for the same reason. Numbering should be correct even in the presence of line continuations. If you dont want #line directives in the final output, use the --noline option.
Any syntax errors in cpp directives gives a message to stderr and halts the program. Failure to find a #included file produces a warning to stderr, but processing continues.
Differences from cpp:
In general, cpphs is based on the -traditional behaviour, not ANSI C, and has the following main differences from the standard cpp.
General
- The # that introduces any cpp directive must be in the first column of a line (whereas ANSI permits whitespace before the #).
- Generates the #line n "filename" syntax, not the # n "filename" variant.
- C comments are only removed from within cpp directives. They are not stripped from other text. Consider for instance that in Haskell, all of the following are valid operator symbols: /* */ */* However, you can turn on C-comment removal with the --strip option.
- Macros are never expanded within Haskell comments, strings, or character constants, unless you give the --text option to disable lexing the input as Haskell.
- Macros are always expanded recursively, unlike ANSI, which detects and prevents self-recursion. For instance, #define foo x:foo expands foo once only to x:foo in ANSI, but in cpphs it becomes an infinite list x:x:x:x:..., i.e. cpphs does not terminate.
Macro definition language
- Accepts /**/ for token-pasting in a macro definition. However, /* */ (with any text between the open/close comment) inserts whitespace.
- The ANSI ## token-pasting operator is available with the --hashes flag. This is to avoid misinterpreting any valid Haskell operator of the same name.
- Replaces a macro formal parameter with the actual, even inside a string (double or single quoted). This is -traditional behaviour, not supported in ANSI.
- Recognises the # stringisation operator in a macro definition only if you use the --hashes option. (It is an ANSI addition, only needed because quoted stringisation (above) is prohibited by ANSI.)
- Preserves whitespace within a textual replacement definition exactly (modulo newlines), but leading and trailing space is eliminated.
- Preserves whitespace within a macro definition (and trailing it) exactly (modulo newlines), but leading space is eliminated.
- Preserves whitespace within macro call arguments exactly (including newlines), but leading and trailing space is eliminated.
- With the --layout option, line continuations in a textual replacement or macro definition are preserved as line-breaks in the macro call. (Useful for layout-sensitive code in Haskell.)
Enhancements:
- This release now includes a compatibility script for command line arguments to match the original cpp.
- There are several minor bugfixes, e.g. quotes around replacements for special macros like __FILE__, etc.
- Interaction with preprocessors like hsc2hs is also improved: if they allow non-cpp directives like #def, these are now passed through to the output with a warning to stderr, rather than halting with an error.
- Likewise, a #! line in a shell script is now ignored.
<<less
Download (0.039MB)
Added: 2005-10-18 License: LGPL (GNU Lesser General Public License) Price:
1467 downloads
Parrot::OpTrans::C 0.4.5

Parrot::OpTrans::C 0.4.5


Parrot::OpTrans::C is a Perl module Ops to C Code Generation. more>>
Parrot::OpTrans::C is a Perl module for Ops to C Code Generation.

DESCRIPTION

Parrot::OpTrans::C inherits from Parrot::OpTrans to provide a function-based (slow or fast core) run loop.

Instance Methods

core_type()

Returns PARROT_FUNCTION_CORE.

core_prefix()

Returns an empty string.

defines()

Returns the C #define macros for register access etc.

gen_goto($where)

Reimplements the superclass method so that $where is suitably cast.

expr_address($address)

Returns the C code for ADDRESS($address). Called by goto_address().

expr_offset($offset)

Returns the C code for OFFSET($offset). Called by goto_offset().

expr_pop()

Returns the C code for POP(). Called by goto_offset().

access_arg($type, $value, $op)

Returns the C code for the specified op argument type (see Parrot::OpTrans) and value. $op is an instance of Parrot::Op.

restart_offset($offset)

Returns the C code for restart OFFSET($offset).

restart_address($address)

Returns the C code for restart ADDRESS($address).

<<less
Download (3.1MB)
Added: 2006-07-05 License: GPL (GNU General Public License) Price:
1206 downloads
Secleted [ 0 ] software to compare
  • Page: 1 of 5
  • 1
  • 2
  • 3
  • 4
  • 5