diff --git a/src/internal.h b/src/internal.h
index 23e0b7cd0b3a8bdab8799294d9b0b7ba5bd5ef67..7eaee5f8532ec9be3868ddf30aa91fc47d3c6acf 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -505,7 +505,9 @@ struct HParserVtable_ {
   bool (*compile_to_rvm)(HRVMProg *prog, void* env); // FIXME: forgot what the bool return value was supposed to mean.
   void (*desugar)(HAllocator *mm__, HCFStack *stk__, void *env);
 #ifdef HAMMER_LLVM_BACKEND
-  bool (*llvm)(HLLVMParserCompileContext *ctxt, HParser *p, LLVMValueRef *result);
+  bool (*llvm)(HLLVMParserCompileContext *ctxt,
+               const HParser *p,
+               LLVMValueRef *result);
 #endif
   bool higher; // false if primitive
 };
diff --git a/src/parsers/bits.c b/src/parsers/bits.c
index 6fe71e798f59dd613cf7f4909d034a39049d947c..ae01a7f1c31b18f2f9e11a20ea99998ed7539e15 100644
--- a/src/parsers/bits.c
+++ b/src/parsers/bits.c
@@ -27,7 +27,7 @@ static HParseResult* parse_bits(void* env, HParseState *state) {
 #ifdef HAMMER_LLVM_BACKEND
 
 static bool bits_llvm(HLLVMParserCompileContext *ctxt,
-                      HParser *p,
+                      const HParser *p,
                       LLVMValueRef *res) {
   /* Emit LLVM IR to parse ((struct bits_env *)(p->env))->length bits */
 
diff --git a/src/parsers/ch.c b/src/parsers/ch.c
index 0ae2b713b883f725e435a53a695329a418c90a82..858887d272bdb91f9e0b3ef8eaf70021b7d73361 100644
--- a/src/parsers/ch.c
+++ b/src/parsers/ch.c
@@ -51,7 +51,7 @@ static bool ch_ctrvm(HRVMProg *prog, void* env) {
 #ifdef HAMMER_LLVM_BACKEND
 
 static bool ch_llvm(HLLVMParserCompileContext *ctxt,
-                    HParser *p,
+                    const HParser *p,
                     LLVMValueRef *res) {
   /* Build a new LLVM function to parse a character */
 
diff --git a/src/parsers/charset.c b/src/parsers/charset.c
index 49dd5601d92549711db6197594c6327bc6476ed2..1333c3a40c7f36df3ecb2307d2e8e2c1ce101fab 100644
--- a/src/parsers/charset.c
+++ b/src/parsers/charset.c
@@ -80,7 +80,7 @@ static bool cs_ctrvm(HRVMProg *prog, void *env) {
 #ifdef HAMMER_LLVM_BACKEND
 
 static bool cs_llvm(HLLVMParserCompileContext *ctxt,
-                    HParser *p,
+                    const HParser *p,
                     LLVMValueRef *res) {
   /*
    * LLVM to build a function to parse a charset; the args are a stream and an
diff --git a/src/parsers/end.c b/src/parsers/end.c
index e8e1896fda2f728e9dc3208b326b4e9539276836..f2f655e0d0b02694fed2348bdcc99deecb082eea 100644
--- a/src/parsers/end.c
+++ b/src/parsers/end.c
@@ -29,7 +29,7 @@ static bool end_ctrvm(HRVMProg *prog, void *env) {
 #ifdef HAMMER_LLVM_BACKEND
 
 static bool end_llvm(HLLVMParserCompileContext *ctxt, 
-                     HParser *p,
+                     const HParser *p,
                      LLVMValueRef *res) {
   /* Allocator */
   HAllocator *mm__ = NULL;
diff --git a/src/parsers/epsilon.c b/src/parsers/epsilon.c
index 26d97cc5965ffb36bbb8bcc682862c1258195749..537b1c6657dc2fc0943a1e0e869a4557201ace0a 100644
--- a/src/parsers/epsilon.c
+++ b/src/parsers/epsilon.c
@@ -22,7 +22,7 @@ static bool epsilon_ctrvm(HRVMProg *prog, void* env) {
 #ifdef HAMMER_LLVM_BACKEND
 
 static bool epsilon_llvm(HLLVMParserCompileContext *ctxt,
-                         HParser *p,
+                         const HParser *p,
                          LLVMValueRef *res) {
   /* Allocator */
   HAllocator *mm__ = NULL;
diff --git a/src/parsers/nothing.c b/src/parsers/nothing.c
index fa5faf557d28335053f9b2bc7c5053ab134d5bd7..3ec425dfa278e23be0dd310c4e3add91140783fe 100644
--- a/src/parsers/nothing.c
+++ b/src/parsers/nothing.c
@@ -28,7 +28,7 @@ static bool nothing_ctrvm(HRVMProg *prog, void* env) {
 #ifdef HAMMER_LLVM_BACKEND
 
 static bool nothing_llvm(HLLVMParserCompileContext *ctxt,
-                         HParser *p,
+                         const HParser *p,
                          LLVMValueRef *res) {
   /* Allocator */
   HAllocator *mm__;
diff --git a/src/parsers/token.c b/src/parsers/token.c
index 66012540b1cf9a336c95d412bebfd5c90ec43f91..3c2c6a88d64b7b1200e339dad39b98254b2f147a 100644
--- a/src/parsers/token.c
+++ b/src/parsers/token.c
@@ -82,8 +82,8 @@ static bool token_ctrvm(HRVMProg *prog, void *env) {
 
 static bool token_llvm_with_global(
     HLLVMParserCompileContext *ctxt,
-    HParser *p,
-    HToken *t,
+    const HParser *p,
+    const HToken *t,
     LLVMValueRef *res) {
   /* Allocator*/
   HAllocator *mm__ = NULL;
@@ -400,8 +400,8 @@ static bool token_llvm_with_global(
 
 static bool token_llvm_with_sequential_comparisons(
     HLLVMParserCompileContext *ctxt,
-    HParser *p,
-    HToken *t,
+    const HParser *p,
+    const HToken *t,
     LLVMValueRef *res) {
   /* Allocator */
   HAllocator *mm__;
@@ -567,9 +567,9 @@ static bool token_llvm_with_sequential_comparisons(
 #define TOKEN_LENGTH_USE_GLOBAL_CUTOFF 4
 
 static bool token_llvm(HLLVMParserCompileContext *ctxt,
-                       HParser *p,
+                       const HParser *p,
                        LLVMValueRef *res) {
-  HToken *t;
+  const HToken *t;
 
   if (!res) return false;
   if (!p) return false;