From f6bdc2611e5766c86f2299263b5c46428ce67428 Mon Sep 17 00:00:00 2001 From: Ruben Dashyan Date: Tue, 2 Oct 2018 17:51:56 +0200 Subject: [PATCH] [poincare] Add a comment about the parser's nature --- poincare/src/parsing/parser.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/poincare/src/parsing/parser.h b/poincare/src/parsing/parser.h index c4c27087a..f232bfb47 100644 --- a/poincare/src/parsing/parser.h +++ b/poincare/src/parsing/parser.h @@ -1,6 +1,12 @@ #ifndef POINCARE_PARSING_PARSER_H #define POINCARE_PARSING_PARSER_H +/* A precedence-climbing parser is implemented hereafter. + * It is a trade-off between + * a readable but less efficient recursive-descent parser + * and + * an efficient but less readable shunting-yard parser. */ + #include "tokenizer.h" #include @@ -15,8 +21,6 @@ #include #include #include -// matrix ? with brackets -// braces ? namespace Poincare {