Don't use ed to generate the Basic token list.
This commit is contained in:
		
							parent
							
								
									0eae0d5d71
								
							
						
					
					
						commit
						f15075f9a4
					
				
					 2 changed files with 5 additions and 17 deletions
				
			
		|  | @ -9,12 +9,11 @@ normalrule { | |||
| 	name = "tokentab_h", | ||||
| 	ins = { | ||||
| 		"./maketokentab", | ||||
| 		"util/cmisc+ed", | ||||
| 		matching(filenamesof("+llgen"), "/Lpars.h$"), | ||||
| 	}, | ||||
| 	outleaves = { "tokentab.h" }, | ||||
| 	commands = { | ||||
| 		"%{ins} %{outs}" | ||||
| 		"%{ins[1]} < %{ins[2]} > %{outs}" | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,17 +1,6 @@ | |||
| #!/bin/sh | ||||
| 
 | ||||
| $1 -s "${2:-Lpars.h}" > $3 <<'+' | ||||
| 1d | ||||
| 1,$s/# *define // | ||||
| 1,$s/ ...$// | ||||
| 1,$s/^/	"/ | ||||
| 1,$-1s/$/",/ | ||||
| $s/$/"/ | ||||
| 0a | ||||
| char *tokentab[] = { | ||||
| . | ||||
| $a | ||||
| }; | ||||
| . | ||||
| 1,$p | ||||
| + | ||||
| echo "char* tokentab[] = {" | ||||
| awk '/^#define/ { print "\"" $2 "\"," }' | ||||
| echo "};" | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue