Project

General

Profile

Actions

Task #76086

closed

TypoScript Parser: Consider to separate classes for TypoScript parser and syntax highlighting

Added by Elmar Hinz over 8 years ago. Updated over 5 years ago.

Status:
Rejected
Priority:
Won't have this time
Assignee:
-
Category:
-
Target version:
-
Start date:
2016-05-09
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Syntax highlighting is done by the same parser as the array building. This results in a large amount of if conditions to address the differences.

The code is harder to read and more difficult to maintain. There is likely an impact in performance and this is a critical part of the system.

I suggest to separate the TypoScript Parser and the Syntax Parser into separate classes. They address different concerns.

By fully focusing the given task, it becomes more easy to optimise it for speed.

In special the parser does recursive function calls for each nesting level of the identifier braces. While recursive function calls are elegant in style, a simple loop with a stack may be faster.

Syntax highlighting doesn't require a nesting parser at all.

Actions #1

Updated by Elmar Hinz over 8 years ago

To suggest a roadmap:

1.) Clone the parser class into array parser and syntax highlighter.
2.) Strip all highlighting stuff out of the TypoScript parser.
3.) Optimise the TS parser.
4.) Simplify the syntax highlighting to work as a lexer.

Actions #2

Updated by Susanne Moog over 5 years ago

  • Status changed from New to Rejected

As this issue has not seen any work in the last three years and is a technical refactoring ticket, I'm closing it for now. It can be reopened once work starts.

Actions

Also available in: Atom PDF