{
	"0: data": {
		"srcIndexStart": "0", 
		"file": "docssrc/docs.Tools.Parse.tmpl", 
		"parseTreeMode": "true", 
		"srcLength": "2665", 
		"source": "[$name|Parse$]
[$title|Parse$]
[$frame|HTMLPage.tmpl$]
<p>
Parses any source according to any
[$pageLink|CGT| CGT file $],
and saves the resulting
tokens and parse tree to [$pageLink|ParseTreeMode| JSON files $].
These JSON files can be inspected with
the enhanced version of [$pageName|JsonViewer$] bundled with Goldie.
</p>

<h3>Example:</h3>
<p>
If the file extension of your source is the same as the name of a CGT file in
Goldie's [$code|inline|lang/$] directory:
</p>
<div class=\"api-def\">
<div class=\"code-plain\">&gt;[$code|user| goldie-parse lang/valid_sample2.calc $]</div>
</div>

<p>
To use a specific CGT file:
</p>
<div class=\"api-def\">
<div class=\"code-plain\">&gt;[$code|user| goldie-parse -lang:/home/me/myLanguages/calc.cgt lang/valid_sample2.calc $]</div>
</div>

<p>
The above examples will create the following files in the same directory
as [$code|inline|valid_sample2.calc$]:
</p>
<div class=\"api-def\">
[$code|plain|
[:valid_sample2.calc.tk.json
valid_sample2.calc.pt.json:]
$]
</div>
<p>
The [$code|inline|.tk.json$] file contains the tokenization of [$code|inline|valid_sample2.calc$].
Ie, the result of the [$pageLink|LearnParsing#Frontend|Lexing$] phase.
</p>
<p>
The [$code|inline|.pt.json$] file contains the parse tree of [$code|inline|valid_sample2.calc$].
Ie, the result of the [$pageLink|LearnParsing#Frontend|Parsing$] phase.
</p>
<p>
Either of the [$code|inline|.json$] files can be opened in [$pageTitle|JsonViewer$]
and will be browsable using JsonViewer's [$pageLink|ParseTreeMode|Parse Tree Mode$].
</p>

<p>
<span style=\"font-weight: bold\">Note:</span>
Keep in mind, especially when using [$ident|Parse$] with
[$pageTitle|JsonViewer$], that parse trees tend to get very large, very fast.
</p>

<h3>Command-line parameters:</h3>
[$code|plain|
[:Sample Usage:
    goldie-parse lang/valid_sample2.calc
    goldie-parse lang/valid_sample2.calc -lang:lang/calc.cgt

Switches:
(Prefixes can be '/', '-' or '--')
('[]' means multiple switches are accepted)

Basic:
  -help         Displays a help summary and exits
  -detail       Displays a detailed help message and exits
  <text>        (Required) Source filename
  -lang:<text>  CGT file of language (default: \"{goldie}/lang/{src ext}.cgt\")

Advanced:
  -ptn          Don't save parse tree
  -tkn          Don't save tokens
  -ptp          Pretty format parse tree file
  -tkp          Pretty format token file
  -ptt:<text>   Parse tree file type (\"json\" or \"xml\") (default: \"json\")
  -tkt:<text>   Token file type (\"json\" or \"xml\") (default: \"json\")
  -pto:<text>   Parse tree output filename
  -tko:<text>   Token output filename
  -debug        Display debug information:]
$]
", 
		"0: name": {
			"srcIndexStart": "0", 
			"data": "Parse", 
			"srcLength": "14", 
			"0: data": {
				"srcIndexStart": "7", 
				"data": "Parse", 
				"srcLength": "5"
			}
		}, 
		"1: data": {
			"srcIndexStart": "14", 
			"data": "
", 
			"srcLength": "1"
		}, 
		"2: title": {
			"srcIndexStart": "15", 
			"data": "Parse", 
			"srcLength": "15", 
			"0: data": {
				"srcIndexStart": "23", 
				"data": "Parse", 
				"srcLength": "5"
			}
		}, 
		"3: data": {
			"srcIndexStart": "30", 
			"data": "
", 
			"srcLength": "1"
		}, 
		"4: frame": {
			"srcIndexStart": "31", 
			"data": "HTMLPage.tmpl", 
			"srcLength": "23", 
			"0: data": {
				"srcIndexStart": "39", 
				"data": "HTMLPage.tmpl", 
				"srcLength": "13"
			}
		}, 
		"5: data": {
			"srcIndexStart": "54", 
			"data": "
<p>
Parses any source according to any
", 
			"srcLength": "40"
		}, 
		"6: pageLink": {
			"srcIndexStart": "94", 
			"param 0": "CGT", 
			"data": "CGT file", 
			"srcLength": "27", 
			"0: data": {
				"srcIndexStart": "109", 
				"data": "CGT file", 
				"srcLength": "10"
			}
		}, 
		"7: data": {
			"srcIndexStart": "121", 
			"data": ",
and saves the resulting
tokens and parse tree to ", 
			"srcLength": "51"
		}, 
		"8: pageLink": {
			"srcIndexStart": "172", 
			"param 0": "ParseTreeMode", 
			"data": "JSON files", 
			"srcLength": "39", 
			"0: data": {
				"srcIndexStart": "197", 
				"data": "JSON files", 
				"srcLength": "12"
			}
		}, 
		"9: data": {
			"srcIndexStart": "211", 
			"data": ".
These JSON files can be inspected with
the enhanced version of ", 
			"srcLength": "65"
		}, 
		"10: pageName": {
			"srcIndexStart": "276", 
			"data": "JsonViewer", 
			"srcLength": "23", 
			"0: data": {
				"srcIndexStart": "287", 
				"data": "JsonViewer", 
				"srcLength": "10"
			}
		}, 
		"11: data": {
			"srcIndexStart": "299", 
			"data": " bundled with Goldie.
</p>

<h3>Example:</h3>
<p>
If the file extension of your source is the same as the name of a CGT file in
Goldie's ", 
			"srcLength": "137"
		}, 
		"12: code": {
			"srcIndexStart": "436", 
			"param 0": "inline", 
			"data": "lang/", 
			"srcLength": "21", 
			"0: data": {
				"srcIndexStart": "450", 
				"data": "lang/", 
				"srcLength": "5"
			}
		}, 
		"13: data": {
			"srcIndexStart": "457", 
			"data": " directory:
</p>
<div class=\"api-def\">
<div class=\"code-plain\">&gt;", 
			"srcLength": "67"
		}, 
		"14: code": {
			"srcIndexStart": "524", 
			"param 0": "user", 
			"data": "goldie-parse lang/valid_sample2.calc", 
			"srcLength": "52", 
			"0: data": {
				"srcIndexStart": "536", 
				"data": "goldie-parse lang/valid_sample2.calc", 
				"srcLength": "38"
			}
		}, 
		"15: data": {
			"srcIndexStart": "576", 
			"data": "</div>
</div>

<p>
To use a specific CGT file:
</p>
<div class=\"api-def\">
<div class=\"code-plain\">&gt;", 
			"srcLength": "102"
		}, 
		"16: code": {
			"srcIndexStart": "678", 
			"param 0": "user", 
			"data": "goldie-parse -lang:/home/me/myLanguages/calc.cgt lang/valid_sample2.calc", 
			"srcLength": "88", 
			"0: data": {
				"srcIndexStart": "690", 
				"data": "goldie-parse -lang:/home/me/myLanguages/calc.cgt lang/valid_sample2.calc", 
				"srcLength": "74"
			}
		}, 
		"17: data": {
			"srcIndexStart": "766", 
			"data": "</div>
</div>

<p>
The above examples will create the following files in the same directory
as ", 
			"srcLength": "95"
		}, 
		"18: code": {
			"srcIndexStart": "861", 
			"param 0": "inline", 
			"data": "valid_sample2.calc", 
			"srcLength": "34", 
			"0: data": {
				"srcIndexStart": "875", 
				"data": "valid_sample2.calc", 
				"srcLength": "18"
			}
		}, 
		"19: data": {
			"srcIndexStart": "895", 
			"data": ":
</p>
<div class=\"api-def\">
", 
			"srcLength": "29"
		}, 
		"20: code": {
			"srcIndexStart": "924", 
			"param 0": "plain", 
			"data": "valid_sample2.calc.tk.json
valid_sample2.calc.pt.json", 
			"srcLength": "74", 
			"0: data": {
				"srcIndexStart": "937", 
				"data": "", 
				"srcLength": "1"
			}, 
			"1: data": {
				"srcIndexStart": "938", 
				"data": "valid_sample2.calc.tk.json
valid_sample2.calc.pt.json", 
				"srcLength": "57"
			}, 
			"2: data": {
				"srcIndexStart": "995", 
				"data": "", 
				"srcLength": "1"
			}
		}, 
		"21: data": {
			"srcIndexStart": "998", 
			"data": "
</div>
<p>
The ", 
			"srcLength": "16"
		}, 
		"22: code": {
			"srcIndexStart": "1014", 
			"param 0": "inline", 
			"data": ".tk.json", 
			"srcLength": "24", 
			"0: data": {
				"srcIndexStart": "1028", 
				"data": ".tk.json", 
				"srcLength": "8"
			}
		}, 
		"23: data": {
			"srcIndexStart": "1038", 
			"data": " file contains the tokenization of ", 
			"srcLength": "35"
		}, 
		"24: code": {
			"srcIndexStart": "1073", 
			"param 0": "inline", 
			"data": "valid_sample2.calc", 
			"srcLength": "34", 
			"0: data": {
				"srcIndexStart": "1087", 
				"data": "valid_sample2.calc", 
				"srcLength": "18"
			}
		}, 
		"25: data": {
			"srcIndexStart": "1107", 
			"data": ".
Ie, the result of the ", 
			"srcLength": "24"
		}, 
		"26: pageLink": {
			"srcIndexStart": "1131", 
			"param 0": "LearnParsing#Frontend", 
			"data": "Lexing", 
			"srcLength": "41", 
			"0: data": {
				"srcIndexStart": "1164", 
				"data": "Lexing", 
				"srcLength": "6"
			}
		}, 
		"27: data": {
			"srcIndexStart": "1172", 
			"data": " phase.
</p>
<p>
The ", 
			"srcLength": "21"
		}, 
		"28: code": {
			"srcIndexStart": "1193", 
			"param 0": "inline", 
			"data": ".pt.json", 
			"srcLength": "24", 
			"0: data": {
				"srcIndexStart": "1207", 
				"data": ".pt.json", 
				"srcLength": "8"
			}
		}, 
		"29: data": {
			"srcIndexStart": "1217", 
			"data": " file contains the parse tree of ", 
			"srcLength": "33"
		}, 
		"30: code": {
			"srcIndexStart": "1250", 
			"param 0": "inline", 
			"data": "valid_sample2.calc", 
			"srcLength": "34", 
			"0: data": {
				"srcIndexStart": "1264", 
				"data": "valid_sample2.calc", 
				"srcLength": "18"
			}
		}, 
		"31: data": {
			"srcIndexStart": "1284", 
			"data": ".
Ie, the result of the ", 
			"srcLength": "24"
		}, 
		"32: pageLink": {
			"srcIndexStart": "1308", 
			"param 0": "LearnParsing#Frontend", 
			"data": "Parsing", 
			"srcLength": "42", 
			"0: data": {
				"srcIndexStart": "1341", 
				"data": "Parsing", 
				"srcLength": "7"
			}
		}, 
		"33: data": {
			"srcIndexStart": "1350", 
			"data": " phase.
</p>
<p>
Either of the ", 
			"srcLength": "31"
		}, 
		"34: code": {
			"srcIndexStart": "1381", 
			"param 0": "inline", 
			"data": ".json", 
			"srcLength": "21", 
			"0: data": {
				"srcIndexStart": "1395", 
				"data": ".json", 
				"srcLength": "5"
			}
		}, 
		"35: data": {
			"srcIndexStart": "1402", 
			"data": " files can be opened in ", 
			"srcLength": "24"
		}, 
		"36: pageTitle": {
			"srcIndexStart": "1426", 
			"data": "JsonViewer", 
			"srcLength": "24", 
			"0: data": {
				"srcIndexStart": "1438", 
				"data": "JsonViewer", 
				"srcLength": "10"
			}
		}, 
		"37: data": {
			"srcIndexStart": "1450", 
			"data": "
and will be browsable using JsonViewer's ", 
			"srcLength": "42"
		}, 
		"38: pageLink": {
			"srcIndexStart": "1492", 
			"param 0": "ParseTreeMode", 
			"data": "Parse Tree Mode", 
			"srcLength": "42", 
			"0: data": {
				"srcIndexStart": "1517", 
				"data": "Parse Tree Mode", 
				"srcLength": "15"
			}
		}, 
		"39: data": {
			"srcIndexStart": "1534", 
			"data": ".
</p>

<p>
<span style=\"font-weight: bold\">Note:</span>
Keep in mind, especially when using ", 
			"srcLength": "93"
		}, 
		"40: ident": {
			"srcIndexStart": "1627", 
			"data": "Parse", 
			"srcLength": "15", 
			"0: data": {
				"srcIndexStart": "1635", 
				"data": "Parse", 
				"srcLength": "5"
			}
		}, 
		"41: data": {
			"srcIndexStart": "1642", 
			"data": " with
", 
			"srcLength": "6"
		}, 
		"42: pageTitle": {
			"srcIndexStart": "1648", 
			"data": "JsonViewer", 
			"srcLength": "24", 
			"0: data": {
				"srcIndexStart": "1660", 
				"data": "JsonViewer", 
				"srcLength": "10"
			}
		}, 
		"43: data": {
			"srcIndexStart": "1672", 
			"data": ", that parse trees tend to get very large, very fast.
</p>

<h3>Command-line parameters:</h3>
", 
			"srcLength": "94"
		}, 
		"44: code": {
			"srcIndexStart": "1766", 
			"param 0": "plain", 
			"data": "Sample Usage:
    goldie-parse lang/valid_sample2.calc
    goldie-parse lang/valid_sample2.calc -lang:lang/calc.cgt

Switches:
(Prefixes can be '/', '-' or '--')
('[]' means multiple switches are accepted)

Basic:
  -help         Displays a help summary and exits
  -detail       Displays a detailed help message and exits
  &lt;text&gt;        (Required) Source filename
  -lang:&lt;text&gt;  CGT file of language (default: \"{goldie}/lang/{src ext}.cgt\")

Advanced:
  -ptn          Don't save parse tree
  -tkn          Don't save tokens
  -ptp          Pretty format parse tree file
  -tkp          Pretty format token file
  -ptt:&lt;text&gt;   Parse tree file type (\"json\" or \"xml\") (default: \"json\")
  -tkt:&lt;text&gt;   Token file type (\"json\" or \"xml\") (default: \"json\")
  -pto:&lt;text&gt;   Parse tree output filename
  -tko:&lt;text&gt;   Token output filename
  -debug        Display debug information", 
			"srcLength": "898", 
			"0: data": {
				"srcIndexStart": "1779", 
				"data": "", 
				"srcLength": "1"
			}, 
			"1: data": {
				"srcIndexStart": "1780", 
				"data": "Sample Usage:
    goldie-parse lang/valid_sample2.calc
    goldie-parse lang/valid_sample2.calc -lang:lang/calc.cgt

Switches:
(Prefixes can be '/', '-' or '--')
('[]' means multiple switches are accepted)

Basic:
  -help         Displays a help summary and exits
  -detail       Displays a detailed help message and exits
  <text>        (Required) Source filename
  -lang:<text>  CGT file of language (default: \"{goldie}/lang/{src ext}.cgt\")

Advanced:
  -ptn          Don't save parse tree
  -tkn          Don't save tokens
  -ptp          Pretty format parse tree file
  -tkp          Pretty format token file
  -ptt:<text>   Parse tree file type (\"json\" or \"xml\") (default: \"json\")
  -tkt:<text>   Token file type (\"json\" or \"xml\") (default: \"json\")
  -pto:<text>   Parse tree output filename
  -tko:<text>   Token output filename
  -debug        Display debug information", 
				"srcLength": "881"
			}, 
			"2: data": {
				"srcIndexStart": "2661", 
				"data": "", 
				"srcLength": "1"
			}
		}, 
		"45: data": {
			"srcIndexStart": "2664", 
			"data": "", 
			"srcLength": "1"
		}
	}
}