mirror of
				https://github.com/stedolan/jq.git
				synced 2024-05-11 05:55:39 +00:00 
			
		
		
		
	Added library system with -l, -L, and JQ_LIBRARY_PATH
Created util.[ch] to hold common utilities.
This commit is contained in:
		
				
					committed by
					
						
						Nicolas Williams
					
				
			
			
				
	
			
			
			
						parent
						
							01fc8168e9
						
					
				
				
					commit
					38b939688a
				
			
							
								
								
									
										3
									
								
								lexer.l
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								lexer.l
									
									
									
									
									
								
							@@ -42,6 +42,8 @@ struct lexer_param;
 | 
			
		||||
"!=" { return NEQ; }
 | 
			
		||||
"==" { return EQ; }
 | 
			
		||||
"as" { return AS; }
 | 
			
		||||
"search" { return SEARCH; }
 | 
			
		||||
"import" { return IMPORT; }
 | 
			
		||||
"def" { return DEF; }
 | 
			
		||||
"if" { return IF; }
 | 
			
		||||
"then" { return THEN; }
 | 
			
		||||
@@ -114,6 +116,7 @@ struct lexer_param;
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
[a-zA-Z_][a-zA-Z_0-9]*  { yylval->literal = jv_string(yytext); return IDENT;}
 | 
			
		||||
[a-zA-Z_][a-zA-Z_0-9]*::[a-zA-Z_][a-zA-Z_0-9]*  { yylval->literal = jv_string(yytext); return IDENT;}
 | 
			
		||||
\.[a-zA-Z_][a-zA-Z_0-9]*  { yylval->literal = jv_string(yytext+1); return FIELD;}
 | 
			
		||||
 | 
			
		||||
[ \n\t]+  {}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user