Skip to content

Commit

Permalink
Use makeOptLeaf
Browse files Browse the repository at this point in the history
  • Loading branch information
robintown committed Sep 18, 2024
1 parent 6ea72f9 commit a2a8d45
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
15 changes: 9 additions & 6 deletions src/grammar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,17 +228,20 @@ const grammar: Grammar = {
{"name": "CParg", "symbols": ["CPsub"], "postprocess": makeBranchCovertLeft('DP', 'D')},
{"name": "CPrelcon", "symbols": ["CPrel"], "postprocess": id},
{"name": "CPrelcon", "symbols": ["CPrel", "Conjunction", "CPrelcon"], "postprocess": makeConn},
{"name": "Sigmaconopt", "symbols": [], "postprocess": makeCovertLeaf('Σ')},
{"name": "Sigmaconopt", "symbols": ["Sigmacon"], "postprocess": id},
{"name": "Sigmaconopt$ebnf$1", "symbols": ["Sigmacon"], "postprocess": id},
{"name": "Sigmaconopt$ebnf$1", "symbols": [], "postprocess": () => null},
{"name": "Sigmaconopt", "symbols": ["Sigmaconopt$ebnf$1"], "postprocess": makeOptLeaf('Σ')},
{"name": "Sigmacon", "symbols": ["Sigma"], "postprocess": id},
{"name": "Sigmacon", "symbols": ["Sigma", "Conjunction", "Sigmacon"], "postprocess": makeConn},
{"name": "Tconopt", "symbols": [], "postprocess": makeCovertLeaf('T')},
{"name": "Tconopt", "symbols": ["Tcon"], "postprocess": id},
{"name": "Tconopt$ebnf$1", "symbols": ["Tcon"], "postprocess": id},
{"name": "Tconopt$ebnf$1", "symbols": [], "postprocess": () => null},
{"name": "Tconopt", "symbols": ["Tconopt$ebnf$1"], "postprocess": makeOptLeaf('T')},
{"name": "Tcon", "symbols": ["T"], "postprocess": id},
{"name": "Tcon", "symbols": ["T_prefix"], "postprocess": id},
{"name": "Tcon", "symbols": ["T", "Conjunction", "Tcon"], "postprocess": makeConn},
{"name": "Aspconopt", "symbols": [], "postprocess": makeCovertLeaf('Asp')},
{"name": "Aspconopt", "symbols": ["Aspcon"], "postprocess": id},
{"name": "Aspconopt$ebnf$1", "symbols": ["Aspcon"], "postprocess": id},
{"name": "Aspconopt$ebnf$1", "symbols": [], "postprocess": () => null},
{"name": "Aspconopt", "symbols": ["Aspconopt$ebnf$1"], "postprocess": makeOptLeaf('Asp')},
{"name": "Aspcon", "symbols": ["Asp"], "postprocess": id},
{"name": "Aspcon", "symbols": ["Asp_prefix"], "postprocess": id},
{"name": "Aspcon", "symbols": ["Asp", "Conjunction", "Aspcon"], "postprocess": makeConn},
Expand Down
9 changes: 3 additions & 6 deletions src/toaq.kuna.ne
Original file line number Diff line number Diff line change
Expand Up @@ -196,17 +196,14 @@ CPargfoc -> Focus CParg {% makeBranch('FocusP') %}
CParg -> CPsub {% makeBranchCovertLeft('DP', 'D') %}
CPrelcon -> CPrel {% id %}
CPrelcon -> CPrel Conjunction CPrelcon {% makeConn %}
Sigmaconopt -> null {% makeCovertLeaf('Σ') %}
Sigmaconopt -> Sigmacon {% id %}
Sigmaconopt -> Sigmacon:? {% makeOptLeaf('Σ') %}
Sigmacon -> Sigma {% id %}
Sigmacon -> Sigma Conjunction Sigmacon {% makeConn %}
Tconopt -> null {% makeCovertLeaf('T') %}
Tconopt -> Tcon {% id %}
Tconopt -> Tcon:? {% makeOptLeaf('T') %}
Tcon -> T {% id %}
Tcon -> T_prefix {% id %}
Tcon -> T Conjunction Tcon {% makeConn %}
Aspconopt -> null {% makeCovertLeaf('Asp') %}
Aspconopt -> Aspcon {% id %}
Aspconopt -> Aspcon:? {% makeOptLeaf('Asp') %}
Aspcon -> Asp {% id %}
Aspcon -> Asp_prefix {% id %}
Aspcon -> Asp Conjunction Aspcon {% makeConn %}
Expand Down

0 comments on commit a2a8d45

Please sign in to comment.