Compare commits

...

2 Commits

Author SHA1 Message Date
hyung-hwan e8b613576f removed all byte-code related code
continuous-integration/drone/push Build is passing
2026-04-15 01:58:44 +09:00
hyung-hwan 62ff4ecabb attempt to lower function calls - call_fun & call_expr added. but stuck in handling argument reference 2026-04-15 01:45:47 +09:00
12 changed files with 227 additions and 2948 deletions
+57 -58
View File
@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: hawk 1.0.0\n" "Project-Id-Version: hawk 1.0.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-10 23:03+0900\n" "POT-Creation-Date: 2026-04-15 01:55+0900\n"
"PO-Revision-Date: 2026-03-28 16:29+0800\n" "PO-Revision-Date: 2026-03-28 16:29+0800\n"
"Last-Translator: <author@hawk>\n" "Last-Translator: <author@hawk>\n"
"Language-Team: Korean <translation-team-ko@hawk>\n" "Language-Team: Korean <translation-team-ko@hawk>\n"
@@ -22,231 +22,227 @@ msgid "enable concatenation by blanks"
msgstr "공백에 의한 연결을 활성화" msgstr "공백에 의한 연결을 활성화"
#: ../../bin/hawk.c:377 #: ../../bin/hawk.c:377
msgid "enable byte-code building"
msgstr "바이트코드 생성을 활성화"
#: ../../bin/hawk.c:378
msgid "use CRLF for a newline" msgid "use CRLF for a newline"
msgstr "줄바꿈에 CRLF를 사용" msgstr "줄바꿈에 CRLF를 사용"
#: ../../bin/hawk.c:379 #: ../../bin/hawk.c:378
msgid "defer resolving module symbols(mod::symbol) to runtime" msgid "defer resolving module symbols(mod::symbol) to runtime"
msgstr "모듈 심볼(mod::symbol) 해석을 실행 시간으로 연기" msgstr "모듈 심볼(mod::symbol) 해석을 실행 시간으로 연기"
#: ../../bin/hawk.c:380 #: ../../bin/hawk.c:379
msgid "allow a map to be assigned or returned" msgid "allow a map to be assigned or returned"
msgstr "맵의 대입 또는 반환을 허용" msgstr "맵의 대입 또는 반환을 허용"
#: ../../bin/hawk.c:381 #: ../../bin/hawk.c:380
msgid "allow undeclared variables" msgid "allow undeclared variables"
msgstr "지역 변수가 너무 많음" msgstr "지역 변수가 너무 많음"
#: ../../bin/hawk.c:382 #: ../../bin/hawk.c:381
msgid "allow raw multiline string and regular expression literals" msgid "allow raw multiline string and regular expression literals"
msgstr "문자열 또는 정규식이 닫히지 않음" msgstr "문자열 또는 정규식이 닫히지 않음"
#: ../../bin/hawk.c:383 #: ../../bin/hawk.c:382
msgid "perform numeric comparsion on numeric strings" msgid "perform numeric comparsion on numeric strings"
msgstr "숫자 문자열에 대해 숫자 비교를 수행" msgstr "숫자 문자열에 대해 숫자 비교를 수행"
#: ../../bin/hawk.c:384 #: ../../bin/hawk.c:383
msgid "enable a newline to terminate a statement" msgid "enable a newline to terminate a statement"
msgstr "줄바꿈으로 문장을 끝낼 수 있게 함" msgstr "줄바꿈으로 문장을 끝낼 수 있게 함"
#: ../../bin/hawk.c:385 #: ../../bin/hawk.c:384
msgid "enable nextofile & OFILENAME" msgid "enable nextofile & OFILENAME"
msgstr "nextofile 및 OFILENAME을 활성화" msgstr "nextofile 및 OFILENAME을 활성화"
#: ../../bin/hawk.c:386 #: ../../bin/hawk.c:385
msgid "detect a numeric string and convert it to a number" msgid "detect a numeric string and convert it to a number"
msgstr "숫자형의 문자열을 감지하여 숫자로 변환" msgstr "숫자형의 문자열을 감지하여 숫자로 변환"
#: ../../bin/hawk.c:387 #: ../../bin/hawk.c:386
msgid "enable pattern-action loop" msgid "enable pattern-action loop"
msgstr "패턴-동작 루프를 활성화" msgstr "패턴-동작 루프를 활성화"
#: ../../bin/hawk.c:388 #: ../../bin/hawk.c:387
msgid "enable pedantic mode" msgid "enable pedantic mode"
msgstr "엄격 모드를 활성화" msgstr "엄격 모드를 활성화"
#: ../../bin/hawk.c:389 #: ../../bin/hawk.c:388
msgid "set CLOEXEC before executing an external program for piping" msgid "set CLOEXEC before executing an external program for piping"
msgstr "파이프용 외부 프로그램 실행 전에 CLOEXEC를 설정" msgstr "파이프용 외부 프로그램 실행 전에 CLOEXEC를 설정"
#: ../../bin/hawk.c:390 #: ../../bin/hawk.c:389
msgid "enable {n,m} in a regular expression" msgid "enable {n,m} in a regular expression"
msgstr "정규식 일치에서 {n,m}을 표현을 활성화" msgstr "정규식 일치에서 {n,m}을 표현을 활성화"
#: ../../bin/hawk.c:391 #: ../../bin/hawk.c:390
msgid "enable builtin I/O including getline & print" msgid "enable builtin I/O including getline & print"
msgstr "getline 및 print를 포함한 내장 I/O를 활성화" msgstr "getline 및 print를 포함한 내장 I/O를 활성화"
#: ../../bin/hawk.c:392 #: ../../bin/hawk.c:391
msgid "allow a dual-directional pipe" msgid "allow a dual-directional pipe"
msgstr "양방향 파이프를 허용" msgstr "양방향 파이프를 허용"
#: ../../bin/hawk.c:393 #: ../../bin/hawk.c:392
msgid "enable the strict naming rule" msgid "enable the strict naming rule"
msgstr "엄격한 이름 규칙을 활성화" msgstr "엄격한 이름 규칙을 활성화"
#: ../../bin/hawk.c:394 #: ../../bin/hawk.c:393
msgid "strip spaces in splitting a record" msgid "strip spaces in splitting a record"
msgstr "레코드 분리 시 공백을 제거" msgstr "레코드 분리 시 공백을 제거"
#: ../../bin/hawk.c:395 #: ../../bin/hawk.c:394
msgid "strip spaces in string-to-number conversion" msgid "strip spaces in string-to-number conversion"
msgstr "문자열을 숫자로 변환할 때 공백을 제거" msgstr "문자열을 숫자로 변환할 때 공백을 제거"
#: ../../bin/hawk.c:396 #: ../../bin/hawk.c:395
msgid "make more fault-tolerant" msgid "make more fault-tolerant"
msgstr "오류 허용성을 높임" msgstr "오류 허용성을 높임"
#: ../../bin/hawk.c:397 #: ../../bin/hawk.c:396
msgid "enable the extended call syntax" msgid "enable the extended call syntax"
msgstr "확장 호출 문법을 활성화" msgstr "확장 호출 문법을 활성화"
#: ../../bin/hawk.c:408 ../../bin/main.c:410 #: ../../bin/hawk.c:407 ../../bin/main.c:410
msgid "USAGE" msgid "USAGE"
msgstr "사용법" msgstr "사용법"
#: ../../bin/hawk.c:408 #: ../../bin/hawk.c:407
msgid "[options] -f sourcefile [ -- ] [datafile]*" msgid "[options] -f sourcefile [ -- ] [datafile]*"
msgstr "[옵션] -f 소스파일 [ -- ] [자료파일]*" msgstr "[옵션] -f 소스파일 [ -- ] [자료파일]*"
#: ../../bin/hawk.c:409 #: ../../bin/hawk.c:408
msgid " " msgid " "
msgstr " " msgstr " "
#: ../../bin/hawk.c:409 #: ../../bin/hawk.c:408
msgid "[options] [ -- ] sourcestring [datafile]*" msgid "[options] [ -- ] sourcestring [datafile]*"
msgstr "[옵션] [ -- ] 소스문자열 [자료파일]*" msgstr "[옵션] [ -- ] 소스문자열 [자료파일]*"
#: ../../bin/hawk.c:410 ../../bin/main.c:411 #: ../../bin/hawk.c:409 ../../bin/main.c:411
msgid "Options as follows:" msgid "Options as follows:"
msgstr "옵션은 다음과 같습니다:" msgstr "옵션은 다음과 같습니다:"
#: ../../bin/hawk.c:411 #: ../../bin/hawk.c:410
msgid " -h/--help print this message" msgid " -h/--help print this message"
msgstr " -h/--help 이 메시지를 출력" msgstr " -h/--help 이 메시지를 출력"
#: ../../bin/hawk.c:412 #: ../../bin/hawk.c:411
msgid " -D show extra information" msgid " -D show extra information"
msgstr " -D 추가 정보를 표시" msgstr " -D 추가 정보를 표시"
#: ../../bin/hawk.c:413 #: ../../bin/hawk.c:412
msgid " -c/--call name call a function instead of entering" msgid " -c/--call name call a function instead of entering"
msgstr " -c/--call 이름 패턴-동작 루프 대신 함수를 호출" msgstr " -c/--call 이름 패턴-동작 루프 대신 함수를 호출"
#: ../../bin/hawk.c:414 #: ../../bin/hawk.c:413
msgid "" msgid ""
" the pattern-action loop. [datafile]* is" " the pattern-action loop. [datafile]* is"
msgstr " [자료파일]* 을 함수 인자로 전달" msgstr " [자료파일]* 을 함수 인자로 전달"
#: ../../bin/hawk.c:415 #: ../../bin/hawk.c:414
msgid " passed to the function as parameters" msgid " passed to the function as parameters"
msgstr " 합니다." msgstr " 합니다."
#: ../../bin/hawk.c:416 #: ../../bin/hawk.c:415
msgid " -f/--file file set the source script file" msgid " -f/--file file set the source script file"
msgstr " -f/--file 파일 소스 스크립트 파일을 지정" msgstr " -f/--file 파일 소스 스크립트 파일을 지정"
#: ../../bin/hawk.c:417 #: ../../bin/hawk.c:416
msgid "" msgid ""
" -d/--deparsed-file file set the deparsed script file to produce" " -d/--deparsed-file file set the deparsed script file to produce"
msgstr "" msgstr ""
" -d/--deparsed-file 파일 디파싱한 스크립트를 저장할 파일을 지정" " -d/--deparsed-file 파일 디파싱한 스크립트를 저장할 파일을 지정"
#: ../../bin/hawk.c:418 #: ../../bin/hawk.c:417
msgid " -t/--console-output file set the console output file" msgid " -t/--console-output file set the console output file"
msgstr " -t/--console-output 파일 콘솔 출력 파일을 지정" msgstr " -t/--console-output 파일 콘솔 출력 파일을 지정"
#: ../../bin/hawk.c:419 #: ../../bin/hawk.c:418
msgid " multiple -t options are allowed" msgid " multiple -t options are allowed"
msgstr " -t 옵션은 여러 번 지정할 수 있음" msgstr " -t 옵션은 여러 번 지정할 수 있음"
#: ../../bin/hawk.c:420 #: ../../bin/hawk.c:419
msgid " -F/--field-separator string set a field separator(FS)" msgid " -F/--field-separator string set a field separator(FS)"
msgstr " -F/--field-separator 문자열 필드 구분자(FS)를 지정" msgstr " -F/--field-separator 문자열 필드 구분자(FS)를 지정"
#: ../../bin/hawk.c:421 #: ../../bin/hawk.c:420
msgid " -v/--assign var=value add a global variable with a value" msgid " -v/--assign var=value add a global variable with a value"
msgstr " -v/--assign 변수=값 값을 가진 전역 변수를 추가" msgstr " -v/--assign 변수=값 값을 가진 전역 변수를 추가"
#: ../../bin/hawk.c:422 #: ../../bin/hawk.c:421
msgid " -m/--memory-limit number limit the memory usage (bytes)" msgid " -m/--memory-limit number limit the memory usage (bytes)"
msgstr " -m/--memory-limit 숫자 메모리 사용량을 제한(바이트)" msgstr " -m/--memory-limit 숫자 메모리 사용량을 제한(바이트)"
#: ../../bin/hawk.c:423 #: ../../bin/hawk.c:422
msgid " -w expand datafile wildcards" msgid " -w expand datafile wildcards"
msgstr " -w 자료 파일 와일드카드를 확장" msgstr " -w 자료 파일 와일드카드를 확장"
#: ../../bin/hawk.c:426 #: ../../bin/hawk.c:425
msgid " --script-encoding string specify script file encoding name" msgid " --script-encoding string specify script file encoding name"
msgstr " --script-encoding 문자열 스크립트 파일 인코딩 이름을 지정" msgstr " --script-encoding 문자열 스크립트 파일 인코딩 이름을 지정"
#: ../../bin/hawk.c:427 #: ../../bin/hawk.c:426
#, fuzzy #, fuzzy
msgid " --conin-encoding string specify console input encoding name" msgid " --conin-encoding string specify console input encoding name"
msgstr " --console-encoding 문자열 콘솔 인코딩 이름을 지정" msgstr " --console-encoding 문자열 콘솔 인코딩 이름을 지정"
#: ../../bin/hawk.c:428 #: ../../bin/hawk.c:427
#, fuzzy #, fuzzy
msgid " --conout-encoding string specify console output encoding name" msgid " --conout-encoding string specify console output encoding name"
msgstr " --console-encoding 문자열 콘솔 인코딩 이름을 지정" msgstr " --console-encoding 문자열 콘솔 인코딩 이름을 지정"
#: ../../bin/hawk.c:431 #: ../../bin/hawk.c:430
msgid "" msgid ""
" -I/--includedirs string specify directories to look for include " " -I/--includedirs string specify directories to look for include "
"files in" "files in"
msgstr " -I/--includedirs 문자열 include 파일을 찾을 디렉토리를 지정" msgstr " -I/--includedirs 문자열 include 파일을 찾을 디렉토리를 지정"
#: ../../bin/hawk.c:432 #: ../../bin/hawk.c:431
msgid "" msgid ""
" --modlibdirs string specify directories to look for module " " --modlibdirs string specify directories to look for module "
"files in" "files in"
msgstr " --modlibdirs 문자열 모듈 파일을 찾을 디렉토리를 지정" msgstr " --modlibdirs 문자열 모듈 파일을 찾을 디렉토리를 지정"
#: ../../bin/hawk.c:433 #: ../../bin/hawk.c:432
msgid " --modern run in the modern mode(default)" msgid " --modern run in the modern mode(default)"
msgstr " --modern 현대화 모드로 실행(기본값)" msgstr " --modern 현대화 모드로 실행(기본값)"
#: ../../bin/hawk.c:434 #: ../../bin/hawk.c:433
msgid " --classic run in the classic mode" msgid " --classic run in the classic mode"
msgstr " --classic 고전 모드로 실행" msgstr " --classic 고전 모드로 실행"
#: ../../bin/hawk.c:444 #: ../../bin/hawk.c:443
msgid "Special mode switching options(must be specified first to take effect):" msgid "Special mode switching options(must be specified first to take effect):"
msgstr "모드 전환 옵션(처음에 지정해야 적용됨):" msgstr "모드 전환 옵션(처음에 지정해야 적용됨):"
#: ../../bin/hawk.c:445 ../../bin/main.c:414 #: ../../bin/hawk.c:444 ../../bin/main.c:414
msgid " --awk/--hawk switch to the awk mode(default)" msgid " --awk/--hawk switch to the awk mode(default)"
msgstr " --awk/--hawk awk 모드로 전환(기본값)" msgstr " --awk/--hawk awk 모드로 전환(기본값)"
#: ../../bin/hawk.c:446 ../../bin/main.c:415 #: ../../bin/hawk.c:445 ../../bin/main.c:415
msgid " --cut switch to the cut mode" msgid " --cut switch to the cut mode"
msgstr " --cut cut 모드로 전환" msgstr " --cut cut 모드로 전환"
#: ../../bin/hawk.c:447 ../../bin/main.c:416 #: ../../bin/hawk.c:446 ../../bin/main.c:416
msgid " --sed switch to the sed mode" msgid " --sed switch to the sed mode"
msgstr " --sed sed 모드로 전환" msgstr " --sed sed 모드로 전환"
#: ../../bin/hawk.c:806 ../../bin/hawk.c:823 #: ../../bin/hawk.c:804 ../../bin/hawk.c:821
msgid "ERROR" msgid "ERROR"
msgstr "오류" msgstr "오류"
#: ../../bin/hawk.c:807 ../../bin/hawk.c:824 #: ../../bin/hawk.c:805 ../../bin/hawk.c:822
msgid "Line" msgid "Line"
msgstr "줄" msgstr "줄"
#: ../../bin/hawk.c:808 ../../bin/hawk.c:825 #: ../../bin/hawk.c:806 ../../bin/hawk.c:823
msgid "Column" msgid "Column"
msgstr "열" msgstr "열"
#: ../../bin/hawk.c:809 ../../bin/hawk.c:826 #: ../../bin/hawk.c:807 ../../bin/hawk.c:824
msgid "Code" msgid "Code"
msgstr "코드" msgstr "코드"
#: ../../bin/hawk.c:810 ../../bin/hawk.c:827 #: ../../bin/hawk.c:808 ../../bin/hawk.c:825
msgid "File " msgid "File "
msgstr "파일 " msgstr "파일 "
@@ -974,6 +970,9 @@ msgstr "선택자가 유효하지 않음"
msgid "unknown error" msgid "unknown error"
msgstr "알 수 없는 오류" msgstr "알 수 없는 오류"
#~ msgid "enable byte-code building"
#~ msgstr "바이트코드 생성을 활성화"
#, fuzzy #, fuzzy
#~ msgid "" #~ msgid ""
#~ " --conin-encoding string specify console output encoding name" #~ " --conin-encoding string specify console output encoding name"
+57 -58
View File
@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: hawk 1.0.0\n" "Project-Id-Version: hawk 1.0.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-10 23:03+0900\n" "POT-Creation-Date: 2026-04-15 01:55+0900\n"
"PO-Revision-Date: 2026-03-28 17:00+0800\n" "PO-Revision-Date: 2026-03-28 17:00+0800\n"
"Last-Translator: <author@hawk>\n" "Last-Translator: <author@hawk>\n"
"Language-Team: Chinese (Simplified) <translation-team-zh_CN@hawk>\n" "Language-Team: Chinese (Simplified) <translation-team-zh_CN@hawk>\n"
@@ -22,230 +22,226 @@ msgid "enable concatenation by blanks"
msgstr "启用空白拼接" msgstr "启用空白拼接"
#: ../../bin/hawk.c:377 #: ../../bin/hawk.c:377
msgid "enable byte-code building"
msgstr "启用字节码构建"
#: ../../bin/hawk.c:378
msgid "use CRLF for a newline" msgid "use CRLF for a newline"
msgstr "换行使用 CRLF" msgstr "换行使用 CRLF"
#: ../../bin/hawk.c:379 #: ../../bin/hawk.c:378
msgid "defer resolving module symbols(mod::symbol) to runtime" msgid "defer resolving module symbols(mod::symbol) to runtime"
msgstr "将模块符号(mod::symbol)解析延迟到运行时" msgstr "将模块符号(mod::symbol)解析延迟到运行时"
#: ../../bin/hawk.c:380 #: ../../bin/hawk.c:379
msgid "allow a map to be assigned or returned" msgid "allow a map to be assigned or returned"
msgstr "允许对映射进行赋值或返回" msgstr "允许对映射进行赋值或返回"
#: ../../bin/hawk.c:381 #: ../../bin/hawk.c:380
msgid "allow undeclared variables" msgid "allow undeclared variables"
msgstr "局部变量过多" msgstr "局部变量过多"
#: ../../bin/hawk.c:382 #: ../../bin/hawk.c:381
msgid "allow raw multiline string and regular expression literals" msgid "allow raw multiline string and regular expression literals"
msgstr "字符串或正则表达式未结束" msgstr "字符串或正则表达式未结束"
#: ../../bin/hawk.c:383 #: ../../bin/hawk.c:382
msgid "perform numeric comparsion on numeric strings" msgid "perform numeric comparsion on numeric strings"
msgstr "对数字字符串执行数值比较" msgstr "对数字字符串执行数值比较"
#: ../../bin/hawk.c:384 #: ../../bin/hawk.c:383
msgid "enable a newline to terminate a statement" msgid "enable a newline to terminate a statement"
msgstr "启用以换行结束语句" msgstr "启用以换行结束语句"
#: ../../bin/hawk.c:385 #: ../../bin/hawk.c:384
msgid "enable nextofile & OFILENAME" msgid "enable nextofile & OFILENAME"
msgstr "启用 nextofile 和 OFILENAME" msgstr "启用 nextofile 和 OFILENAME"
#: ../../bin/hawk.c:386 #: ../../bin/hawk.c:385
msgid "detect a numeric string and convert it to a number" msgid "detect a numeric string and convert it to a number"
msgstr "检测数字字符串并将其转换为数字" msgstr "检测数字字符串并将其转换为数字"
#: ../../bin/hawk.c:387 #: ../../bin/hawk.c:386
msgid "enable pattern-action loop" msgid "enable pattern-action loop"
msgstr "启用模式-动作循环" msgstr "启用模式-动作循环"
#: ../../bin/hawk.c:388 #: ../../bin/hawk.c:387
msgid "enable pedantic mode" msgid "enable pedantic mode"
msgstr "启用严格模式" msgstr "启用严格模式"
#: ../../bin/hawk.c:389 #: ../../bin/hawk.c:388
msgid "set CLOEXEC before executing an external program for piping" msgid "set CLOEXEC before executing an external program for piping"
msgstr "在执行用于管道的外部程序前设置 CLOEXEC" msgstr "在执行用于管道的外部程序前设置 CLOEXEC"
#: ../../bin/hawk.c:390 #: ../../bin/hawk.c:389
msgid "enable {n,m} in a regular expression" msgid "enable {n,m} in a regular expression"
msgstr "在正则表达式中启用 {n,m}" msgstr "在正则表达式中启用 {n,m}"
#: ../../bin/hawk.c:391 #: ../../bin/hawk.c:390
msgid "enable builtin I/O including getline & print" msgid "enable builtin I/O including getline & print"
msgstr "启用内建 I/O,包括 getline 和 print" msgstr "启用内建 I/O,包括 getline 和 print"
#: ../../bin/hawk.c:392 #: ../../bin/hawk.c:391
msgid "allow a dual-directional pipe" msgid "allow a dual-directional pipe"
msgstr "允许双向管道" msgstr "允许双向管道"
#: ../../bin/hawk.c:393 #: ../../bin/hawk.c:392
msgid "enable the strict naming rule" msgid "enable the strict naming rule"
msgstr "启用严格命名规则" msgstr "启用严格命名规则"
#: ../../bin/hawk.c:394 #: ../../bin/hawk.c:393
msgid "strip spaces in splitting a record" msgid "strip spaces in splitting a record"
msgstr "在分割记录时去除空格" msgstr "在分割记录时去除空格"
#: ../../bin/hawk.c:395 #: ../../bin/hawk.c:394
msgid "strip spaces in string-to-number conversion" msgid "strip spaces in string-to-number conversion"
msgstr "在字符串转数字时去除空格" msgstr "在字符串转数字时去除空格"
#: ../../bin/hawk.c:396 #: ../../bin/hawk.c:395
msgid "make more fault-tolerant" msgid "make more fault-tolerant"
msgstr "提高容错性" msgstr "提高容错性"
#: ../../bin/hawk.c:397 #: ../../bin/hawk.c:396
msgid "enable the extended call syntax" msgid "enable the extended call syntax"
msgstr "启用扩展调用语法" msgstr "启用扩展调用语法"
#: ../../bin/hawk.c:408 ../../bin/main.c:410 #: ../../bin/hawk.c:407 ../../bin/main.c:410
msgid "USAGE" msgid "USAGE"
msgstr "用法" msgstr "用法"
#: ../../bin/hawk.c:408 #: ../../bin/hawk.c:407
msgid "[options] -f sourcefile [ -- ] [datafile]*" msgid "[options] -f sourcefile [ -- ] [datafile]*"
msgstr "[选项] -f 源文件 [ -- ] [数据文件]*" msgstr "[选项] -f 源文件 [ -- ] [数据文件]*"
#: ../../bin/hawk.c:409 #: ../../bin/hawk.c:408
msgid " " msgid " "
msgstr " " msgstr " "
#: ../../bin/hawk.c:409 #: ../../bin/hawk.c:408
msgid "[options] [ -- ] sourcestring [datafile]*" msgid "[options] [ -- ] sourcestring [datafile]*"
msgstr "[选项] [ -- ] 源字符串 [数据文件]*" msgstr "[选项] [ -- ] 源字符串 [数据文件]*"
#: ../../bin/hawk.c:410 ../../bin/main.c:411 #: ../../bin/hawk.c:409 ../../bin/main.c:411
msgid "Options as follows:" msgid "Options as follows:"
msgstr "选项如下:" msgstr "选项如下:"
#: ../../bin/hawk.c:411 #: ../../bin/hawk.c:410
msgid " -h/--help print this message" msgid " -h/--help print this message"
msgstr " -h/--help 打印此信息" msgstr " -h/--help 打印此信息"
#: ../../bin/hawk.c:412 #: ../../bin/hawk.c:411
msgid " -D show extra information" msgid " -D show extra information"
msgstr " -D 显示更多信息" msgstr " -D 显示更多信息"
#: ../../bin/hawk.c:413 #: ../../bin/hawk.c:412
msgid " -c/--call name call a function instead of entering" msgid " -c/--call name call a function instead of entering"
msgstr " -c/--call 名称 调用函数而不是进入模式-动作循环" msgstr " -c/--call 名称 调用函数而不是进入模式-动作循环"
#: ../../bin/hawk.c:414 #: ../../bin/hawk.c:413
msgid "" msgid ""
" the pattern-action loop. [datafile]* is" " the pattern-action loop. [datafile]* is"
msgstr " 模式-动作循环。[数据文件]*" msgstr " 模式-动作循环。[数据文件]*"
#: ../../bin/hawk.c:415 #: ../../bin/hawk.c:414
msgid " passed to the function as parameters" msgid " passed to the function as parameters"
msgstr " 将作为参数传递给函数" msgstr " 将作为参数传递给函数"
#: ../../bin/hawk.c:416 #: ../../bin/hawk.c:415
msgid " -f/--file file set the source script file" msgid " -f/--file file set the source script file"
msgstr " -f/--file 文件 设置脚本源文件" msgstr " -f/--file 文件 设置脚本源文件"
#: ../../bin/hawk.c:417 #: ../../bin/hawk.c:416
msgid "" msgid ""
" -d/--deparsed-file file set the deparsed script file to produce" " -d/--deparsed-file file set the deparsed script file to produce"
msgstr " -d/--deparsed-file 文件 指定反解析脚本输出文件" msgstr " -d/--deparsed-file 文件 指定反解析脚本输出文件"
#: ../../bin/hawk.c:418 #: ../../bin/hawk.c:417
msgid " -t/--console-output file set the console output file" msgid " -t/--console-output file set the console output file"
msgstr " -t/--console-output 文件 设置控制台输出文件" msgstr " -t/--console-output 文件 设置控制台输出文件"
#: ../../bin/hawk.c:419 #: ../../bin/hawk.c:418
msgid " multiple -t options are allowed" msgid " multiple -t options are allowed"
msgstr " 可以指定多个 -t 选项" msgstr " 可以指定多个 -t 选项"
#: ../../bin/hawk.c:420 #: ../../bin/hawk.c:419
msgid " -F/--field-separator string set a field separator(FS)" msgid " -F/--field-separator string set a field separator(FS)"
msgstr " -F/--field-separator 字符串 设置字段分隔符(FS)" msgstr " -F/--field-separator 字符串 设置字段分隔符(FS)"
#: ../../bin/hawk.c:421 #: ../../bin/hawk.c:420
msgid " -v/--assign var=value add a global variable with a value" msgid " -v/--assign var=value add a global variable with a value"
msgstr " -v/--assign 变量=值 添加具有值的全局变量" msgstr " -v/--assign 变量=值 添加具有值的全局变量"
#: ../../bin/hawk.c:422 #: ../../bin/hawk.c:421
msgid " -m/--memory-limit number limit the memory usage (bytes)" msgid " -m/--memory-limit number limit the memory usage (bytes)"
msgstr " -m/--memory-limit 数值 限制内存用量(字节)" msgstr " -m/--memory-limit 数值 限制内存用量(字节)"
#: ../../bin/hawk.c:423 #: ../../bin/hawk.c:422
msgid " -w expand datafile wildcards" msgid " -w expand datafile wildcards"
msgstr " -w 扩展数据文件通配符" msgstr " -w 扩展数据文件通配符"
#: ../../bin/hawk.c:426 #: ../../bin/hawk.c:425
msgid " --script-encoding string specify script file encoding name" msgid " --script-encoding string specify script file encoding name"
msgstr " --script-encoding 字符串 指定脚本文件编码名" msgstr " --script-encoding 字符串 指定脚本文件编码名"
#: ../../bin/hawk.c:427 #: ../../bin/hawk.c:426
#, fuzzy #, fuzzy
msgid " --conin-encoding string specify console input encoding name" msgid " --conin-encoding string specify console input encoding name"
msgstr " --console-encoding 字符串 指定控制台编码名" msgstr " --console-encoding 字符串 指定控制台编码名"
#: ../../bin/hawk.c:428 #: ../../bin/hawk.c:427
#, fuzzy #, fuzzy
msgid " --conout-encoding string specify console output encoding name" msgid " --conout-encoding string specify console output encoding name"
msgstr " --console-encoding 字符串 指定控制台编码名" msgstr " --console-encoding 字符串 指定控制台编码名"
#: ../../bin/hawk.c:431 #: ../../bin/hawk.c:430
msgid "" msgid ""
" -I/--includedirs string specify directories to look for include " " -I/--includedirs string specify directories to look for include "
"files in" "files in"
msgstr " -I/--includedirs 字符串 指定查找 include 文件的目录" msgstr " -I/--includedirs 字符串 指定查找 include 文件的目录"
#: ../../bin/hawk.c:432 #: ../../bin/hawk.c:431
msgid "" msgid ""
" --modlibdirs string specify directories to look for module " " --modlibdirs string specify directories to look for module "
"files in" "files in"
msgstr " --modlibdirs 字符串 指定查找模块文件的目录" msgstr " --modlibdirs 字符串 指定查找模块文件的目录"
#: ../../bin/hawk.c:433 #: ../../bin/hawk.c:432
msgid " --modern run in the modern mode(default)" msgid " --modern run in the modern mode(default)"
msgstr " --modern 以现代模式运行(默认)" msgstr " --modern 以现代模式运行(默认)"
#: ../../bin/hawk.c:434 #: ../../bin/hawk.c:433
msgid " --classic run in the classic mode" msgid " --classic run in the classic mode"
msgstr " --classic 以经典模式运行" msgstr " --classic 以经典模式运行"
#: ../../bin/hawk.c:444 #: ../../bin/hawk.c:443
msgid "Special mode switching options(must be specified first to take effect):" msgid "Special mode switching options(must be specified first to take effect):"
msgstr "特殊模式切换选项(必须先指定才能生效):" msgstr "特殊模式切换选项(必须先指定才能生效):"
#: ../../bin/hawk.c:445 ../../bin/main.c:414 #: ../../bin/hawk.c:444 ../../bin/main.c:414
msgid " --awk/--hawk switch to the awk mode(default)" msgid " --awk/--hawk switch to the awk mode(default)"
msgstr " --awk/--hawk 切换到 awk 模式(默认)" msgstr " --awk/--hawk 切换到 awk 模式(默认)"
#: ../../bin/hawk.c:446 ../../bin/main.c:415 #: ../../bin/hawk.c:445 ../../bin/main.c:415
msgid " --cut switch to the cut mode" msgid " --cut switch to the cut mode"
msgstr " --cut 切换到 cut 模式" msgstr " --cut 切换到 cut 模式"
#: ../../bin/hawk.c:447 ../../bin/main.c:416 #: ../../bin/hawk.c:446 ../../bin/main.c:416
msgid " --sed switch to the sed mode" msgid " --sed switch to the sed mode"
msgstr " --sed 切换到 sed 模式" msgstr " --sed 切换到 sed 模式"
#: ../../bin/hawk.c:806 ../../bin/hawk.c:823 #: ../../bin/hawk.c:804 ../../bin/hawk.c:821
msgid "ERROR" msgid "ERROR"
msgstr "错误" msgstr "错误"
#: ../../bin/hawk.c:807 ../../bin/hawk.c:824 #: ../../bin/hawk.c:805 ../../bin/hawk.c:822
msgid "Line" msgid "Line"
msgstr "行" msgstr "行"
#: ../../bin/hawk.c:808 ../../bin/hawk.c:825 #: ../../bin/hawk.c:806 ../../bin/hawk.c:823
msgid "Column" msgid "Column"
msgstr "列" msgstr "列"
#: ../../bin/hawk.c:809 ../../bin/hawk.c:826 #: ../../bin/hawk.c:807 ../../bin/hawk.c:824
msgid "Code" msgid "Code"
msgstr "代码" msgstr "代码"
#: ../../bin/hawk.c:810 ../../bin/hawk.c:827 #: ../../bin/hawk.c:808 ../../bin/hawk.c:825
msgid "File " msgid "File "
msgstr "文件 " msgstr "文件 "
@@ -973,6 +969,9 @@ msgstr "选择器无效"
msgid "unknown error" msgid "unknown error"
msgstr "未知错误" msgstr "未知错误"
#~ msgid "enable byte-code building"
#~ msgstr "启用字节码构建"
#, fuzzy #, fuzzy
#~ msgid "" #~ msgid ""
#~ " --conin-encoding string specify console output encoding name" #~ " --conin-encoding string specify console output encoding name"
-2
View File
@@ -374,7 +374,6 @@ struct opttab_t
{ {
/* the values must be present in the "lng" table in process_argv[] */ /* the values must be present in the "lng" table in process_argv[] */
{ "blankconcat", HAWK_BLANKCONCAT, __("enable concatenation by blanks") }, { "blankconcat", HAWK_BLANKCONCAT, __("enable concatenation by blanks") },
{ "buildbc", HAWK_BUILDBC, __("enable byte-code building") },
{ "crlf", HAWK_CRLF, __("use CRLF for a newline") }, { "crlf", HAWK_CRLF, __("use CRLF for a newline") },
{ "defermodsym", HAWK_DEFER_MODSYM, __("defer resolving module symbols(mod::symbol) to runtime") }, { "defermodsym", HAWK_DEFER_MODSYM, __("defer resolving module symbols(mod::symbol) to runtime") },
{ "flexmap", HAWK_FLEXMAP, __("allow a map to be assigned or returned") }, { "flexmap", HAWK_FLEXMAP, __("allow a map to be assigned or returned") },
@@ -455,7 +454,6 @@ static int process_argv (int argc, hawk_bch_t* argv[], const hawk_bch_t* real_ar
static hawk_bcli_lng_t lng[] = static hawk_bcli_lng_t lng[] =
{ {
{ ":blankconcat", '\0' }, { ":blankconcat", '\0' },
{ ":buildbc", '\0' },
{ ":crlf", '\0' }, { ":crlf", '\0' },
{ ":defermodsym", '\0' }, { ":defermodsym", '\0' },
{ ":flexmap", '\0' }, { ":flexmap", '\0' },
+54 -58
View File
@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-10 23:03+0900\n" "POT-Creation-Date: 2026-04-15 01:55+0900\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -22,228 +22,224 @@ msgid "enable concatenation by blanks"
msgstr "" msgstr ""
#: ../../bin/hawk.c:377 #: ../../bin/hawk.c:377
msgid "enable byte-code building"
msgstr ""
#: ../../bin/hawk.c:378
msgid "use CRLF for a newline" msgid "use CRLF for a newline"
msgstr "" msgstr ""
#: ../../bin/hawk.c:379 #: ../../bin/hawk.c:378
msgid "defer resolving module symbols(mod::symbol) to runtime" msgid "defer resolving module symbols(mod::symbol) to runtime"
msgstr "" msgstr ""
#: ../../bin/hawk.c:380 #: ../../bin/hawk.c:379
msgid "allow a map to be assigned or returned" msgid "allow a map to be assigned or returned"
msgstr "" msgstr ""
#: ../../bin/hawk.c:381 #: ../../bin/hawk.c:380
msgid "allow undeclared variables" msgid "allow undeclared variables"
msgstr "" msgstr ""
#: ../../bin/hawk.c:382 #: ../../bin/hawk.c:381
msgid "allow raw multiline string and regular expression literals" msgid "allow raw multiline string and regular expression literals"
msgstr "" msgstr ""
#: ../../bin/hawk.c:383 #: ../../bin/hawk.c:382
msgid "perform numeric comparsion on numeric strings" msgid "perform numeric comparsion on numeric strings"
msgstr "" msgstr ""
#: ../../bin/hawk.c:384 #: ../../bin/hawk.c:383
msgid "enable a newline to terminate a statement" msgid "enable a newline to terminate a statement"
msgstr "" msgstr ""
#: ../../bin/hawk.c:385 #: ../../bin/hawk.c:384
msgid "enable nextofile & OFILENAME" msgid "enable nextofile & OFILENAME"
msgstr "" msgstr ""
#: ../../bin/hawk.c:386 #: ../../bin/hawk.c:385
msgid "detect a numeric string and convert it to a number" msgid "detect a numeric string and convert it to a number"
msgstr "" msgstr ""
#: ../../bin/hawk.c:387 #: ../../bin/hawk.c:386
msgid "enable pattern-action loop" msgid "enable pattern-action loop"
msgstr "" msgstr ""
#: ../../bin/hawk.c:388 #: ../../bin/hawk.c:387
msgid "enable pedantic mode" msgid "enable pedantic mode"
msgstr "" msgstr ""
#: ../../bin/hawk.c:389 #: ../../bin/hawk.c:388
msgid "set CLOEXEC before executing an external program for piping" msgid "set CLOEXEC before executing an external program for piping"
msgstr "" msgstr ""
#: ../../bin/hawk.c:390 #: ../../bin/hawk.c:389
msgid "enable {n,m} in a regular expression" msgid "enable {n,m} in a regular expression"
msgstr "" msgstr ""
#: ../../bin/hawk.c:391 #: ../../bin/hawk.c:390
msgid "enable builtin I/O including getline & print" msgid "enable builtin I/O including getline & print"
msgstr "" msgstr ""
#: ../../bin/hawk.c:392 #: ../../bin/hawk.c:391
msgid "allow a dual-directional pipe" msgid "allow a dual-directional pipe"
msgstr "" msgstr ""
#: ../../bin/hawk.c:393 #: ../../bin/hawk.c:392
msgid "enable the strict naming rule" msgid "enable the strict naming rule"
msgstr "" msgstr ""
#: ../../bin/hawk.c:394 #: ../../bin/hawk.c:393
msgid "strip spaces in splitting a record" msgid "strip spaces in splitting a record"
msgstr "" msgstr ""
#: ../../bin/hawk.c:395 #: ../../bin/hawk.c:394
msgid "strip spaces in string-to-number conversion" msgid "strip spaces in string-to-number conversion"
msgstr "" msgstr ""
#: ../../bin/hawk.c:396 #: ../../bin/hawk.c:395
msgid "make more fault-tolerant" msgid "make more fault-tolerant"
msgstr "" msgstr ""
#: ../../bin/hawk.c:397 #: ../../bin/hawk.c:396
msgid "enable the extended call syntax" msgid "enable the extended call syntax"
msgstr "" msgstr ""
#: ../../bin/hawk.c:408 ../../bin/main.c:410 #: ../../bin/hawk.c:407 ../../bin/main.c:410
msgid "USAGE" msgid "USAGE"
msgstr "" msgstr ""
#: ../../bin/hawk.c:408 #: ../../bin/hawk.c:407
msgid "[options] -f sourcefile [ -- ] [datafile]*" msgid "[options] -f sourcefile [ -- ] [datafile]*"
msgstr "" msgstr ""
#: ../../bin/hawk.c:409 #: ../../bin/hawk.c:408
msgid " " msgid " "
msgstr "" msgstr ""
#: ../../bin/hawk.c:409 #: ../../bin/hawk.c:408
msgid "[options] [ -- ] sourcestring [datafile]*" msgid "[options] [ -- ] sourcestring [datafile]*"
msgstr "" msgstr ""
#: ../../bin/hawk.c:410 ../../bin/main.c:411 #: ../../bin/hawk.c:409 ../../bin/main.c:411
msgid "Options as follows:" msgid "Options as follows:"
msgstr "" msgstr ""
#: ../../bin/hawk.c:411 #: ../../bin/hawk.c:410
msgid " -h/--help print this message" msgid " -h/--help print this message"
msgstr "" msgstr ""
#: ../../bin/hawk.c:412 #: ../../bin/hawk.c:411
msgid " -D show extra information" msgid " -D show extra information"
msgstr "" msgstr ""
#: ../../bin/hawk.c:413 #: ../../bin/hawk.c:412
msgid " -c/--call name call a function instead of entering" msgid " -c/--call name call a function instead of entering"
msgstr "" msgstr ""
#: ../../bin/hawk.c:414 #: ../../bin/hawk.c:413
msgid "" msgid ""
" the pattern-action loop. [datafile]* is" " the pattern-action loop. [datafile]* is"
msgstr "" msgstr ""
#: ../../bin/hawk.c:415 #: ../../bin/hawk.c:414
msgid " passed to the function as parameters" msgid " passed to the function as parameters"
msgstr "" msgstr ""
#: ../../bin/hawk.c:416 #: ../../bin/hawk.c:415
msgid " -f/--file file set the source script file" msgid " -f/--file file set the source script file"
msgstr "" msgstr ""
#: ../../bin/hawk.c:417 #: ../../bin/hawk.c:416
msgid "" msgid ""
" -d/--deparsed-file file set the deparsed script file to produce" " -d/--deparsed-file file set the deparsed script file to produce"
msgstr "" msgstr ""
#: ../../bin/hawk.c:418 #: ../../bin/hawk.c:417
msgid " -t/--console-output file set the console output file" msgid " -t/--console-output file set the console output file"
msgstr "" msgstr ""
#: ../../bin/hawk.c:419 #: ../../bin/hawk.c:418
msgid " multiple -t options are allowed" msgid " multiple -t options are allowed"
msgstr "" msgstr ""
#: ../../bin/hawk.c:420 #: ../../bin/hawk.c:419
msgid " -F/--field-separator string set a field separator(FS)" msgid " -F/--field-separator string set a field separator(FS)"
msgstr "" msgstr ""
#: ../../bin/hawk.c:421 #: ../../bin/hawk.c:420
msgid " -v/--assign var=value add a global variable with a value" msgid " -v/--assign var=value add a global variable with a value"
msgstr "" msgstr ""
#: ../../bin/hawk.c:422 #: ../../bin/hawk.c:421
msgid " -m/--memory-limit number limit the memory usage (bytes)" msgid " -m/--memory-limit number limit the memory usage (bytes)"
msgstr "" msgstr ""
#: ../../bin/hawk.c:423 #: ../../bin/hawk.c:422
msgid " -w expand datafile wildcards" msgid " -w expand datafile wildcards"
msgstr "" msgstr ""
#: ../../bin/hawk.c:426 #: ../../bin/hawk.c:425
msgid " --script-encoding string specify script file encoding name" msgid " --script-encoding string specify script file encoding name"
msgstr "" msgstr ""
#: ../../bin/hawk.c:427 #: ../../bin/hawk.c:426
msgid " --conin-encoding string specify console input encoding name" msgid " --conin-encoding string specify console input encoding name"
msgstr "" msgstr ""
#: ../../bin/hawk.c:428 #: ../../bin/hawk.c:427
msgid " --conout-encoding string specify console output encoding name" msgid " --conout-encoding string specify console output encoding name"
msgstr "" msgstr ""
#: ../../bin/hawk.c:431 #: ../../bin/hawk.c:430
msgid "" msgid ""
" -I/--includedirs string specify directories to look for include " " -I/--includedirs string specify directories to look for include "
"files in" "files in"
msgstr "" msgstr ""
#: ../../bin/hawk.c:432 #: ../../bin/hawk.c:431
msgid "" msgid ""
" --modlibdirs string specify directories to look for module " " --modlibdirs string specify directories to look for module "
"files in" "files in"
msgstr "" msgstr ""
#: ../../bin/hawk.c:433 #: ../../bin/hawk.c:432
msgid " --modern run in the modern mode(default)" msgid " --modern run in the modern mode(default)"
msgstr "" msgstr ""
#: ../../bin/hawk.c:434 #: ../../bin/hawk.c:433
msgid " --classic run in the classic mode" msgid " --classic run in the classic mode"
msgstr "" msgstr ""
#: ../../bin/hawk.c:444 #: ../../bin/hawk.c:443
msgid "Special mode switching options(must be specified first to take effect):" msgid "Special mode switching options(must be specified first to take effect):"
msgstr "" msgstr ""
#: ../../bin/hawk.c:445 ../../bin/main.c:414 #: ../../bin/hawk.c:444 ../../bin/main.c:414
msgid " --awk/--hawk switch to the awk mode(default)" msgid " --awk/--hawk switch to the awk mode(default)"
msgstr "" msgstr ""
#: ../../bin/hawk.c:446 ../../bin/main.c:415 #: ../../bin/hawk.c:445 ../../bin/main.c:415
msgid " --cut switch to the cut mode" msgid " --cut switch to the cut mode"
msgstr "" msgstr ""
#: ../../bin/hawk.c:447 ../../bin/main.c:416 #: ../../bin/hawk.c:446 ../../bin/main.c:416
msgid " --sed switch to the sed mode" msgid " --sed switch to the sed mode"
msgstr "" msgstr ""
#: ../../bin/hawk.c:806 ../../bin/hawk.c:823 #: ../../bin/hawk.c:804 ../../bin/hawk.c:821
msgid "ERROR" msgid "ERROR"
msgstr "" msgstr ""
#: ../../bin/hawk.c:807 ../../bin/hawk.c:824 #: ../../bin/hawk.c:805 ../../bin/hawk.c:822
msgid "Line" msgid "Line"
msgstr "" msgstr ""
#: ../../bin/hawk.c:808 ../../bin/hawk.c:825 #: ../../bin/hawk.c:806 ../../bin/hawk.c:823
msgid "Column" msgid "Column"
msgstr "" msgstr ""
#: ../../bin/hawk.c:809 ../../bin/hawk.c:826 #: ../../bin/hawk.c:807 ../../bin/hawk.c:824
msgid "Code" msgid "Code"
msgstr "" msgstr ""
#: ../../bin/hawk.c:810 ../../bin/hawk.c:827 #: ../../bin/hawk.c:808 ../../bin/hawk.c:825
msgid "File " msgid "File "
msgstr "" msgstr ""
-130
View File
@@ -192,126 +192,6 @@ typedef struct hawk_tree_t hawk_tree_t;
#endif #endif
enum hawk_fbc_opcode_t
{
HAWK_FBC_OP_NOP = 0,
HAWK_FBC_OP_LOAD_CONST_INT,
HAWK_FBC_OP_LOAD_CONST_FLT,
HAWK_FBC_OP_LOAD_CONST_STR,
HAWK_FBC_OP_LOAD_CONST_MBS,
HAWK_FBC_OP_LOAD_CONST_CHAR,
HAWK_FBC_OP_LOAD_CONST_BCHR,
HAWK_FBC_OP_LOAD_CONST_NIL,
HAWK_FBC_OP_LOAD_CONST_TRUE,
HAWK_FBC_OP_LOAD_CONST_FALSE,
HAWK_FBC_OP_LOAD_GBL,
HAWK_FBC_OP_LOAD_LCL,
HAWK_FBC_OP_LOAD_ARG,
HAWK_FBC_OP_STORE_GBL,
HAWK_FBC_OP_STORE_LCL,
HAWK_FBC_OP_STORE_ARG,
HAWK_FBC_OP_STORE_POP_GBL,
HAWK_FBC_OP_STORE_POP_LCL,
HAWK_FBC_OP_STORE_POP_ARG,
HAWK_FBC_OP_ADD,
HAWK_FBC_OP_SUB,
HAWK_FBC_OP_MUL,
HAWK_FBC_OP_DIV,
HAWK_FBC_OP_IDIV,
HAWK_FBC_OP_MOD,
HAWK_FBC_OP_EXP,
HAWK_FBC_OP_CONCAT,
HAWK_FBC_OP_RSHIFT,
HAWK_FBC_OP_LSHIFT,
HAWK_FBC_OP_BAND,
HAWK_FBC_OP_BXOR,
HAWK_FBC_OP_BOR,
HAWK_FBC_OP_TEQ,
HAWK_FBC_OP_TNE,
HAWK_FBC_OP_EQ,
HAWK_FBC_OP_NE,
HAWK_FBC_OP_GT,
HAWK_FBC_OP_GE,
HAWK_FBC_OP_LT,
HAWK_FBC_OP_LE,
HAWK_FBC_OP_PLUS, /* unary plus */
HAWK_FBC_OP_MINUS, /* unary minus */
HAWK_FBC_OP_LNOT, /* unary logical negation */
HAWK_FBC_OP_BNOT, /* unary bitwise negation */
HAWK_FBC_OP_SWAP,
HAWK_FBC_OP_DUP,
HAWK_FBC_OP_JMP,
HAWK_FBC_OP_JZ,
HAWK_FBC_OP_CALL,
HAWK_FBC_OP_RET,
HAWK_FBC_OP_POP,
HAWK_FBC_OP_INIT_BLK,
HAWK_FBC_OP_PRINT_REC,
HAWK_FBC_OP_PRINT_SEP,
HAWK_FBC_OP_PRINT_VAL,
HAWK_FBC_OP_PRINT_END,
HAWK_FBC_OP_RUN_AST_STMT,
HAWK_FBC_OP_RET_AST_EXPR,
HAWK_FBC_OP_RET_NIL
};
typedef enum hawk_fbc_opcode_t hawk_fbc_opcode_t;
enum hawk_fbc_lit_type_t
{
HAWK_FBC_LIT_FLT = 0,
HAWK_FBC_LIT_STR,
HAWK_FBC_LIT_MBS,
HAWK_FBC_LIT_CHAR,
HAWK_FBC_LIT_BCHR
};
typedef enum hawk_fbc_lit_type_t hawk_fbc_lit_type_t;
typedef struct hawk_fbc_lit_t hawk_fbc_lit_t;
struct hawk_fbc_lit_t
{
hawk_fbc_lit_type_t type;
union
{
hawk_flt_t fv;
hawk_oocs_t str;
hawk_bcs_t mbs;
hawk_ooch_t ch;
hawk_bch_t bch;
} u;
};
typedef struct hawk_fbc_ins_t hawk_fbc_ins_t;
struct hawk_fbc_ins_t
{
hawk_fbc_opcode_t opcode;
union
{
hawk_nde_t* nde;
hawk_int_t iv;
hawk_ooch_t ch;
hawk_bch_t bch;
hawk_oow_t idx;
hawk_oow_t oow;
} u;
};
struct hawk_fbc_t
{
hawk_fbc_ins_t* code;
hawk_oow_t len;
hawk_oow_t capa;
hawk_fbc_lit_t* lit;
hawk_oow_t lit_len;
hawk_oow_t lit_capa;
hawk_oow_t nargs;
hawk_oow_t nlocals;
hawk_oow_t stack_max;
};
struct hawk_tree_t struct hawk_tree_t
{ {
hawk_oow_t ngbls; /* total number of globals */ hawk_oow_t ngbls; /* total number of globals */
@@ -545,14 +425,6 @@ struct hawk_var_xinfo_t
hawk_loc_t loc; hawk_loc_t loc;
}; };
typedef struct hawk_fbc_eval_stack_t hawk_fbc_eval_stack_t;
struct hawk_fbc_eval_stack_t
{
hawk_val_t** ptr;
hawk_oow_t len;
hawk_oow_t capa;
};
struct hawk_rtx_t struct hawk_rtx_t
{ {
HAWK_RTX_HDR; HAWK_RTX_HDR;
@@ -564,8 +436,6 @@ struct hawk_rtx_t
hawk_oow_t stack_base; hawk_oow_t stack_base;
hawk_oow_t stack_limit; hawk_oow_t stack_limit;
hawk_fbc_eval_stack_t fbc_eval_stack;
int exit_level; int exit_level;
int init_called; int init_called;
+1 -3
View File
@@ -33,7 +33,6 @@ static void free_fun (hawk_htb_t* map, void* vptr, hawk_oow_t vlen)
/*hawk_freemem(hawk, f->name);*/ /*hawk_freemem(hawk, f->name);*/
if (f->argspec) hawk_freemem(hawk, f->argspec); if (f->argspec) hawk_freemem(hawk, f->argspec);
if (f->bc) hawk_freefunbc(hawk, f->bc);
hawk_clrpt(hawk, f->body); hawk_clrpt(hawk, f->body);
hawk_freemem(hawk, f); hawk_freemem(hawk, f);
} }
@@ -44,7 +43,6 @@ static void free_ifun (hawk_arr_t* arr, void* dptr, hawk_oow_t dlen)
hawk_fun_t* f = (hawk_fun_t*)dptr; hawk_fun_t* f = (hawk_fun_t*)dptr;
if (f->argspec) hawk_freemem(hawk, f->argspec); if (f->argspec) hawk_freemem(hawk, f->argspec);
if (f->bc) hawk_freefunbc(hawk, f->bc);
hawk_clrpt(hawk, f->body); hawk_clrpt(hawk, f->body);
hawk_freemem(hawk, f); hawk_freemem(hawk, f);
} }
@@ -475,7 +473,7 @@ void hawk_clear (hawk_t* hawk)
* mask them off with hawk_setopt(). the listed options * mask them off with hawk_setopt(). the listed options
* here affect the compile-time pragma. */ * here affect the compile-time pragma. */
hawk->parse.pragma.trait = hawk->opt.trait & hawk->parse.pragma.trait = hawk->opt.trait &
(HAWK_BUILDBC | HAWK_DEFER_MODSYM | HAWK_IMPLICIT | HAWK_MULTILINESTR | HAWK_PEDANTIC | HAWK_RWPIPE | (HAWK_DEFER_MODSYM | HAWK_IMPLICIT | HAWK_MULTILINESTR | HAWK_PEDANTIC | HAWK_RWPIPE |
HAWK_PIPECLOEXEC | HAWK_STRIPRECSPC | HAWK_STRIPSTRSPC | HAWK_XCALL); HAWK_PIPECLOEXEC | HAWK_STRIPRECSPC | HAWK_STRIPSTRSPC | HAWK_XCALL);
hawk->parse.pragma.rtx_stack_limit = 0; hawk->parse.pragma.rtx_stack_limit = 0;
+1 -10
View File
@@ -525,8 +525,6 @@ struct hawk_nde_t
* The hawk_fun_t type defines a structure to maintain functions * The hawk_fun_t type defines a structure to maintain functions
* defined with the keyword 'function'. * defined with the keyword 'function'.
*/ */
typedef struct hawk_fbc_t hawk_fbc_t;
struct hawk_fun_t struct hawk_fun_t
{ {
hawk_oocs_t name; hawk_oocs_t name;
@@ -535,7 +533,6 @@ struct hawk_fun_t
hawk_oow_t argspeclen; /* the length of argspec. it can be different from nargs if there are call-by-value parameters after the last call-by-reference parameter or variadic arguments are supported */ hawk_oow_t argspeclen; /* the length of argspec. it can be different from nargs if there are call-by-value parameters after the last call-by-reference parameter or variadic arguments are supported */
int variadic; int variadic;
hawk_nde_t* body; hawk_nde_t* body;
hawk_fbc_t* bc; /* function bytecode */
}; };
typedef struct hawk_fun_t hawk_fun_t; typedef struct hawk_fun_t hawk_fun_t;
@@ -1447,17 +1444,11 @@ enum hawk_trait_t
*/ */
HAWK_XCALL = (1 << 21), HAWK_XCALL = (1 << 21),
/**
* enables experimental function-body bytecode build/run path
* for selected functions.
*/
HAWK_BUILDBC = (1 << 22),
/** /**
* allows unresolved module symbol references like 'mod::fn()' at parse-time. * allows unresolved module symbol references like 'mod::fn()' at parse-time.
* if enabled, they are resolved when executed and can fail at runtime. * if enabled, they are resolved when executed and can fail at runtime.
*/ */
HAWK_DEFER_MODSYM = (1 << 23), HAWK_DEFER_MODSYM = (1 << 22),
/** /**
* makes #hawk_t to behave compatibly with classical AWK * makes #hawk_t to behave compatibly with classical AWK
+3 -3
View File
@@ -48,7 +48,7 @@ struct pafs_t
hawk_oow_t end_index; hawk_oow_t end_index;
}; };
static hawk_oow_t push_args_from_stack (hawk_rtx_t* rtx, hawk_nde_fncall_t* call, void* data) static hawk_oow_t push_args_from_stack (hawk_rtx_t* rtx, const hawk_loc_t* call_loc, void* data)
{ {
struct pafs_t* pasf = (struct pafs_t*)data; struct pafs_t* pasf = (struct pafs_t*)data;
hawk_oow_t org_stack_base, i, j; hawk_oow_t org_stack_base, i, j;
@@ -56,7 +56,7 @@ static hawk_oow_t push_args_from_stack (hawk_rtx_t* rtx, hawk_nde_fncall_t* call
if (HAWK_RTX_STACK_AVAIL(rtx) < pasf->end_index - pasf->start_index + 1) if (HAWK_RTX_STACK_AVAIL(rtx) < pasf->end_index - pasf->start_index + 1)
{ {
hawk_rtx_seterrnum(rtx, &call->loc, HAWK_ESTACK); hawk_rtx_seterrnum(rtx, call_loc, HAWK_ESTACK);
return (hawk_oow_t)-1; return (hawk_oow_t)-1;
} }
@@ -85,7 +85,7 @@ static hawk_oow_t push_args_from_stack (hawk_rtx_t* rtx, hawk_nde_fncall_t* call
{ {
if (spec == 'r') /* 'R' allows a normal value. so only checking 'r' here */ if (spec == 'r') /* 'R' allows a normal value. so only checking 'r' here */
{ {
hawk_rtx_seterrnum(rtx, &call->loc, HAWK_ENOTREF); hawk_rtx_seterrnum(rtx, call_loc, HAWK_ENOTREF);
return (hawk_oow_t)-1; return (hawk_oow_t)-1;
} }
} }
-5
View File
@@ -122,11 +122,6 @@ void hawk_clearsionames (
hawk_t* hawk hawk_t* hawk
); );
void hawk_freefunbc (
hawk_t* hawk,
hawk_fbc_t* bc
);
hawk_mod_t* hawk_querymodulewithname ( hawk_mod_t* hawk_querymodulewithname (
hawk_t* hawk, hawk_t* hawk,
const hawk_ooch_t* name, const hawk_ooch_t* name,
-1673
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -143,7 +143,7 @@ hawk_val_t* hawk_rtx_evalcall (
hawk_rtx_t* rtx, hawk_rtx_t* rtx,
hawk_nde_fncall_t* call, hawk_nde_fncall_t* call,
hawk_fun_t* fun, hawk_fun_t* fun,
hawk_oow_t(*argpusher)(hawk_rtx_t*,hawk_nde_fncall_t*,void*), hawk_oow_t(*argpusher)(hawk_rtx_t*,const hawk_loc_t* loc,void*),
void* apdata, /* data to argpusher */ void* apdata, /* data to argpusher */
void(*errhandler)(void*), void(*errhandler)(void*),
void* eharg void* eharg
+50 -944
View File
File diff suppressed because it is too large Load Diff