EOF marker in parser
Gagneet Singh
gagneet@acmet.com
Mon Dec 29 16:15:00 GMT 2003
More information about the Binutils mailing list
Mon Dec 29 16:15:00 GMT 2003
- Previous message (by thread): [PATCH]: readelf: Per comp-unit pointer sizes
- Next message (by thread): EOF marker in parser
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi!
I am working on an assembler implementation and wish to check if the end
of file has been reached. I know that this can be done using the
yywrap() function in the lex file, but the requirement is that we want
if the EOF is explicitly defined as in the hex value 0x1a, then how do
we reference that.
Example:
.section
.main
.end main '0x1a' <-- the actual EOF marker.
I want the above not to be a syntax error, but to be reported as an
error <function-name> is wrongly defined.
Can the above be done? My requirement is just to have the EOF token in
the parser, which unfortunately, I have not been able to do so till date
:-((, the rest of the work will be easily done as then, I just have to
give a rule such as:
End_stmt : END IDEN '\n'
{
OK do the rest
}
| END IDEN end_indicator
{
print error message and close application.
}
Gagneet
- Previous message (by thread): [PATCH]: readelf: Per comp-unit pointer sizes
- Next message (by thread): EOF marker in parser
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list