From a34b206ed64f0a42e29fe72d10b1d64f512e3375 Mon Sep 17 00:00:00 2001 From: Felix Raimundo Date: Thu, 14 Apr 2016 12:04:02 +0200 Subject: [PATCH] Reduce the size of the flex buffer. Change-Id: If7822053a23949ce4cf0d35b7d1b3f5aec7585eb --- poincare/src/expression_lexer.l | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/poincare/src/expression_lexer.l b/poincare/src/expression_lexer.l index 26a2dffdc..7c9f8b10b 100644 --- a/poincare/src/expression_lexer.l +++ b/poincare/src/expression_lexer.l @@ -34,6 +34,15 @@ class Expression; * We don't want that feature : we don't even have printf ! */ #define ECHO +/* This defines the size of the flex buffer size. + * By default this buffer is of 16k, but we don't have the luxury to use so much + * memory on a microcontroller. + * The choice of 256 Bytes is the size of the input buffer given to flex in the + * current implementation (the app takes a maximum of 256). + */ +#undef YY_BUF_SIZE +#define YY_BUF_SIZE 256 + #define fprintf(...) ((void)0) #define exit(...) abort()