about summary refs log tree commit diff
path: root/src/libexpr/lexer.l
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-09-04T21·06+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-09-04T21·06+0000
commit75068e7d753cf6cbe45a4bf294000dca9bd41d8b (patch)
treec6274cc10caab08349b5585206034f41ca4a575f /src/libexpr/lexer.l
parentaab88127321344d5818d823bff515d127108d058 (diff)
* Use a proper namespace.
* Optimise header file usage a bit.
* Compile the parser as C++.

Diffstat (limited to 'src/libexpr/lexer.l')
-rw-r--r--src/libexpr/lexer.l8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libexpr/lexer.l b/src/libexpr/lexer.l
index fb19e16b45..bbf872ff6e 100644
--- a/src/libexpr/lexer.l
+++ b/src/libexpr/lexer.l
@@ -9,7 +9,7 @@
 %{
 #include <string.h>
 #include <aterm2.h>
-#include "parser-tab.h"
+#include "parser-tab.hh"
 
 static void initLoc(YYLTYPE * loc)
 {
@@ -35,7 +35,11 @@ static void adjustLoc(YYLTYPE * loc, const char * s, size_t len)
     }
 }
 
-ATerm toATerm(const char * s);
+ATerm toATerm(const char * s)
+{
+    return (ATerm) ATmakeAppl0(ATmakeAFun((char *) s, 0, ATtrue));
+}
+
 ATerm unescapeStr(const char * s);
 
 #define YY_USER_INIT initLoc(yylloc)