add comment in class "NoTerminalExpression/TerminalExpression" and upd README.rst

This commit is contained in:
Roman Martinuk 2021-04-13 00:58:44 +03:00
parent cf331541cd
commit 6410890a06
4 changed files with 11 additions and 1 deletions

View File

@ -2,6 +2,9 @@
namespace DesignPatterns\Behavioral\Interpreter;
/**
* This NoTerminalExpression
*/
class AndExp extends AbstractExp
{
public function __construct(private AbstractExp $first, private AbstractExp $second)

View File

@ -2,6 +2,9 @@
namespace DesignPatterns\Behavioral\Interpreter;
/**
* This NoTerminalExpression
*/
class OrExp extends AbstractExp
{
public function __construct(private AbstractExp $first, private AbstractExp $second)

View File

@ -4,7 +4,8 @@
Purpose
-------
For a given language, it defines the representation of its grammar,
For a given language, it defines the representation of its grammar as
"No Terminal Expression" and "Terminal Expression",
as well as an interpreter for the sentences of that language.
Examples

View File

@ -2,6 +2,9 @@
namespace DesignPatterns\Behavioral\Interpreter;
/**
* This TerminalExpression
*/
class VariableExp extends AbstractExp
{
public function __construct(private string $name)