Loading...
 

Jison Parser

The Jison Parser is a developer feature only.

Issues reported

  • unparsed {TAG(tag=br,style=clear: both) /} on https://nextparserdev.tiki.org/Development
  • Accents are not the same. Bug or feature because the source code is as such?
  • links in the footer
  • http://nextdoc.tiki.org/tiki-index.php?page=Custom%20Home -> REAL_GT fixed
  • http://nextdoc.tiki.org/Requirements -> §e7cacb97964f755a6295f0e94914be7e§ instead of maketoc fixed
  • Spurious "Preference wikiplugin expandingoutline disabled" warning in the admin panel when Jison Parser is activated
    • Image
  • http://nextdoc.tiki.org/tiki-admin.php?page=textarea
    • Failed to execute "doc-dev-crosslinks" module Syntax Error in template "2c5dea3fb5fe0d80db2828c7c6705368591b4d59" on line 1 "{if isset($objectCategoryIds) and in_array(12, $objectCategoryIds)}<div class="clearfix rbox note"><img src="img/icons/close.png" alt="Close" width="16" height="16" class="rbox-close" onclick="$(this).parent().fadeOut();" title="Close" /><div class="rbox-title"><img src="img/icons/information.png" alt="note" width="16" height="16" title="note" class="icon" /><span>Note</span></div><div class="rbox-data">This page is to document "what Tiki does". For "what Tiki <em>should</em> do", please see <a class="wiki external" target="_blank"" href="http://dev.tiki.org/Tiki10" rel="external nofollow">corresponding page on dev site</a></div></div>{/if}" unknown tag "page" seems fixed
  • https://nextparserdev.tiki.org/tiki-index.php?page=Newsletter
    • §e7cacb97964f755a6295f0e94914be7e§ instead of maketoc fixed
    • PluginWishes is not being interpreted
    • Interested community members Error No field indicated
  • Various plugin parsing problems documented at https://nextparserdev.tiki.org/Plugin+Parsing+Problems. These probems also exist with existing parser, see Plugin Parsing Problems
  • Jison parser eats up all PHP memory

Processing WYSIWYG testing
Fatal error: Allowed memory size of 267386880 bytes exhausted (tried to allocate 198377 bytes) in …\lib\core\JisonParser\Html.php on line 57

Call Stack:
0,0010 126760 1. {main}() …\doc\devtools\htmlconvert.php:0
2,3104 23660560 2. tf() …\doc\devtools\htmlconvert.php:44
3,6918 26972696 3. JisonParser_Html_Handler->parse() ...\doc\devtools\htmlconvert.php:14
3,6919 26982520 4. JisonParser_Html->parse() ...\lib\core\JisonParser\Html\Handler.php:97
80,4134 73707968 5. JisonParser_Html->parser_performAction() …\lib\core\JisonParser\Html.php:253
"
The page is not large, and parsing it should not break a 255MB memory limit.

To reproduce

  1. Get the HTML source from http://dev.tiki.org/WYSIWYG+testing
  2. Create a local "WYSIWYG testing" page.
  3. Paste the source in the CkEditors "Source" view.
  4. Save the page
  5. Run doc/devtools/htmlconvert.php
  6. >> Crashes as shown above.


What is it

Jison is a new approach to building simplified parsers that was incorporated into Tiki around Tiki 8.  Jison was originally a JavaScript port of the Bison project, and has since been ported to PHP, creating a unified parser for both the client and server.  As of now the Jison parser is used in several places in Tiki:


There are a few things to note when it comes to the Jison parser if you want to help development with it.  Robert Plummer has lead the development of it, and because it is mostly experimental at time of writing, there is still some active development between the master repository and the fork.  To develop using the Jison parser you can follow the guidelines for installation, or if you want to go about enhancing the template (which is written in PHP and is where all the regex rules found in the JavaScript counterpart are 'imported').

Things to note

  • When developing a Jison parser you need to have node.js installed and npm.
  • node at time of writing is (v0.7.0-pre)
  • npm at time of writing is (1.1.0-beta-7)
  • Please try to be on latest of node and npm

How it works

The Jison parser is a bottom up reverse operator precedence parser.  This is an efficient means of analyzing (lexing and parsing) a string. To start building a parser you create a .jison parser definition (a '.jison' file) which is used in creating the jison output.  This template is parsed and inserted into a sort of empty JavaScript template.  In JavaScript, this template exists in many files, but in the PHP template, it exists as a single file.

When developing using Jison, generally you would edit the .jison file, and each time render the output of that file.  When development needs the PHP template, you would render using the Jison wrapper designed for that port (example: php).  With the PHP template, you would render the output of both a .js and a .php file at the same time, using a command similar to this:

Copy to clipboard
#cd /path/to/jisonfile.jison #node /path/where/jison/is/installed/ports/php/jison.js jisonfile.jison

This code outputs 2 file in the directory where the jisonfile.jison is, jisonfile.js and jisonfile.php.

For examples in how to write a parser and how to interact with them, please see the following:

Please note, although a somewhat large learning curve is needed to use Jison, the results are very stable, very fast, very scalable parser.  If you have problems trying to develop using the Jison parser, please join us in irc.

Pre-dogfood server

We have a Pre-Dogfood Server with nextparserdev.tiki.org with System Configuration keeping the new Jison Parser always on, so it's very easy to compare:

  1. http://nextparserdev.tiki.org/Overview Tiki trunk in testing with Jison Parser
  2. http://nextdev.tiki.org/Overview Tiki trunk in testing
  3. http://dev.tiki.org/Overview Tiki 10.x

alias

Jison Wiki Parser

Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki development and should correspond to documentation keywords.

Each feature in Tiki has a wiki page which regroups all the bugs, requests for enhancements, etc. It is somewhat a form of wiki-based project management. You can also express your interest in a feature by adding it to your profile. You can also try out the Dynamic filter.

Accessibility (WAI & 508)
Accounting
Administration
Ajax
Articles & Submissions
Backlinks
Banner
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Calendar
Category
Chat
Comment
Communication Center
Consistency
Contacts Address book
Contact us
Content template
Contribution
Cookie
Copyright
Credits
Custom Home (and Group Home Page)
Database MySQL - MyISAM
Database MySQL - InnoDB
Date and Time
Debugger Console
Diagram
Directory (of hyperlinks)
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
DogFood
Draw -superseded by Diagram
Dynamic Content
Preferences
Dynamic Variable
External Authentication
FAQ
Featured links
Feeds (RSS)
File Gallery
Forum
Friendship Network (Community)
Gantt
Group
Groupmail
Help
History
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
jQuery
Kaltura video management
Kanban
Karma
Live Support
Logs (system & action)
Lost edit protection
Mail-in
Map
Menu
Meta Tag
Missing features
Visual Mapping
Mobile
Mods
Modules
MultiTiki
MyTiki
Newsletter
Notepad
OS independence (Non-Linux, Windows/IIS, Mac, BSD)
Organic Groups (Self-managed Teams)
Packages
Payment
PDF
Performance Speed / Load / Compression / Cache
Permission
Poll
Profiles
Quiz
Rating
Realname
Report
Revision Approval
Scheduler
Score
Search engine optimization (SEO)
Search
Security
Semantic links
Share
Shopping Cart
Shoutbox
Site Identity
Slideshow
Smarty Template
Social Networking
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Staging and Approval
Stats
Survey
Syntax Highlighter (Codemirror)
Tablesorter
Tags
Task
Tell a Friend
Terms and Conditions
Theme
TikiTests
Federated Timesheets
Token Access
Toolbar (Quicktags)
Tours
Trackers
TRIM
User Administration
User Files
User Menu
Watch
Webmail and Groupmail
WebServices
Wiki History, page rename, etc
Wiki plugins extends basic syntax
Wiki syntax text area, parser, etc
Wiki structure (book and table of content)
Workspace and perspectives
WYSIWTSN
WYSIWYCA
WYSIWYG
XMLRPC
XMPP




Useful Tools