nitg: use a portable macro PRINT_ERROR instead of fprintf

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
lib/kernel: intro Numeric::value_of to get a Numeric in the receiver domain

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
lib: add nitunits to Numeric::value_of

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
lib: intro the geometry module

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Signed-off-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
tests: fix nitg-e fixme files with changes to kernel

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

Will be used by QuadTrees, Bentley-Ottman and gammit.

For each geometric concept there is an interface beginning with 'A' and an implementation. Such as the abstract APoint and concrete class Point.

Pull-Request: #442
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Chanoir <chanoir.romain@courrier.uqam.ca>
tests: fix sav for error_annot_c_compiler

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Merge branch 'master' into portable-errors
src: use macro PRINT_ERROR for deferred method error

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
tests: fix savs for nitg-g to reorder output on stderr

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Merge: nitg: use a portable macro PRINT_ERROR instead of fprintf

Outputs to stderr on Linux and to logcat on Android.

The macro is defined both in the C internal to the compiled Nt program and to each FFI files which are separated from the internals.

Pull-Request: #417
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Jean Privat <jean@pryen.org>
parser: move stable content of `parser.nit` into `parser_work.nit

What is still generated is thus more minimal.

Signed-off-by: Jean Privat <jean@pryen.org>
parser: move stable content of `lexer.nit` into `lexer_work.nit

What is still generated is thus even more minimal.

Signed-off-by: Jean Privat <jean@pryen.org>
parser: add `SourceFile::first_token` and `SourceFile::last_token`

This helps to manipulate the token list.

Signed-off-by: Jean Privat <jean@pryen.org>
parser: add some basic tree services in ANode

* `ANode::root` to get the root node
* `ANode::common_parent` to get the smallest common parent of two nodes
* `ANode::depth` to get the distance beween root and self

Signed-off-by: Jean Privat <jean@pryen.org>
parser: `ANode::debug` outputs on stderr instead of stdin

Signed-off-by: Jean Privat <jean@pryen.org>
parser: add `Token::blank_before`

Signed-off-by: Jean Privat <jean@pryen.org>
parser: dot dotdot and dotdotdot are not operators

Signed-off-by: Jean Privat <jean@pryen.org>
src: new module astutil.nit

Signed-off-by: Jean Privat <jean@pryen.org>
tests: update highlight and cie because `.` is no more an operator

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