<s> import unittest <EOL> from pynes . compiler import lexical , syntax , semantic <EOL> class PhpTest ( unittest . TestCase ) : <EOL> def test_php_sngl ( self ) : <EOL> tokens = list ( lexical ( '<STR_LIT>' ) ) <EOL> self . assertEquals ( <NUM_LIT:1> , len ( tokens ) ) <EOL> self . assertEquals ( '<STR_LIT>' , tokens [ <NUM_LIT:0> ] [ '<STR_LIT:type>' ] ) <EOL> ast = syntax ( tokens ) <EOL> self . assertEquals ( <NUM_LIT:1> , len ( ast ) ) <EOL> self . assertEquals ( '<STR_LIT>' , ast [ <NUM_LIT:0> ] [ '<STR_LIT:type>' ] ) <EOL> code = semantic ( ast ) <EOL> self . assertEquals ( code , [ <NUM_LIT> ] ) </s>
