File indexing completed on 2024-04-21 04:36:12
0001 // This file is generated by generate-get-utf8-tubles.rb 0002 // WARNING! All changes made in this file will be lost! 0003 0004 template<template<CharEncoding> class CharSet> 0005 NFA<CharSet<Latin1> > getUtf8Tuples(typename Codec2Int<Latin1>::Result from0, typename Codec2Int<Latin1>::Result to0) 0006 { 0007 return NFA<CharSet<Latin1> >(CharSet<Latin1>::range(from0, to0)); 0008 } 0009 template<template<CharEncoding> class CharSet> 0010 NFA<CharSet<Latin1> > getUtf8Tuples(typename Codec2Int<Latin1>::Result from0, typename Codec2Int<Latin1>::Result to0 0011 , typename Codec2Int<Latin1>::Result from1, typename Codec2Int<Latin1>::Result to1) 0012 { 0013 typedef typename Codec2Int<Latin1>::Result Int; 0014 if(from0 == to0) 0015 { 0016 auto tuples = NFA<CharSet<Latin1> >(CharSet<Latin1>(from0)); 0017 tuples <<= getUtf8Tuples<CharSet>(from1, to1 0018 ); 0019 return tuples; 0020 } 0021 else 0022 { 0023 NFA<CharSet<Latin1> > tuples; 0024 auto firstTuples = NFA<CharSet<Latin1> >(CharSet<Latin1>(from0)); 0025 firstTuples <<= getUtf8Tuples<CharSet>(from1, Int(0x80 + (1<<6)) 0026 ); 0027 tuples |= firstTuples; 0028 auto midTuples = NFA<CharSet<Latin1> >(CharSet<Latin1>::range(from0 + 1, to0)); 0029 midTuples <<= getUtf8Tuples<CharSet>(Int(0x80), Int(0x80 + (1<<6)) 0030 ); 0031 tuples |= midTuples; 0032 auto lastTuples = NFA<CharSet<Latin1> >(CharSet<Latin1>(to0)); 0033 lastTuples <<= getUtf8Tuples<CharSet>(Int(0x80), to1 0034 ); 0035 tuples |= lastTuples; 0036 return tuples; 0037 } 0038 } 0039 template<template<CharEncoding> class CharSet> 0040 NFA<CharSet<Latin1> > getUtf8Tuples(typename Codec2Int<Latin1>::Result from0, typename Codec2Int<Latin1>::Result to0 0041 , typename Codec2Int<Latin1>::Result from1, typename Codec2Int<Latin1>::Result to1, typename Codec2Int<Latin1>::Result from2, typename Codec2Int<Latin1>::Result to2) 0042 { 0043 typedef typename Codec2Int<Latin1>::Result Int; 0044 if(from0 == to0) 0045 { 0046 auto tuples = NFA<CharSet<Latin1> >(CharSet<Latin1>(from0)); 0047 tuples <<= getUtf8Tuples<CharSet>(from1, to1 0048 , from2, to2 ); 0049 return tuples; 0050 } 0051 else 0052 { 0053 NFA<CharSet<Latin1> > tuples; 0054 auto firstTuples = NFA<CharSet<Latin1> >(CharSet<Latin1>(from0)); 0055 firstTuples <<= getUtf8Tuples<CharSet>(from1, Int(0x80 + (1<<6)) 0056 , from2, to2 ); 0057 tuples |= firstTuples; 0058 auto midTuples = NFA<CharSet<Latin1> >(CharSet<Latin1>::range(from0 + 1, to0)); 0059 midTuples <<= getUtf8Tuples<CharSet>(Int(0x80), Int(0x80 + (1<<6)) 0060 , from2, to2 ); 0061 tuples |= midTuples; 0062 auto lastTuples = NFA<CharSet<Latin1> >(CharSet<Latin1>(to0)); 0063 lastTuples <<= getUtf8Tuples<CharSet>(Int(0x80), to1 0064 , from2, to2 ); 0065 tuples |= lastTuples; 0066 return tuples; 0067 } 0068 } 0069 template<template<CharEncoding> class CharSet> 0070 NFA<CharSet<Latin1> > getUtf8Tuples(typename Codec2Int<Latin1>::Result from0, typename Codec2Int<Latin1>::Result to0 0071 , typename Codec2Int<Latin1>::Result from1, typename Codec2Int<Latin1>::Result to1, typename Codec2Int<Latin1>::Result from2, typename Codec2Int<Latin1>::Result to2, typename Codec2Int<Latin1>::Result from3, typename Codec2Int<Latin1>::Result to3) 0072 { 0073 typedef typename Codec2Int<Latin1>::Result Int; 0074 if(from0 == to0) 0075 { 0076 auto tuples = NFA<CharSet<Latin1> >(CharSet<Latin1>(from0)); 0077 tuples <<= getUtf8Tuples<CharSet>(from1, to1 0078 , from2, to2, from3, to3 ); 0079 return tuples; 0080 } 0081 else 0082 { 0083 NFA<CharSet<Latin1> > tuples; 0084 auto firstTuples = NFA<CharSet<Latin1> >(CharSet<Latin1>(from0)); 0085 firstTuples <<= getUtf8Tuples<CharSet>(from1, Int(0x80 + (1<<6)) 0086 , from2, to2, from3, to3 ); 0087 tuples |= firstTuples; 0088 auto midTuples = NFA<CharSet<Latin1> >(CharSet<Latin1>::range(from0 + 1, to0)); 0089 midTuples <<= getUtf8Tuples<CharSet>(Int(0x80), Int(0x80 + (1<<6)) 0090 , from2, to2, from3, to3 ); 0091 tuples |= midTuples; 0092 auto lastTuples = NFA<CharSet<Latin1> >(CharSet<Latin1>(to0)); 0093 lastTuples <<= getUtf8Tuples<CharSet>(Int(0x80), to1 0094 , from2, to2, from3, to3 ); 0095 tuples |= lastTuples; 0096 return tuples; 0097 } 0098 }