mirror of
				https://github.com/Z3Prover/z3
				synced 2025-10-31 11:42:28 +00:00 
			
		
		
		
	outline of unicode parsing #4333
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
		
							parent
							
								
									937afbf95b
								
							
						
					
					
						commit
						1ab2ad07be
					
				
					 1 changed files with 34 additions and 0 deletions
				
			
		|  | @ -81,6 +81,40 @@ static bool is_escape_char(char const *& s, unsigned& result) { | |||
|         s += 4; | ||||
|         return true; | ||||
|     } | ||||
| 
 | ||||
| #if 0 | ||||
|     /* unicode */ | ||||
|     if (*(s+1) == 'u' && *(s+2) == '{') { | ||||
|         result = 0; | ||||
|         for (unsigned i = 0; i < 5; ++i) { | ||||
|             if (is_hex_digit(*(s+3+i), d1)) { | ||||
|                 result = 64*result + d1; | ||||
|             } | ||||
|             else if (*(s+3+i) == '}') { | ||||
|                 s += 4 + i; | ||||
|                 return true; | ||||
|             } | ||||
|             else { | ||||
|                 break; | ||||
|             } | ||||
|         } | ||||
|         return false; | ||||
|     } | ||||
|     if (*(s+1) == 'u' && is_hex_digit(*(s+2), d1)) { | ||||
|         result = d1; | ||||
|         unsigned i = 0; | ||||
|         for (; i < 4; ++i) { | ||||
|             if (is_hex_digit(*(s+3+i), d1)) { | ||||
|                 result = 64*result + d1; | ||||
|             } | ||||
|             else { | ||||
|                 break; | ||||
|             } | ||||
|         } | ||||
|         s += 3 + i; | ||||
|         return true; | ||||
|     } | ||||
| #endif | ||||
|     switch (*(s + 1)) { | ||||
|     case 'a': | ||||
|         result = '\a'; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue