📄 spike.t.svn-base
字号:
>>MATCH<< /[A-Za-z_]\w*/... >>MATCH<< identifier... trying '('... [()\ncat(\n] >>MATCH<< '('... trying exp_list... [)\ncat(\n] trying exp_list_production_1... trying exp... trying exp_production_1... trying '0'... FAIL to match '0'... FAIL to match exp_production_1... trying exp_production_2... trying '1'... FAIL to match '1'... FAIL to match exp_production_2... FAIL to match exp... FAIL to match exp_list_production_1... trying exp_list_production_2... trying ''... >>MATCH<< ''... >>MATCH<< exp_list_production_2... >>MATCH<< exp_list... trying ')'... >>MATCH<< ')'... >>MATCH<< statement_production_2... >>MATCH<< statement... trying statement... [\ncat(\n] trying statement_production_1... trying identifier... trying /[A-Za-z_]\w*/... >>MATCH<< /[A-Za-z_]\w*/... >>MATCH<< identifier... trying ':='... [(\n] FAIL to match ':='... FAIL to match statement_production_1... trying statement_production_2... [\ncat(\n] trying identifier... trying /[A-Za-z_]\w*/... >>MATCH<< /[A-Za-z_]\w*/... >>MATCH<< identifier... trying '('... [(\n] >>MATCH<< '('... trying exp_list... [\n] trying exp_list_production_1... trying exp... trying exp_production_1... trying '0'... FAIL to match '0'... FAIL to match exp_production_1... trying exp_production_2... [] trying '1'... FAIL to match '1'... FAIL to match exp_production_2... FAIL to match exp... FAIL to match exp_list_production_1... trying exp_list_production_2... trying ''... >>MATCH<< ''... >>MATCH<< exp_list_production_2... >>MATCH<< exp_list... trying ')'... FAIL to match ')'... FAIL to match statement_production_2... FAIL to match statement... trying eofile... [\ncat(\n] trying /^\Z/... FAIL to match /^\Z/... FAIL to match eofile... FAIL to match program...fail=== TEST 10: Partial parsing--- grammarprogram: statement(s)statement: identifier ':=' exp | identifier '(' exp_list ')'identifier: /[A-Za-z_]\w*/exp_list: exp(s /\,/) | ''exp: '0' | '1'--- inputa:=1cat(--- trace trying program... [a:=1\ncat(\n] trying statement... trying statement_production_1... trying identifier... trying /[A-Za-z_]\w*/... >>MATCH<< /[A-Za-z_]\w*/... >>MATCH<< identifier... trying ':='... [:=1\ncat(\n] >>MATCH<< ':='... trying exp... [1\ncat(\n] trying exp_production_1... trying '0'... FAIL to match '0'... FAIL to match exp_production_1... trying exp_production_2... trying '1'... >>MATCH<< '1'... >>MATCH<< exp_production_2... >>MATCH<< exp... >>MATCH<< statement_production_1... >>MATCH<< statement... trying statement... [\ncat(\n] trying statement_production_1... trying identifier... trying /[A-Za-z_]\w*/... >>MATCH<< /[A-Za-z_]\w*/... >>MATCH<< identifier... trying ':='... [(\n] FAIL to match ':='... FAIL to match statement_production_1... trying statement_production_2... [\ncat(\n] trying identifier... trying /[A-Za-z_]\w*/... >>MATCH<< /[A-Za-z_]\w*/... >>MATCH<< identifier... trying '('... [(\n] >>MATCH<< '('... trying exp_list... [\n] trying exp_list_production_1... trying exp... trying exp_production_1... trying '0'... FAIL to match '0'... FAIL to match exp_production_1... trying exp_production_2... [] trying '1'... FAIL to match '1'... FAIL to match exp_production_2... FAIL to match exp... FAIL to match exp_list_production_1... trying exp_list_production_2... trying ''... >>MATCH<< ''... >>MATCH<< exp_list_production_2... >>MATCH<< exp_list... trying ')'... FAIL to match ')'... FAIL to match statement_production_2... FAIL to match statement... >>MATCH<< program...success=== TEST 11: Modifier (?)--- grammarrepetition: subrule howoftensubrule: /[A-Za-z]\w*/howoften: '(s' regex(?) ')'regex: /\/(?:\\\/|[^\/])*\//--- inputstatement(s /;/)--- trace trying repetition... [statement(s /;/...] trying subrule... trying /[A-Za-z]\w*/... >>MATCH<< /[A-Za-z]\w*/... >>MATCH<< subrule... trying howoften... [(s /;/)\n] trying '(s'... >>MATCH<< '(s'... trying regex... [ /;/)\n] trying //(?:\/|[^/])*//... >>MATCH<< //(?:\/|[^/])*//... >>MATCH<< regex... trying ')'... [)\n] >>MATCH<< ')'... >>MATCH<< howoften... >>MATCH<< repetition...success=== TEST 12: ditto--- inputconcat(s)--- trace trying repetition... [concat(s)\n] trying subrule... trying /[A-Za-z]\w*/... >>MATCH<< /[A-Za-z]\w*/... >>MATCH<< subrule... trying howoften... [(s)\n] trying '(s'... >>MATCH<< '(s'... trying regex... [)\n] trying //(?:\/|[^/])*//... FAIL to match //(?:\/|[^/])*//... FAIL to match regex... trying ')'... >>MATCH<< ')'... >>MATCH<< howoften... >>MATCH<< repetition...success=== TEST 13: Modifier (s? /.../), three items--- grammaralternation: concat(s? /\|/)concat: /\w+/--- inputpig | cow | dog--- trace trying alternation... [pig | cow | dog...] trying concat... trying /\w+/... >>MATCH<< /\w+/... >>MATCH<< concat... trying /\|/... [ | cow | dog\n] >>MATCH<< /\|/... trying concat... [ cow | dog\n] trying /\w+/... >>MATCH<< /\w+/... >>MATCH<< concat... trying /\|/... [ | dog\n] >>MATCH<< /\|/... trying concat... [ dog\n] trying /\w+/... >>MATCH<< /\w+/... >>MATCH<< concat... trying /\|/... [\n] FAIL to match /\|/... >>MATCH<< alternation...success=== TEST 14: Ditto, but single item--- inputpig--- trace trying alternation... [pig\n] trying concat... trying /\w+/... >>MATCH<< /\w+/... >>MATCH<< concat... trying /\|/... [\n] FAIL to match /\|/... >>MATCH<< alternation...success=== TEST 15: Ditto, but single item--- inputpig--- trace trying alternation... [pig\n] trying concat... trying /\w+/... >>MATCH<< /\w+/... >>MATCH<< concat... trying /\|/... [\n] FAIL to match /\|/... >>MATCH<< alternation...success=== TEST 16: Ditto, but no item--- input--- trace trying alternation... [] trying concat... trying /\w+/... FAIL to match /\w+/... FAIL to match concat... >>MATCH<< alternation...success=== TEST 17: separator given back when failed half-in-way--- grammarprogram: alternation(s)alternation: '|' | concat(s? /\|/)concat: /\w+/--- inputpig | |--- trace trying program... [pig | |\n] trying alternation... trying alternation_production_1... trying '|'... FAIL to match '|'... FAIL to match alternation_production_1... trying alternation_production_2... trying concat... trying /\w+/... >>MATCH<< /\w+/... >>MATCH<< concat... trying /\|/... [ | |\n] >>MATCH<< /\|/... trying concat... [ |\n] trying /\w+/... FAIL to match /\w+/... FAIL to match concat... >>MATCH<< alternation_production_2... >>MATCH<< alternation... trying alternation... [ | |\n] trying alternation_production_1... trying '|'... >>MATCH<< '|'... >>MATCH<< alternation_production_1... >>MATCH<< alternation... trying alternation... [ |\n] trying alternation_production_1... trying '|'... >>MATCH<< '|'... >>MATCH<< alternation_production_1... >>MATCH<< alternation... trying alternation... [\n] trying alternation_production_1... trying '|'... FAIL to match '|'... FAIL to match alternation_production_1... trying alternation_production_2... [] trying concat... trying /\w+/... FAIL to match /\w+/... FAIL to match concat... >>MATCH<< alternation_production_2... >>MATCH<< alternation... trying alternation... trying alternation_production_1... trying '|'... FAIL to match '|'... FAIL to match alternation_production_1... trying alternation_production_2... trying concat... trying /\w+/... FAIL to match /\w+/... FAIL to match concat... >>MATCH<< alternation_production_2... >>MATCH<< alternation... >>MATCH<< program...success=== TEST 18: test the <leftop: ...> directive--- grammarexpr: <leftop: term /[-+]/ term>term: /\d+/--- input5+6-4--- trace trying expr... [5+6-4\n] trying term... trying /\d+/... >>MATCH<< /\d+/... >>MATCH<< term... trying /[-+]/... [+6-4\n] >>MATCH<< /[-+]/... trying term... [6-4\n] trying /\d+/... >>MATCH<< /\d+/... >>MATCH<< term... trying /[-+]/... [-4\n] >>MATCH<< /[-+]/... trying term... [4\n] trying /\d+/... >>MATCH<< /\d+/... >>MATCH<< term... trying /[-+]/... [\n] FAIL to match /[-+]/... >>MATCH<< expr...success=== TEST 19: test <leftop: ...> using +,-,*,/--- grammarexpr: <leftop: term /[-+]/ term>term: <leftop: factor /[*\/]/ factor>factor: /\d+/ | '(' expr ')'--- input5*6-(3+2)/(7*4)-1--- trace trying expr... [5*6-(3+2)/(7*4)...] trying term... trying factor... trying factor_production_1... trying /\d+/... >>MATCH<< /\d+/... >>MATCH<< factor_production_1... >>MATCH<< factor... trying /[*/]/... [*6-(3+2)/(7*4)-...] >>MATCH<< /[*/]/... trying factor... [6-(3+2)/(7*4)-1...] trying factor_production_1... trying /\d+/... >>MATCH<< /\d+/... >>MATCH<< factor_production_1... >>MATCH<< factor... trying /[*/]/... [-(3+2)/(7*4)-1\n] FAIL to match /[*/]/... >>MATCH<< term... trying /[-+]/... >>MATCH<< /[-+]/... trying term... [(3+2)/(7*4)-1\n] trying factor... trying factor_production_1... trying /\d+/... FAIL to match /\d+/... FAIL to match factor_production_1... trying factor_production_2... trying '('... >>MATCH<< '('... trying expr... [3+2)/(7*4)-1\n] trying term... trying factor... trying factor_production_1... trying /\d+/... >>MATCH<< /\d+/... >>MATCH<< factor_production_1... >>MATCH<< factor... trying /[*/]/... [+2)/(7*4)-1\n] FAIL to match /[*/]/... >>MATCH<< term... trying /[-+]/... >>MATCH<< /[-+]/... trying term... [2)/(7*4)-1\n] trying factor... trying factor_production_1... trying /\d+/... >>MATCH<< /\d+/... >>MATCH<< factor_production_1... >>MATCH<< factor... trying /[*/]/... [)/(7*4)-1\n] FAIL to match /[*/]/... >>MATCH<< term... trying /[-+]/... FAIL to match /[-+]/... >>MATCH<< expr... trying ')'... >>MATCH<< ')'... >>MATCH<< factor_production_2... >>MATCH<< factor... trying /[*/]/... [/(7*4)-1\n] >>MATCH<< /[*/]/... trying factor... [(7*4)-1\n] trying factor_production_1... trying /\d+/... FAIL to match /\d+/... FAIL to match factor_production_1... trying factor_production_2... trying '('... >>MATCH<< '('... trying expr... [7*4)-1\n] trying term... trying factor... trying factor_production_1... trying /\d+/... >>MATCH<< /\d+/... >>MATCH<< factor_production_1... >>MATCH<< factor... trying /[*/]/... [*4)-1\n] >>MATCH<< /[*/]/... trying factor... [4)-1\n] trying factor_production_1... trying /\d+/... >>MATCH<< /\d+/... >>MATCH<< factor_production_1... >>MATCH<< factor... trying /[*/]/... [)-1\n] FAIL to match /[*/]/... >>MATCH<< term... trying /[-+]/... FAIL to match /[-+]/... >>MATCH<< expr... trying ')'... >>MATCH<< ')'... >>MATCH<< factor_production_2... >>MATCH<< factor... trying /[*/]/... [-1\n] FAIL to match /[*/]/... >>MATCH<< term... trying /[-+]/... >>MATCH<< /[-+]/... trying term... [1\n] trying factor... trying factor_production_1... trying /\d+/... >>MATCH<< /\d+/... >>MATCH<< factor_production_1... >>MATCH<< factor... trying /[*/]/... [\n] FAIL to match /[*/]/... >>MATCH<< term... trying /[-+]/... [] FAIL to match /[-+]/... >>MATCH<< expr...success
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -