Main > Free Download Search >

Free ast software for linux

ast

Sponsored Links
Sponsored Links
Sort by >> Relevance
rss
Secleted [ 0 ] software to compare
Results 1 - 15 of about 14
Template::Ast 0.02

Template::Ast 0.02


Template::Ast is a Perl module to process ASTs for Perl Template Toolkit. more>>
Template::Ast is a Perl module to process ASTs for Perl Template Toolkit.

SYNOPSIS

use Template::Ast;

# Rebuild AST stored in file:
$ast = Template::Ast->read(foo.ast) or
die Template::Ast->error();

# Writing existing AST to file:
$ast = { Marry => [24, F], John => [21, M] };
Template::Ast->write($ast, foo.ast) or
die Template::Ast->error();

$ast = Template::Ast->merge([1,2,3], undef); # [1,2,3]
$ast = Template::Ast->merge(undef, [1,2,3]); # [1,2,3]
$ast = Template::Ast->merge(undef, undef); # undef

$ast = Template::Ast->merge({A=>1,B=>2}, [C]); # [C]
$ast = Template::Ast->merge([1,2,3], [5,6]); # [5,6]
$ast = Template::Ast->merge([{A=>1},2], 5); # 5

$ast = Template::Ast->merge({A=>1,B=>2}, {C=>3}); # {A=>1,B=>2,C=>3}
$ast = Template::Ast->merge({A=>1,B=>2}, {B=>3}); # {A=>1,B=>3}

# {A=>1,B=>2}
$ast = Template::Ast->merge({A=>1,B=>undef}, {A=>undef,B=>2});

Template::Ast->merge(
{A=>1,B=>{C=>1,D=>2}},
{B=>{C=>1,D=>3,E=>4}}
); # {A=>1,B=>{C=>1,D=>3,E=>4}}

Template::Ast->merge(
{A=>1,B=>{C=>[1,2]}},
{B=>{C=>[3,4]}}
); # {A=>1,B=>{C=>[3,4]}}

print Template::Ast->dump([$vars], [vars]);

ASTs are essential in the programming model based on Perl Template Toolkit. This module provides some easy interface to do the dirty work involved in AST handling. The term AST used here are referred to any Perl referece pointed to a complex data structure, such as a nested hash, a nested array, or such.

<<less
Download (0.020MB)
Added: 2007-06-29 License: Perl Artistic License Price:
847 downloads
Starlink::AST::PGPLOT 0.04

Starlink::AST::PGPLOT 0.04


Starlink::AST::PGPLOT is a AST wrapper to the PGPLOT library. more>>
Starlink::AST::PGPLOT is a AST wrapper to the PGPLOT library.

SYNOPSIS

use Starlink::AST::PGPLOT
The main methods which need to be registered with the AST package are shown below,
$status = _GFlush();
$status = _GLine( @x, @y );
$status = _GMark( @x, @y, $type );
$status = _GText( $text, $x, $y, $just, $upx, $upy );
( $status, $xb, $yb ) = _GTxExt( $text, $x, $y, $just, $upx, $upy );
( $status, $chv, $chh ) = _GQch();
( $status, $old_value ) = _GAttr( $attr, $value, $prim );
( $status, $alpha, $beta) = _GScales();

This file implements the low level graphics functions required by the rest of AST, by calling suitable PGPLOT functions (the FORTRAN PGPLOT interface is used).

This file can be used as a template for the development of similar modules to support alternative graphics systems.

<<less
Download (0.28MB)
Added: 2007-02-27 License: Perl Artistic License Price:
969 downloads
ANTLR 2.7.5

ANTLR 2.7.5


ANTLR is an advanced, easy-to-use parser and translator generator. more>>
ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) is a language tool that provides a framework for constructing recognizers, compilers, and translators from grammatical descriptions containing Java, C#, C++, or Python actions.
ANTLR provides excellent support for tree construction, tree walking, and translation. There are currently about 5,000 ANTLR source downloads a month.
Enhancements:
Java CHANGES
- moved consume(); consumeUntil(...) to recover() method you can override in parsers only. New method signature: public void recover(BitSet tokenSet) throws TokenStreamException;
- CommonASTWithHiddenTokens fixed tree builders copy hidden tokens
- ASTFactory; added overloaded method public void setASTNodeClass(Class c);
- default charVocabulary is 0..127 for ASCII range. ~n, for example, gave really wacky results since charVocabulary had no defined range.
- BaseAST.equals() didnt work when node text was null.
- LLkParser.consume now throws TokenStreamException as Parser.consume does.
C++ changes:
- Added TokenStreamRewriteEngine C++ port + example.
- Fixes for sign extension problems that sneaked in 2.7.4.
- Fixes for some quoting bugs in C++ codegeneration.
- Fixes for some wrong extensions in generated docbook and HTML files (for -html/-docbook commandline options).
- Made codegenerator more unicode friendly.
- Tweaks for preliminary UTF8 support. Includes an example that is capable of parsing UTF8 input (more proof of concept than what is to be). (Using a custom InputBuffer and CharScanner). *Feedback on this is appreciated.*
- Fixed codegeneration bug (a..z!) would trigger generation of invalid C++ code.
- Added missing warning for redefinition of AST types for nodes. (Thanks to Sergey Bogdanov)
- Bugfix for AST factory initialization code.
- Fixed default argument mangling for generated rule methods.
- Fixed sign extension problem in error messages in support lib (triggered by MSVC)
- Fixed type generated for saveIndex and _begin variables. Thanks to Brad Schick for the patch.
- getFilename/Line/Column methods added to TokenStreamRecognitionException (thanks to Heinz Beckers)
- Added lexer states to the flex lexer example. It now seems to parse the same set of java as the other antlr java parsers.
- Small tweaks to include files.
- Doc tweaks.
- Revised configure/makefiles by Wolfgang Haefelinger.
C# Changes
Changes for C# support (by Anthony Oguntimehin, Kunle Odutola & Micheal Jordan):
- Factored out IToken and IHiddenStreamToken interfaces.
- ASTPair now supports a protocol for reusing instances. Generated C# code creates far fewer ASTPair instances.
- The values of LA(1) and LA(2) are now cached in lexers
- ASTArray creation/usage replaced with C# variable length parameter lists. ASTArray remains for backwards compatibility only.
- Several bugfixes in antlr.debug to better support ParseView-style tools [Suggested by Eric Taucher.]
- Updated the C# code generator to generate code that uses use cached LA(x) values, reuses ASTPair instances, and uses the new IToken and IHiddenStreamToken interfaces
- Re-organised the ANTLR runtime library for the .NET platform. Library is now packages as two assemblies:
- antlr.runtime.dll - required, core library types and functionality
- antlr.astframe.dll - optional, types and functionality for displaying astframes
- The upshot of all this is that projects that dont need the ASTFrame functionality arent forced to load the System.Drawing and System.Windows.Forms assemblies that it depends on.
- C# VS.NET solution and project files & names have been updated to 2.7.5. Also new project file for the astframe assembly.
- Updated the NAnt build file(s) to support building the new two-assembly runtime.
- Incorporated latest fixes for the java grammar into the C# java example project
- Updated runtime documentation to accomodate the new two-assembly C# runtime.
<<less
Download (0.88MB)
Added: 2005-04-22 License: Public Domain Price:
1650 downloads
Parse::Java 0.01

Parse::Java 0.01


Parse::Java is a Perl module that acts like a parser for Java code. more>>
Parse::Java is a Perl module that acts like a parser for Java code.

SYNOPSIS

use Parse::Java;

my $ast = Parse::Java->parse_file(MyClass.java);

Parse::Java parses Java code into an Abstract Syntax Tree which can be used for many things like writing compilers and stuff.

As this module is currently under development it isnt yet able to parse much Java. Whats in the t/*.t basically works but not much else.

The lexer should also more or less work fine except expansion of unicode escapes uNNNN.

INTERFACE

This module uses an object-oriented interface.

CLASS METHODS

parse_file ( $path )

Parses the contents of the file $path. Returns an AST representing the code.

parse_string

Parses the source in $string. Returns an AST representing the code.

detokenize ( $ast )

Walks the AST and replaces all Parse::Java::Token-objects with their stringified value.

INSTANCE METHODS

_set_input ( $source )

Sets the input to the lexer.

_next_token

Returns a list with the next token from the stream and its value.

<<less
Download (0.018MB)
Added: 2007-01-16 License: Perl Artistic License Price:
1012 downloads
Advance Stock Tracker 0.2.8

Advance Stock Tracker 0.2.8


Advanced Stock Tracking System (AST) is a Web-based application for keeping track of stocks. more>>
Advanced Stock Tracking System (AST) is a Web-based application for keeping track of stocks.

Advance Stock Tracker features a portfolio with dividend tracking, a worksheet to keep track of prospects, a stock comparison utility, and a search engine for the stock market based heavily on technical analysis.

<<less
Download (1.3MB)
Added: 2007-05-07 License: GPL (GNU General Public License) Price:
917 downloads
xmms-cube 1.0.0

xmms-cube 1.0.0


xmms-cube is a port of the Winamp plugin in_cube. more>>
xmms-cube is a port of the Winamp plugin in_cube. xmms-cube plugin allows you to play Gamecube streamed audio files.
Supported types include:
- DSP
- GCM
- HPS
- IDSP
- SPT
- SPD
- MSS
- MPDSP
- ISH,
- YMF
- ADX
- ADX
- RSD
- RSP
- AST
- AFC
<<less
Download (0.36MB)
Added: 2006-03-27 License: GPL (GNU General Public License) Price:
1315 downloads
OSSP cfg 0.9.11

OSSP cfg 0.9.11


OSSP cfg is a ISO-C library for parsing arbitrary C/C++-style configuration files. more>>
OSSP cfg project s a ISO-C library for parsing arbitrary C/C++-style configuration files. A configuration is sequence of directives, each directive consists of zero or more tokens, and each token can be either a string or again a complete sequence.
This means the configuration syntax has a recursive structure and allows you to create configurations with arbitrarily-nested sections.
The configuration syntax also provides complex single/double/balanced quoting of tokens, hexadecimal/octal/decimal character encodings, character escaping, C/C++ and shell-style comments, etc.
The library API allows importing of a configuration text into an Abstract Syntax Tree (AST), traversing the AST, and optionally exporting the AST again as a configuration text.
Enhancements:
- The build environment has been upgraded to GNU libtool 1.5.22, GNU shtool 2.0.6, and GNU autoconf 2.60.
<<less
Download (0.34MB)
Added: 2006-08-11 License: GPL (GNU General Public License) Price:
1174 downloads
Scheme2Js 20060718

Scheme2Js 20060718


Scheme2Js is a Scheme to Javascript compiler. more>>
Scheme2Js is a Scheme to Javascript compiler. While some effort has been spent on being as close as possible to R5rs, we concentrated mainly on efficiency.
Usually Scheme2Js produces Javascript code, that is comparable to hand-written code. In order to achieve this performance, Scheme2Js is not completely R5rs compliant. In particular it lacks support for continuations, exact numbers and it treats tail recursion only partially.
Scheme2Js provides several flags, that allow to modify the result:
- --no-js-dot-notation disallows access to JavaScript fields with the dot-notation. This flag disables accesses of the form x.y like in document.getElementById. It is however still possible to access the is a valid expression using the js-field function.
- --mutable-strings: in order to improve the performance of string-operations and to ease the interface between Scheme and JavaScript code, the default implementation maps Scheme strings to JavaScript strings. Contrary to Scheme strings, JavaScript strings are however immutable. This flag maps strings to a JavaScript class, that represents Scheme strings, that are mutable. The resulting code might be slightly slower, and it is more difficult to interface with Javascript code.
- --encapsulate-parts encapsulates the program into an anonymous function. Only global variables are outside of this anonymous function. On one hand this introduces one function call to the anonymous function. But on the other hand most Javascript implementations should run faster with this optimization: usually hashtables are used to represent scopes in JavaScript. By using an anonymous function the programs variables are separated into their own smaller hashtable which (in theory) accelerates accesses to these variables. More importantly the variables are stored in their own hashtable, and not in the global hashtable, which is accessible by the global variable. It is extremely easy to indirectly modify the contents of global variables. Inlining or other common optimizations are hence impossible to do on global variables. By storing the programs variables in an anonymous function these optimizations become again possible.
- --optimize-var-number reduces the number of variables used in the resulting JavaScript code. The code may run faster, but is more difficult to debug, as the variable names are lost and the same variable might be used several times.
- --optimize-while: with this flag Scheme2Js optimizes common while loops. The unoptimized while loops are often of the form:
while(true) {
if(test)
resVar = res;
else {
modify_loop_variable;
continue;
}
break;
}
This optimization looks for these patterns and moves the test into the while loop:
while(!test) {
modify_loop_variable;
}
resVar = res;
This optimization has been implemented only recently and is therefore not yet activated by default.
- --verbose prints some information.
- --no-inlining disables all function inlining (constants might still be inlined).
- --inline-globals lets Scheme2Js inline global functions and constants. This might have two unwanted side-effects: for one, global variables are often used to transfer data between different modules. Some inlined functions are lost if there is no reference to them anymore. If global functions are to be used outside a module, one should not use this flag. (This behavior is likely to change in future versions of Scheme2Js.)
- --unresolved-is-js: if a variable is unbound, the compiler will assume the variable comes from another module, or from JavaScript. See Section Scheme - Javascript for a more detailed discussion of the JavaScript Scheme interface.
- --js-this provides the this variable within Scheme functions. This way, Scheme procedures can be used as methods of JavaScript objects.
- --no-tailrec disables the tailrec to while-loop optimization. If you suspect a bug in the compilers way of translating tail-recs, you could try this flag.
- --no-optimize-calls disables Scheme2Js inlining of binary or unary operations. For instance sci_plus(3, 5) is optimized to (3+5). This optimization is quite important, and theres usually no reason to disable it.
- --no-optimize-consts disables the pre-constant calculation. Unless disabled (with this flag), compound constants are precalculated and their occurrences replaced by a reference to a variable holding the constant. This makes repeated accesses to these constants faster, but introduces new variables.
- --no-optimize-boolify disables the boolify optimization. JavaScripts and Schemes boolify are not equivalent: JavaScript considers false, 0, null and undefined to be false, whereas Scheme only has #f. The unoptimized boolify therefore always adds the test against false: if (test !== false) ... If Scheme2Js can see, that the test itself is a boolean, it can remove the unnecessary !== false test. This flag disables this optimization.
- --d STAGE prints a dot-file (see graphviz) of the AST after stage STAGE. Possible stages are: expand, tree, symbol, node-elim1, tail, inline, constant-propagation, rm-unused-vars, capture, node-elim2, while, (tt "statements"), node-elim3. Usually one doesnt need this flag, unless for debugging purposes.
- --print-locs prints the original locations as comments to the JavaScript file. These locations are currently the character-offset from the beginning of the file.
Enhancements:
- This release adds trampolines.
<<less
Download (0.077MB)
Added: 2006-07-19 License: GPL (GNU General Public License) Price:
1192 downloads
Community Z Tools 1.0

Community Z Tools 1.0


Community Z Tools Project (CZT): Tools for editing, typechecking and animating Z specifications and related notations. more>>
The Community Z Tools (CZT) project is building a set of tools for editing, typechecking and animating formal specifications written in the Z specification language, with some support for Z extensions such as Object-Z and TCOZ. These tools are all built using the CZT Java framework for Z tools.
[Adapted from Andrew Martins original CZT proposal] The Z specification language was adopted as an ISO standard in 2002. The project can be used to precisely specify the requirements or behaviour of systems, and analyze that behaviour via proof, animation, test generation etc. However, one of the biggest barriers to the widespread use of the Z specification language seems to be the issue of tool support.
Many projects have constructed Z tools, some of product quality, most as student projects. Few of them are integrated with each other; few support all the new ISO standard; fewer still build together to form the kind of integrated environment that developers are beginning to expect.
Many good ideas have been developed to prototype stage, and then have been lost as projects have finished and students or researchers have moved on. The number of times a request for a Z parser arises in the Z newsgroup suggests lots of people are producing tools, most of which will never be seen outside their own institute. An integrated effort will move forward the state of tools, and thereby the take-up of Z.
Our objectives are to encourage interchange between existing Z tools (via a standard XML interchange format for Z), and to provide open-source libraries for building and integrating new Z tools. The software we are building does/will include:
1. An XML Schema markup for Z. See the ZB2003 proceedings for a paper describing this markup.
2. Java classes for Z annotated syntax trees (AST).
3. Java classes for converting between XML and Java AST.
4. Java libraries for the common operations needed in every Z tool (markup-converters, parser, type-checker, schema expansion etc.). A paper describing these will be presented at ZB2005.
5. One or more simple graphical Z editors, with facilities for easily entering the special Z unicode symbols. Initially we are using jEdit.
6. A Z animation tool called ZLive, with a customisable graphical user interface.
7. Export tools, to output Z in other notations or for other Z tools. (example, HTML output, LaTeX output, translation to B and JML).
8. Extended versions of the libraries and tools to support Z extensions such as Object-Z and TCOZ.
Enhancements:
- The software was updated to ZML 2.1.
- Object Z and Circus support were added.
- Z checking was updated to reflect bugfixes in the standard.
- Java 1.5 support was improved.
- Major bugfixes and code cleanups were done in all of the components.
<<less
Download (MB)
Added: 2007-07-05 License: GPL (GNU General Public License) Price:
848 downloads
Template::Alloy::Parse 1.006

Template::Alloy::Parse 1.006


Template::Alloy::Parse is a Perl module with common parsing role for creating AST from templates. more>>
Template::Alloy::Parse is a Perl module with common parsing role for creating AST from templates.

The Template::Alloy::Parse role is reponsible for storing the majority of directive parsing code, as well as for delegating to the TT, HTE, Tmpl, and Velocity roles for finding variables and directives.

ROLE METHODS

parse_tree

Used by load_tree. This is the main grammar engine of the program. It delegates to the syntax found in $self->{SYNTAX} (defaults to alloy) and calls the function found in the $SYNTAX hashref. The majority of these syntaxes use methods found in the $DIRECTIVES hashref to parse different DIRECTIVE types for each particular syntax.

A template that looked like the following:

Foo
[%- GET foo -%]
[%- GET bar -%]
Bar

would parse to the following AST:

[
Foo,
[GET, 6, 15, [foo, 0]],
[GET, 22, 31, [bar, 0]],
Bar,
]

The "GET" words represent the directive used. The 6, 15 represent the beginning and ending characters of the directive in the document. The remaining items are the variables necessary for running the particular directive.
parse_expr

Used to parse a variable, an expression, a literal string, or a number. It returns a parsed variable tree. Samples of parsed variables can be found in the VARIABLE PARSE TREE section.

my $str = "1 + 2 * 3";
my $ast = $self->parse_expr($str);
# $ast looks like [[undef, +, 1, [[undef, *, 2, 3], 0]], 0]
parse_args

Allow for the multitudinous ways that TT parses arguments. This allows for positional as well as named arguments. Named arguments can be separated with a "=" or "=>", and positional arguments should be separated by " " or ",". This only returns an array of parsed variables. To get the actual values, you must call play_expr on each value.

dump_parse_tree

This method allows for returning a string of perl code representing the AST of the parsed tree.

It is mainly used for testing.

dump_parse_expr

This method allows for returning a Data::Dumper dump of a parsed variable. It is mainly used for testing.

parse_*

Methods by these names are used by parse_tree to parse the template. These are the grammar. They are used by all of the various template syntaxes Unless otherwise mentioned, these methods are not exposed via the role.

<<less
Download (0.14MB)
Added: 2007-07-14 License: Perl Artistic License Price:
832 downloads
Interactive Decompiler 0.2

Interactive Decompiler 0.2


Interactive Decompiler decompiles by the successive application of low-level refactorings, ultimately leading to high-level code more>>
Interactive Decompiler project is an interactive decompiler, where the user starts with an almost literal translation of Assembly code in C language, which he progressively decompiles by the successive application of low-level refactorings, ultimately leading to high-level C code.
Main features:
- Import Intel IA32 Assembly code, in the AT&T syntax -- the syntax normally generated by the gcc compiler for the Intel IA32 architecture.
- Visualize and export quasi-C language code.
- Provides a context-sensitive refactoring browser to a set of low-level refactorings.
- Visualize and manipulate the Control Flow Graph (CFG) and the Abstract Syntax Tree (AST).
- For developers:
- It has an extensible data type for program representation.
- It has an easily extensible architecture (new program metadata, new processors, new refactorings, or new visualizations can easily be added).
- It has an embedded language for describing refactorings and other transformation.
- It is possible to modify the refactorings while running the program.
Version restrictions:
- The IA32 instruction set is not yet fully supported, namely the floating-point and SIMD instructions are not yet translated.
- Not all refactoring are implemented, and some are only have a partial implementation.
- The data flow analysis performed in the refactorings focus only on register variables.
- The implementation of several of many necessary the refactorings is still missing due to lack of time.
<<less
Download (0.022MB)
Added: 2007-08-09 License: LGPL (GNU Lesser General Public License) Price:
857 downloads
Template::Alloy::Operator 1.006

Template::Alloy::Operator 1.006


Template::Alloy::Operator is a Perl module that provides the regexes necessary for Template::Alloy::Parse to parse operators. more>>
Template::Alloy::Operator is a Perl module that provides the regexes necessary for Template::Alloy::Parse to parse operators and place them in their appropriate precedence.

It also provides the play_operator method which is used by Template::Alloy::Play and Template::Alloy::Compile for playing out the stored operator ASTs.

ROLE METHODS

play_operator

Takes an operator AST in the form of

[undef, +, 1, 2]

Essentially, all operators are stored in RPN notation with a leading "undef" to disabiguate operators in a normal Alloy expression AST.

define_operator

Used for defining new operators.

See Template::Alloy for more details.

<<less
Download (0.14MB)
Added: 2007-07-04 License: Perl Artistic License Price:
842 downloads
High Level Virtual Machine 0.1

High Level Virtual Machine 0.1


High Level Virtual Machine is a toolkit for developing virtual machines for dynamic languages. more>>
High Level Virtual Machine is a toolkit for developing virtual machines for dynamic languages.
The High Level Virtual Machine is:
- Based on LLVM (Low Level Virtual Machine). LLVM is HLVMs sister project. HLVM gains tremendous capability from LLVM in the areas of code generation, bytecode storage, runtime execution, etc.
- Aimed at supporting dynamic languages such as Ruby, Python, Perl, Jython, Haskell, Prolog, etc.
- A complete compiler developers toolkit for creating new languages easily. To write a new compiler, language designers simply write a plugin that describes the language to HLVM and how to translate the grammar productions into HLVMs comprehensive Abstract Syntax Tree (AST). After that, HLVM handles all aspects of code generation, bytecode storage, XML translation, JIT execution or interpretation, and native compilation.
- A language interoperability framework. Because all front end compilers generate code in the same AST, they can interoperate. Use of the runtime library for common constructs (e.g. "string") allow even complex data types to be shared between languages. Users of HLVM can write complex programs in multiple languages and be assured the result can be executed efficiently.
- A code management system including code revisioning, interface versioning, automated recompilation, separation of workspaces, etc.
- Currently under development. Project started April 20th, 2006. Stay tuned to this web site for future developments.
<<less
Download (0.12MB)
Added: 2006-06-15 License: LGPL (GNU Lesser General Public License) Price:
1227 downloads
Cocom 0.995

Cocom 0.995


Cocom can create compilers, cross-compilers, interpreters, and other language processors. more>>
Cocom project is a toolset that is oriented towards the creation of compilers, cross-compilers, interpreters, and other language processors.
It consists of reusable packages (collection and memory management framework), a Sprut internal representation description (AST-to-AST) translator, a Nona code selector description translator (generator generator similiar to BEG, Twig, Burg, and Iburg), an MSTA syntax description translator (yacc-compatible parser with better error reporting), an OKA pipeline hazards description translator, and SHILKA keywords description translator (similiar to gperf but faster).
Enhancements:
- Ammunition.
- Package arithm works with numbers with bases upto 35. New tests.
- Earley parser is able to use rules costs to chose the translation with minimal cost. Some bugs are fixed. New tests.
- MSTA has an additional error recovery with minimal cost. New tests.
- Dino.
- Minor changes in the language (few new operators and special method `destroy).
- New functions.
- New package to work with sockets.
- Many fixed bugs.
- The sped up interpreter (upto 50%).
- Comparison tests with perl, python, tcl, awk.
- Many new tests.
- Improved documentation.
- OKA. The problem of possible incorrect automata generation because of wrong distribution of units to automata and the construction `exclusion has been fixed.
- Cocom and Dino have an additional distribution format `rpm.
<<less
Download (3.0MB)
Added: 2006-11-01 License: LGPL (GNU Lesser General Public License) Price:
1088 downloads
Secleted [ 0 ] software to compare
  • Page: 1 of 1
  • 1