Compiler/lexical analyzer: Difference between revisions
Content added Content deleted
m (→Task: Clarify task output format, and usage as a pipeline) |
m (Updated Output and additional examples sections.) |
||
Line 184: | Line 184: | ||
# the token value (only for <tt>Identifier</tt>, <tt>Integer</tt>, and <tt>String</tt> tokens) |
# the token value (only for <tt>Identifier</tt>, <tt>Integer</tt>, and <tt>String</tt> tokens) |
||
# the number of spaces between fields is up to you. Neatly aligned is nice, but not a requirement. |
# the number of spaces between fields is up to you. Neatly aligned is nice, but not a requirement. |
||
<br> |
|||
⚫ | |||
⚫ | |||
Or possibly: |
|||
<br><b>lex hello.t lex.out</b> |
|||
<br><b>parse lex.out parse.out</b> |
|||
<br><b>gen parse.out gen.out</b> |
|||
<br><b>vm gen.out</b> |
|||
<br> |
|||
This implies that the output of this task (the lexical analyzer) should be suitable as input to any of the [[Compiler/syntax_analyzer|Syntax Analyzer task]] programs. |
|||
{{task heading|Diagnostics}} |
{{task heading|Diagnostics}} |
||
Line 361: | Line 374: | ||
Your solution should pass all the test cases above and the additional tests found '''[[Compiler/Sample_programs|Here]]'''. |
Your solution should pass all the test cases above and the additional tests found '''[[Compiler/Sample_programs|Here]]'''. |
||
⚫ | |||
⚫ | |||
<br>As such, the the output should be <b>exactly</b> as specified. |
|||
{{task heading|Reference}} |
{{task heading|Reference}} |