Set Ragel.rl char type to unsigned, #135

This commit is contained in:
Konstantinos Margaritis 2023-03-21 18:07:06 +00:00
parent 0f967b9575
commit dbdbfe9473
6 changed files with 6 additions and 2 deletions

View File

@ -7,7 +7,7 @@ function(ragelmaker src_rl)
add_custom_command( add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${src_dir}/${src_file}.cpp OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${src_dir}/${src_file}.cpp
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${src_dir} COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${src_dir}
COMMAND ${RAGEL} ${CMAKE_CURRENT_SOURCE_DIR}/${src_rl} -o ${rl_out} COMMAND ${RAGEL} ${CMAKE_CURRENT_SOURCE_DIR}/${src_rl} -o ${rl_out -G0}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${src_rl} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${src_rl}
) )
add_custom_target(ragel_${src_file} DEPENDS ${rl_out}) add_custom_target(ragel_${src_file} DEPENDS ${rl_out})

View File

@ -43,7 +43,7 @@
#define HS_MAJOR 5 #define HS_MAJOR 5
#define HS_MINOR 4 #define HS_MINOR 4
#define HS_PATCH 0 #define HS_PATCH 9
#include "hs_compile.h" #include "hs_compile.h"
#include "hs_runtime.h" #include "hs_runtime.h"

View File

@ -272,6 +272,7 @@ unichar readUtf8CodePoint4c(const char *s) {
%%{ %%{
machine regex; machine regex;
alphtype unsigned char;
action throwUnsupportedEscape { action throwUnsupportedEscape {
ostringstream str; ostringstream str;

View File

@ -54,6 +54,7 @@ const char *read_control_verbs(const char *ptr, const char *end, size_t start,
%%{ %%{
machine ControlVerbs; machine ControlVerbs;
alphtype unsigned char;
# Verbs that we recognise but do not support. # Verbs that we recognise but do not support.
unhandledVerbs = '(*' ( unhandledVerbs = '(*' (

View File

@ -57,6 +57,7 @@ char unhex(const char *start, UNUSED const char *end) {
%%{ %%{
machine FileCorporaParser; machine FileCorporaParser;
alphtype unsigned char;
action accumulateNum { action accumulateNum {
num = (num * 10) + (fc - '0'); num = (num * 10) + (fc - '0');

View File

@ -55,6 +55,7 @@ enum ParamKey {
%%{ %%{
machine ExpressionParser; machine ExpressionParser;
alphtype unsigned char;
action accumulateNum { action accumulateNum {
num = (num * 10) + (fc - '0'); num = (num * 10) + (fc - '0');