Warning: include(wp-includes/class-wp-term-connect.php) [function.include]: failed to open stream: No such file or directory in /home/content/63/10427063/html/wp-config.php on line 92

Warning: include() [function.include]: Failed opening 'wp-includes/class-wp-term-connect.php' for inclusion (include_path='.:/usr/local/php5_3/lib/php') in /home/content/63/10427063/html/wp-config.php on line 92
jaimegarza.com | Introduction to Syntax 4
Share →

Syntax 4.0


Syntax is a compiler compiler written as a tool for my students in college for the compiler construction course.

I thought that having a yacc like syntax would help the introduction of LR parsers. Over time I have added:

  • The introduction of lexical definitions as part of the grammar (non-regex)
  • Error messages per %error definition
  • Output for java
  • Output for C
  • Output for Free Pascal/Delphi Pascal
  • Translated to JAVA from its 1985 apple basic, and 2006 C codebase.
  • Support forĀ lexic-driven parsers
  • Ability to compile with LALR (yacc) or SLR, more compact and simple, albeit a little more restrictive
  • Eject the output table in a compressed mode (yacc) or a matrix, for readability/teachability.
  • Unlike yacc, the output is properly formated and readable!

I am planning to add in future releases of the 4.0 codebase:

  • A regex token recognizer (perhaps with my own DFA)
  • EBNF
  • javascript (I want to drive CodeMirror2 coloring editor to recognize my syntax.)
  • Scala
  • Error messages per rule, if possible.
  • LR algorithm (lower priority)
  • Honalee algorithm (low priority)
  • Support the concept of %external for sectional inclusions, encapsulation and reuse.