/tutorial/backtracking/tiny_prolog/prolog_atom.e

http://github.com/tybor/Liberty · Specman e · 17 lines · 17 code · 0 blank · 0 comment · 0 complexity · 8ce329924739cfc661721cc446b85b1a MD5 · raw file

  1. class PROLOG_ATOM
  2. inherit
  3. COMPARABLE
  4. HASHABLE
  5. PROLOG_TERM
  6. feature
  7. type: INTEGER is type_atom
  8. name: STRING
  9. infix "<"(other: like Current): BOOLEAN is
  10. do
  11. Result := name < other.name
  12. end
  13. hash_code: INTEGER is
  14. do
  15. Result := name.hash_code
  16. end
  17. end