Q Parsing Arrays

Greg Simon <grs124@psu.edu>
16 Oct 1996 17:33:11 -0400

          From comp.compilers

Related articles
Q Parsing Arrays grs124@psu.edu (Greg Simon) (1996-10-16)
| List of all articles for this month |

From: Greg Simon <grs124@psu.edu>
Newsgroups: comp.compilers
Date: 16 Oct 1996 17:33:11 -0400
Organization: Penn State University
Keywords: parse, question

If the source code I'm parsing contains an array definition like

a = [ 2 3 4 5 ];

Is it best to parse out the 'a', '[', 2, 3, 4, 5. ']' into the symbol
table, and then put the '=' into an icode intsruction? Or is a better
solution to actually parse the array before icode begins running, and
store 'a' in the symbol table with [2,3,4,5] assigned to it?

[Depends what you're going to do with it. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.