xref: /aosp_15_r20/external/emboss/testdata/golden/README.md (revision 99e0aae7469b87d12f0ad23e61142c2d74c1ef70)
1*99e0aae7SDavid ReesThis directory contains an `.emb` and a set of golden files which correspond to
2*99e0aae7SDavid Reesvarious parsing stages of the `.emb`.  The primary purpose is to highlight
3*99e0aae7SDavid Reeschanges to the parse tree, tokenization, or (uncooked) intermediate
4*99e0aae7SDavid Reesrepresentation in a code review, where the before/after can be seen in
5*99e0aae7SDavid Reesside-by-side diffs.  The golden files *are* checked by unit tests, but test
6*99e0aae7SDavid Reesfailures generally just mean that the files need to be regenerated, not that
7*99e0aae7SDavid Reesthere is an actual bug.
8*99e0aae7SDavid Rees
9*99e0aae7SDavid Rees
10*99e0aae7SDavid Rees## `span_se_log_file_status.emb`
11*99e0aae7SDavid Rees
12*99e0aae7SDavid ReesThe .emb file from which the other files are derived.
13*99e0aae7SDavid Rees
14*99e0aae7SDavid Rees
15*99e0aae7SDavid Rees## `span_se_log_file_status.tokens.txt`
16*99e0aae7SDavid Rees
17*99e0aae7SDavid ReesThe tokenization.  This file should change very rarely.  From the workspace root
18*99e0aae7SDavid Reesdirectory, it can be generated with:
19*99e0aae7SDavid Rees
20*99e0aae7SDavid Rees    bazel run //front_end:emboss_front_end \
21*99e0aae7SDavid Rees        -- --no-debug-show-header-lines --debug-show-tokenization \
22*99e0aae7SDavid Rees        $(pwd)/testdata/golden/span_se_log_file_status.emb \
23*99e0aae7SDavid Rees        > $(pwd)/testdata/golden/span_se_log_file_status.tokens.txt
24*99e0aae7SDavid Rees
25*99e0aae7SDavid Rees
26*99e0aae7SDavid Rees## `span_se_log_file_status.parse_tree.txt`
27*99e0aae7SDavid Rees
28*99e0aae7SDavid ReesThe syntactic parse tree.  From the workspace root directory, it can be
29*99e0aae7SDavid Reesgenerated with:
30*99e0aae7SDavid Rees
31*99e0aae7SDavid Rees    bazel run //front_end:emboss_front_end \
32*99e0aae7SDavid Rees        -- --no-debug-show-header-lines --debug-show-parse-tree \
33*99e0aae7SDavid Rees        $(pwd)/testdata/golden/span_se_log_file_status.emb \
34*99e0aae7SDavid Rees        > $(pwd)/testdata/golden/span_se_log_file_status.parse_tree.txt
35*99e0aae7SDavid Rees
36*99e0aae7SDavid Rees
37*99e0aae7SDavid Rees## `span_se_log_file_status.ir.txt`
38*99e0aae7SDavid Rees
39*99e0aae7SDavid ReesThe "uncooked" module-level IR: that is, the IR of *only*
40*99e0aae7SDavid Rees`span_se_log_file_status.emb` (without the prelude or any imports), straight out
41*99e0aae7SDavid Reesof `module_ir.py` with no "middle end" transformations.  From the workspace root
42*99e0aae7SDavid Reesdirectory, it can be generated with:
43*99e0aae7SDavid Rees
44*99e0aae7SDavid Rees    blaze run //front_end:emboss_front_end \
45*99e0aae7SDavid Rees        -- --no-debug-show-header-lines --debug-show-module-ir \
46*99e0aae7SDavid Rees        $(pwd)/testdata/golden/span_se_log_file_status.emb \
47*99e0aae7SDavid Rees        > $(pwd)/testdata/golden/span_se_log_file_status.ir.txt
48