Ignore Windows-style EOL character in metadata

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Show line numbers in CTF parser errors

Suggested-by: Etienne Bergeron <etienne.bergeron@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Remove unused lineno from struct ctf_scanner

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Show token in CTF parser error

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Add missing NULL pointer check

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: memleak on error path

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: handle errors gracefully

- Return errors in io struct generator rather than using assertions,
- check for NULL concatenate string return values,
- fix memleak on ctf_trace_declaration_visit error path.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Add line number to parser nodes

Signed-off-by: Etienne Bergeron <etienneb@google.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Implement macros for error printout

Signed-off-by: Etienne Bergeron <etienneb@google.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Print error on invalid token

Includes an optimisation for ignored token parsing.

Signed-off-by: Etienne Bergeron <etienneb@google.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Use new print macros in ctf-parser.y

Signed-off-by: Etienne Bergeron <etienneb@google.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix unary constant use after error

Signed-off-by: Etienne Bergeron <etienneb@google.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Implement likely/unlikely ifdefs

- don't redefine likely/unlikely on compilers already defining them,
- don't use builtins on compilers not supporting them.

Signed-off-by: Etienne Bergeron <etienneb@google.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: add semantic check in grammar

Signed-off-by: Etienne Bergeron <etienneb@google.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Introduce macro to enforce matching enum to string for node types

Signed-off-by: Etienne Bergeron <etienneb@google.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Add error node to AST

Signed-off-by: Etienne Bergeron <etienneb@google.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Support escape characters in metadata strings

Signed-off-by: Etienne Bergeron <etienneb@google.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Implement perror printf

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Handle integers in lexer rather than grammar

Signed-off-by: Etienne Bergeron <etienneb@google.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: trace_collection_add() add after check

Fix segmentation fault by adding trace into trace collection only after
check for time correlation has succeeded.

Reported-by: Etienne Bergeron <etienneb@google.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>