nit.git
12 years agoAdd .metadata/ to git ignore list
Alexandre Terrasa [Thu, 19 Apr 2012 18:23:23 +0000 (14:23 -0400)]
Add .metadata/ to git ignore list

Signed-off-by: Alexandre Terrasa <alexandre@moz-concept.com>

12 years agomodel: new metamodel
Jean Privat [Thu, 12 Apr 2012 15:45:48 +0000 (11:45 -0400)]
model: new metamodel

This commit introduces a new metamodel.
I expect it is simpler than the current one.

A new modelbuilder and typing is also provided.
As a proof of concept two tools are included: nit and nitstats

nit is a basic naive and inefficient interpreter.
nitstats is a tool to collect and gather some statistics.

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoversion: v0.5.1-git
Jean Privat [Tue, 17 Apr 2012 20:50:05 +0000 (16:50 -0400)]
version: v0.5.1-git

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoversion: v0.5 v0.5
Jean Privat [Tue, 17 Apr 2012 20:47:18 +0000 (16:47 -0400)]
version: v0.5

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoMerge branch 'alexandre/nitdoc-quicksearch'
Jean Privat [Tue, 17 Apr 2012 17:00:24 +0000 (13:00 -0400)]
Merge branch 'alexandre/nitdoc-quicksearch'

Conflicts:
tests/sav/nitdoc_args1.sav

12 years agonitdoc: Add quick search results preview.
Alexandre Terrasa [Tue, 17 Apr 2012 16:17:37 +0000 (12:17 -0400)]
nitdoc: Add quick search results preview.

Signed-off-by: Alexandre Terrasa <alexandre@moz-concept.com>

12 years agoprepare changelog for v0.5
Jean Privat [Tue, 17 Apr 2012 16:12:39 +0000 (12:12 -0400)]
prepare changelog for v0.5

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoadd ccache and dot to README
Jean Privat [Tue, 17 Apr 2012 16:12:05 +0000 (12:12 -0400)]
add ccache and dot to README

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoc_src: update
Jean Privat [Tue, 17 Apr 2012 14:12:16 +0000 (10:12 -0400)]
c_src: update

12 years agotools: better handling of native interfaces in mkcsrc
Jean Privat [Tue, 17 Apr 2012 15:13:27 +0000 (11:13 -0400)]
tools: better handling of native interfaces in mkcsrc

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoMerge branch 'wip2'
Jean Privat [Mon, 16 Apr 2012 20:26:03 +0000 (16:26 -0400)]
Merge branch 'wip2'

Conflicts:
tests/nitdoc.args

12 years agolib: fix mismatch between keys and values formal types
Jean Privat [Thu, 12 Apr 2012 14:29:53 +0000 (10:29 -0400)]
lib: fix mismatch between keys and values formal types

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agotests: use /dev/null as stdin if no inputs
Jean Privat [Thu, 12 Apr 2012 09:50:32 +0000 (05:50 -0400)]
tests: use /dev/null as stdin if no inputs

Some tests will hangs if they do a read without any .inputs file.

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agotests: compare all error output with the expected result
Jean Privat [Tue, 10 Apr 2012 18:29:06 +0000 (14:29 -0400)]
tests: compare all error output with the expected result

This is a simple approximation to use tests with an interpreter

$ NITC=../src/nit ./tests.sh *.nit

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agotests: [soso] to filter out warnings and errors
Jean Privat [Tue, 10 Apr 2012 18:18:04 +0000 (14:18 -0400)]
tests: [soso] to filter out warnings and errors

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agotests: add some base tests
Jean Privat [Tue, 10 Apr 2012 20:50:07 +0000 (16:50 -0400)]
tests: add some base tests

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agotest: test_attr_easy warns that the isa are useless.
Jean Privat [Mon, 16 Apr 2012 14:12:17 +0000 (10:12 -0400)]
test: test_attr_easy warns that the isa are useless.

The warnings are great since they prove that the typing is working.

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agotests: simplify nitdoc test
Jean Privat [Mon, 16 Apr 2012 13:54:52 +0000 (09:54 -0400)]
tests: simplify nitdoc test

People not not understand how to fix nitdoc test when they change lib/*
Therefore, just test nitdoc with module_1.

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoMerge remote branch 'alexis/wip'
Jean Privat [Mon, 16 Apr 2012 13:19:10 +0000 (09:19 -0400)]
Merge remote branch 'alexis/wip'

Conflicts:
c_src/exec._nitni.h
c_src/file._nitni.h
c_src/math._nitni.h
c_src/stream._nitni.h
c_src/string._nitni.h
c_src/time._nitni.h

12 years agolib: adds String::to_f
Alexis Laferrière [Wed, 14 Mar 2012 15:07:12 +0000 (11:07 -0400)]
lib: adds String::to_f

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agommbuilder: detect type of some attributes
Alexis Laferrière [Tue, 6 Mar 2012 03:11:24 +0000 (22:11 -0500)]
mmbuilder: detect type of some attributes

Allows to automaticaly determine the static type of some attributes assigned
where introduced. Works for literal Int, Char, Bool and String, as well as
"new" and boolean expressions.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agolib: intro module to generate md5 hash from a string
Alexis Laferrière [Thu, 16 Jun 2011 19:34:08 +0000 (15:34 -0400)]
lib: intro module to generate md5 hash from a string

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agolib: intro module to manage C signals
Alexis Laferrière [Fri, 30 Mar 2012 19:44:51 +0000 (15:44 -0400)]
lib: intro module to manage C signals

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agolib: adds function to list files within a directory
Alexis Laferrière [Fri, 24 Feb 2012 16:47:28 +0000 (11:47 -0500)]
lib: adds function to list files within a directory

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agolib: adds poll function to stream module
Alexis Laferrière [Thu, 1 Mar 2012 19:11:39 +0000 (14:11 -0500)]
lib: adds poll function to stream module

Call this function with a list of FDStreams. Will wait for writing on
FDIStream and reading and FDOStream. It can do both and also check for
hang ups.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agolib: updates module stream to new attributes styles
Alexis Laferrière [Thu, 1 Mar 2012 05:20:55 +0000 (00:20 -0500)]
lib: updates module stream to new attributes styles

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agolib: updates module exec to new attributes style
Alexis Laferrière [Thu, 1 Mar 2012 05:20:01 +0000 (00:20 -0500)]
lib: updates module exec to new attributes style

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agoc_src: updates for latest fixes
Alexis Laferrière [Fri, 2 Mar 2012 21:49:20 +0000 (16:49 -0500)]
c_src: updates for latest fixes

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agoexample: adds a basic extern method example
Alexis Laferrière [Sat, 25 Feb 2012 17:41:05 +0000 (12:41 -0500)]
example: adds a basic extern method example

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agotests: adds test for separate_options module
Alexis Laferrière [Sat, 18 Feb 2012 23:54:09 +0000 (18:54 -0500)]
tests: adds test for separate_options module

Testing simple and multiple lines.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agoseparate_options: allows .args files with multiple lines
Alexis Laferrière [Sat, 18 Feb 2012 23:30:18 +0000 (18:30 -0500)]
separate_options: allows .args files with multiple lines

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agoni: supports virtypes used in signatures of methods called from C
Alexis Laferrière [Wed, 29 Feb 2012 12:29:29 +0000 (07:29 -0500)]
ni: supports virtypes used in signatures of methods called from C

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agoni: fix duplication of null getters genereated in frontier
Alexis Laferrière [Fri, 24 Feb 2012 14:52:27 +0000 (09:52 -0500)]
ni: fix duplication of null getters genereated in frontier

This could happened when the same null was used in two different hybrid
modules.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agogccx: fix for linking with C libs for native interface
Alexis Laferrière [Sat, 18 Feb 2012 23:22:35 +0000 (18:22 -0500)]
gccx: fix for linking with C libs for native interface

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agonitc: allows other modules to append to native interface options
Alexis Laferrière [Sat, 18 Feb 2012 23:27:58 +0000 (18:27 -0500)]
nitc: allows other modules to append to native interface options

By appending options from the command line instead of replacing
the existing array, tihs allows any modules to append to the same list.

This is a clean fix for problems with separate_options.nit

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agotests: adds global reference tests
Alexis Laferrière [Fri, 2 Mar 2012 16:09:55 +0000 (11:09 -0500)]
tests: adds global reference tests

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agoni: adds global references to Nit objects from C code
Alexis Laferrière [Thu, 1 Mar 2012 23:29:06 +0000 (18:29 -0500)]
ni: adds global references to Nit objects from C code

Allows to preserve a reference during program execution. It is valid
no matter the extern method invoked.

Uses a global list to preserve all references explicitly asked to be
kept in the program. The user must call Object_incr_ref( Object obj )
to increment the reference count of obj. If it's reference count was
at 0, then it will be added to the global list.

The same Nit object may be present multiple times in the global list.
Only reference incrementation on the same C structure represernting
the object will increment the same counter.

This algorithm allows for fast increment, no matter how many global
references are already registered.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agotests: generate files in out/ instead of tests/
Jean Privat [Tue, 10 Apr 2012 17:46:44 +0000 (13:46 -0400)]
tests: generate files in out/ instead of tests/

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agotests: do not fail test_attr
Jean Privat [Tue, 10 Apr 2012 16:05:37 +0000 (12:05 -0400)]
tests: do not fail test_attr

_i and _j are not initialized.
but the current compiler do not check that Sys is correctly built.

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agosyntax: implements __debug__ type construct
Jean Privat [Tue, 10 Apr 2012 16:18:47 +0000 (12:18 -0400)]
syntax: implements __debug__ type construct

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoparser: add __debug__ type construct
Jean Privat [Tue, 10 Apr 2012 16:03:06 +0000 (12:03 -0400)]
parser: add __debug__ type construct

The __debug__ syntax could be extended to force dialog with the compiler.

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoparser: add ANode::debug
Jean Privat [Thu, 22 Mar 2012 13:51:16 +0000 (09:51 -0400)]
parser: add ANode::debug

This method simplify debugging.
The programmer can use debug instead of print to print traces and values.

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoparser: simplify constroctors of nodes
Jean Privat [Thu, 22 Mar 2012 13:47:31 +0000 (09:47 -0400)]
parser: simplify constroctors of nodes

in parser_nodes, ANode has an empty constructor inherited by all subclasses

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agolib: add 'module' keyword to environ
Jean Privat [Tue, 10 Apr 2012 15:51:01 +0000 (11:51 -0400)]
lib: add 'module' keyword to environ

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoclean: make some classes abstract or interfaces
Jean Privat [Sun, 18 Mar 2012 01:42:04 +0000 (21:42 -0400)]
clean: make some classes abstract or interfaces

Some even have 'abstract' in their names.

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoparser: new class ASendReassignFormExpr
Jean Privat [Fri, 16 Mar 2012 19:00:18 +0000 (15:00 -0400)]
parser: new class ASendReassignFormExpr

This class specializes ASendExpr and AReassignFormExpr
and generalize ACallReassignExpr and ABraReassignExpr

In fact, specializing ASendExpr is not ideal but removing this link
will require more factorization.

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoparser: generalize n_propdefs to AClassdef
Jean Privat [Tue, 6 Mar 2012 19:34:23 +0000 (14:34 -0500)]
parser: generalize n_propdefs to AClassdef

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoextract new module toolcontext from mmloader
Jean Privat [Mon, 5 Mar 2012 23:30:01 +0000 (18:30 -0500)]
extract new module toolcontext from mmloader

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agonitc: move line coloration to Location
Jean Privat [Mon, 5 Mar 2012 22:49:48 +0000 (17:49 -0500)]
nitc: move line coloration to Location

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoadd src/doc in gitignore
Jean Privat [Thu, 1 Mar 2012 18:20:03 +0000 (13:20 -0500)]
add src/doc in gitignore

This will remove pollution in git tools when trying nitdoc in src.

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agotests: adds local reference tests
Alexis Laferrière [Fri, 2 Mar 2012 16:15:13 +0000 (11:15 -0500)]
tests: adds local reference tests

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agoni: adds system to manage native local references to Nit objects
Alexis Laferrière [Fri, 30 Mar 2012 19:55:36 +0000 (15:55 -0400)]
ni: adds system to manage native local references to Nit objects

This ensures that references to Nit objects from C within an extern
method are preserved when the GC is invoqued. Theses references
are registered automatically when any callback to the Nit system is
made. They are registered in a stack, local to the currently executing
extern method (ie the one on the top of the execution stack). All
registered references are cleared on the function return.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agolib: adds a method to force invocation of garbage collector
Alexis Laferrière [Tue, 6 Mar 2012 03:22:53 +0000 (22:22 -0500)]
lib: adds a method to force invocation of garbage collector

The method Sys::force_garbage_collection is implemented internally.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agoc_src: fix last update, _nitni.h s were referring to _nit.h from Nit src
Alexis Laferrière [Fri, 24 Feb 2012 18:53:47 +0000 (13:53 -0500)]
c_src: fix last update, _nitni.h s were referring to _nit.h from Nit src

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agoicode: do not visit non-existant instanciation iroutines of extern classes
Alexis Laferrière [Mon, 27 Feb 2012 17:21:51 +0000 (12:21 -0500)]
icode: do not visit non-existant instanciation iroutines of extern classes

Fixes global compilation of programs using extern constructors.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agoni: fix allowing to rename parameters for redef as extern method
Alexis Laferrière [Fri, 24 Feb 2012 14:50:54 +0000 (09:50 -0500)]
ni: fix allowing to rename parameters for redef as extern method

Is actually used by nits to generated expected names. Will but more
useful with inline interface.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agoMerge branch 'fix-ni' into wip
Jean Privat [Mon, 27 Feb 2012 21:23:56 +0000 (16:23 -0500)]
Merge branch 'fix-ni' into wip

12 years agoni: fix allowing to rename parameters for redef as extern method
Alexis Laferrière [Fri, 24 Feb 2012 14:50:54 +0000 (09:50 -0500)]
ni: fix allowing to rename parameters for redef as extern method

Is actually used by nits to generated expected names. Will but more
useful with inline interface.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agotools: protect ccache detection to avoid pollution on stderr
Jean Privat [Mon, 27 Feb 2012 21:00:45 +0000 (16:00 -0500)]
tools: protect ccache detection to avoid pollution on stderr

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agolib: remove NativeFileCapable
Jean Privat [Thu, 23 Feb 2012 17:50:45 +0000 (12:50 -0500)]
lib: remove NativeFileCapable

Methods are moved as constructors in the NativeFile extern class.

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoicode: do not visit non-existant instanciation iroutines of extern classes
Alexis Laferrière [Mon, 27 Feb 2012 17:21:51 +0000 (12:21 -0500)]
icode: do not visit non-existant instanciation iroutines of extern classes

Fixes global compilation of programs using extern constructors.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agotests: update nits.sav because of the merge
Jean Privat [Mon, 27 Feb 2012 20:09:21 +0000 (15:09 -0500)]
tests: update nits.sav because of the merge

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoMerge branch 'global' into wip
Jean Privat [Mon, 27 Feb 2012 21:17:06 +0000 (16:17 -0500)]
Merge branch 'global' into wip

12 years agotests: update Makefile to test nits
Jean Privat [Mon, 27 Feb 2012 21:15:29 +0000 (16:15 -0500)]
tests: update Makefile to test nits

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoMerge branch 'warn' into wip
Jean Privat [Mon, 27 Feb 2012 18:55:52 +0000 (13:55 -0500)]
Merge branch 'warn' into wip

12 years agoc_src: fix last update, _nitni.h s were referring to _nit.h from Nit src
Alexis Laferrière [Fri, 24 Feb 2012 18:53:47 +0000 (13:53 -0500)]
c_src: fix last update, _nitni.h s were referring to _nit.h from Nit src

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agoRTA: inits are polymorphic
Jean Privat [Mon, 27 Feb 2012 17:45:22 +0000 (12:45 -0500)]
RTA: inits are polymorphic

Code assumed that call of an init are always monomorphic.
This is not true since a constrictor can call another constructor in a
polymorphic way.

The solution is to simply manage call to init the same way than other calls.

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agosyntax: warn for superfluous parentheses in signatures
Jean Privat [Mon, 27 Feb 2012 15:48:14 +0000 (10:48 -0500)]
syntax: warn for superfluous parentheses in signatures

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoparser: include obra and cbra in signatures
Jean Privat [Mon, 27 Feb 2012 15:24:35 +0000 (10:24 -0500)]
parser: include obra and cbra in signatures

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agonitc: activate warnings by default
Jean Privat [Fri, 24 Feb 2012 21:40:32 +0000 (16:40 -0500)]
nitc: activate warnings by default

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agotyping: error on foo() when foo is a variable
Jean Privat [Fri, 24 Feb 2012 19:26:11 +0000 (14:26 -0500)]
typing: error on foo() when foo is a variable

With the last parser modification we can now distinguish between
no arguments and empty parentheses.

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agolib: remove obsolete sdl and game library
Jean Privat [Thu, 23 Feb 2012 17:55:22 +0000 (12:55 -0500)]
lib: remove obsolete sdl and game library

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agotests: change test_parser arguments to be more stable
Jean Privat [Fri, 24 Feb 2012 19:15:30 +0000 (14:15 -0500)]
tests: change test_parser arguments to be more stable

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agosrc: remove detected warnings about ()
Jean Privat [Fri, 24 Feb 2012 19:03:57 +0000 (14:03 -0500)]
src: remove detected warnings about ()

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoni: minor code correction in ni_metamodel.nit
Alexis Laferrière [Thu, 3 Nov 2011 02:56:55 +0000 (22:56 -0400)]
ni: minor code correction in ni_metamodel.nit

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agoni: use special mangled name in ni generated code to support extern classes
Alexis Laferrière [Tue, 14 Feb 2012 01:06:19 +0000 (20:06 -0500)]
ni: use special mangled name in ni generated code to support extern classes

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

12 years agosyntax: warn on superfluous empty parentheses on calls
Jean Privat [Fri, 24 Feb 2012 16:55:45 +0000 (11:55 -0500)]
syntax: warn on superfluous empty parentheses on calls

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoparser: include obra, cbra, opar and cpar in arguments
Jean Privat [Fri, 24 Feb 2012 16:49:17 +0000 (11:49 -0500)]
parser: include obra, cbra, opar and cpar in arguments

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoparser: include obra and cbra in range nodes
Jean Privat [Fri, 24 Feb 2012 16:02:59 +0000 (11:02 -0500)]
parser: include obra and cbra in range nodes

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agolib&src: remove detected warnings
Jean Privat [Fri, 24 Feb 2012 15:45:52 +0000 (10:45 -0500)]
lib&src: remove detected warnings

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agonitc: do not crash on --output-format icode
Jean Privat [Thu, 23 Feb 2012 17:26:30 +0000 (12:26 -0500)]
nitc: do not crash on --output-format icode

However, --output-format icode is not really useful
in a multi-module program.

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoglobal: move options from nitc.nit to global.nit
Jean Privat [Thu, 23 Feb 2012 16:34:00 +0000 (11:34 -0500)]
global: move options from nitc.nit to global.nit

Most of the global optimization concern should be in global.

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agotyping: some warning cleanup
Jean Privat [Fri, 24 Feb 2012 10:18:03 +0000 (05:18 -0500)]
typing: some warning cleanup

12 years agotools: kill showerr
Jean Privat [Fri, 24 Feb 2012 10:17:50 +0000 (05:17 -0500)]
tools: kill showerr

Now coloring is done entirely in nitc.

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agotyping: warn for superfluous parentheses
Jean Privat [Fri, 24 Feb 2012 10:16:03 +0000 (05:16 -0500)]
typing: warn for superfluous parentheses

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoparser: include parentheses in parexpr and as_*expr
Jean Privat [Fri, 24 Feb 2012 10:15:15 +0000 (05:15 -0500)]
parser: include parentheses in parexpr and as_*expr

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agotyping: proxyexpr delegate more services
Jean Privat [Fri, 24 Feb 2012 10:13:28 +0000 (05:13 -0500)]
typing: proxyexpr delegate more services

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoglobal: create a new module global to gather (and nest) global analysis
Jean Privat [Thu, 23 Feb 2012 15:26:08 +0000 (10:26 -0500)]
global: create a new module global to gather (and nest) global analysis

analysis now only contains local required analysis.

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agotools: clean Makefiles
Jean Privat [Fri, 17 Feb 2012 22:08:02 +0000 (17:08 -0500)]
tools: clean Makefiles

* create a Makefile in src
* rule 'docs' makes all the doc (including pdf)
* refresh 'clean' and 'distclean'

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agonitc: use simplify_path to manipulate sane filenames
Jean Privat [Fri, 17 Feb 2012 21:11:40 +0000 (16:11 -0500)]
nitc: use simplify_path to manipulate sane filenames

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agolit: add join_path
Jean Privat [Fri, 17 Feb 2012 21:06:15 +0000 (16:06 -0500)]
lit: add join_path

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agolib: handle ../.. in the simplify_path method
Jean Privat [Fri, 17 Feb 2012 21:05:55 +0000 (16:05 -0500)]
lib: handle ../.. in the simplify_path method

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoparser: detect bad string and char literals
Jean Privat [Fri, 17 Feb 2012 17:19:40 +0000 (12:19 -0500)]
parser: detect bad string and char literals

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoparser: allow comments without eol (for eof)
Jean Privat [Fri, 17 Feb 2012 16:50:16 +0000 (11:50 -0500)]
parser: allow comments without eol (for eof)

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agotools: handle end of file errors
Jean Privat [Fri, 17 Feb 2012 19:12:11 +0000 (14:12 -0500)]
tools: handle end of file errors

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoparser: improve Token.to_s and syntax error messages
Jean Privat [Fri, 17 Feb 2012 19:09:40 +0000 (14:09 -0500)]
parser: improve Token.to_s and syntax error messages

So we say
   unexpected keyword 'end'
instead of
   unexpected token

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoparser: integrate the token 'end' in the AST
Jean Privat [Fri, 17 Feb 2012 18:52:37 +0000 (13:52 -0500)]
parser: integrate the token 'end' in the AST

This provide better location since the 'end' is not ignored.
Other tool that use the AST may like to have it.

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoparser: add a hot location for closure definitions
Jean Privat [Fri, 17 Feb 2012 15:44:08 +0000 (10:44 -0500)]
parser: add a hot location for closure definitions

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoassert: use id.text.to_s instead of id.to_s for runtime error
Jean Privat [Fri, 17 Feb 2012 15:34:25 +0000 (10:34 -0500)]
assert: use id.text.to_s instead of id.to_s for runtime error

This prepare for better human readable Token.to_s

Signed-off-by: Jean Privat <jean@pryen.org>

12 years agoc_src: update
Jean Privat [Thu, 16 Feb 2012 18:33:48 +0000 (13:33 -0500)]
c_src: update

Signed-off-by: Jean Privat <jean@pryen.org>