Syntax checking/Parser: Difference between revisions

From EiffelStudio: an EiffelSoftware project
Jump to navigation Jump to search
Chrigu (talk | contribs)
No edit summary
Maser (talk | contribs)
added eiffel.y
Line 1: Line 1:
[[Syntax_checking|back to Syntax checking page]]
[[Syntax_checking|back to Syntax checking page]]


==Important Classes==
==Important Classes/Files==


====eiffel.y====
* Eiffel grammar description.
* use [http://www.gobosoft.com/eiffel/gobo/geyacc/ geyacc] to generate eiffel_parser.e from this file
====EIFFEL_PARSER====
====EIFFEL_PARSER====
* inherits from EIFFEL_PARSER_SKELETON (where the features parse, parse_string, make_with_factory are implemented)
* inherits from EIFFEL_PARSER_SKELETON (where the features parse, parse_string, make_with_factory are implemented)
Line 16: Line 19:
====SHARED_ERROR_HANDLER====
====SHARED_ERROR_HANDLER====
* singleton used by all relevant classes
* singleton used by all relevant classes
====EIFFEL_CLASS_C====
====EIFFEL_CLASS_C====
* features build_ast and parse_ast show how the parser can be used.
* features build_ast and parse_ast show how the parser can be used.

Revision as of 22:48, 18 May 2006

back to Syntax checking page

Important Classes/Files

eiffel.y

  • Eiffel grammar description.
  • use geyacc to generate eiffel_parser.e from this file

EIFFEL_PARSER

  • inherits from EIFFEL_PARSER_SKELETON (where the features parse, parse_string, make_with_factory are implemented)
  • make_with_factory (a_factory: AST_FACTORY): give argument of type AST_NULL_FACTORY (inherits from AST_FACTORY)
  • parse (a_file: KL_BINARY_INPUT_FILE) and parse_from_string (a_string: STRING): Both save the results in match_list: LEAF_AS_LIST.

CLASS_AS

  • AST of a class

ERROR

  • deferred; superclass of all error types like EIFFEL_ERROR or SYNTAX_ERROR
  • features line, column: INTEGER give location of error

ERROR_HANDLER

  • feature error_list: ERROR is a list of errors found by the parser

SHARED_ERROR_HANDLER

  • singleton used by all relevant classes

EIFFEL_CLASS_C

  • features build_ast and parse_ast show how the parser can be used.