bingxio / stp

Stack based parser STP (blog post)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduction

STP is a stack based expression parser. This article will first explain
the parsing of four expressions, including binary and group
expressions. Then it analyzes the basic expressions in programming
language, such as GET, SET, UNARY, CALL and so on. The advantage is
that you only need to traverse the tokens array once, set the priority
and judge the relationship between the front and back token.
Stack structure if a very simple data structure, PEEK the top value,
POP the top value, PUSH value, first in first out principle. STP contains
two stack and a top operator variable, the structure is as follows:

Refer to PDF paper: https://bingxio.fun/STP.pdf

About

Stack based parser STP (blog post)

License:Other


Languages

Language:C 51.5%Language:Java 48.5%