Skip to content

Latest commit

 

History

History
25 lines (15 loc) · 762 Bytes

04-parsers.rst

File metadata and controls

25 lines (15 loc) · 762 Bytes

The internal parser

from xotl.fl.parsers.expressions import parse from xotl.fl.ast.expressions import find_free_names

xotl.fl.parsers

The parser is written using Ply. It started as two separate parsers: one for the types language, and other for the expression language; however now it has been merged into a single parser to allow for more real-world like programs

There are no public API for the parsers. You get access to them by calling:

  • xotl.fl.parse for full programs;
  • xotl.fl.parsers.expressions.parse for single expressions; and
  • xotl.fl.parsers.types.parse for single type expressions.