c_to_python.git
5 years agoChange to use pilex and piyacc with (?E{...}...) style AST generation rather than...
Nick Downing [Thu, 10 Jan 2019 22:11:31 +0000 (09:11 +1100)]
Change to use pilex and piyacc with (?E{...}...) style AST generation rather than the older style plex and pyacc, add a Makefile, remove a lot of useless cruft

6 years agoMinor adjustments, change xml_to_l.py to scan_to_l.py, make it fix token names
Nick Downing [Sun, 12 Aug 2018 02:14:30 +0000 (12:14 +1000)]
Minor adjustments, change xml_to_l.py to scan_to_l.py, make it fix token names

6 years agoTranslate more C constructs, categorize identifiers and add (self|yy). prefixes to... origin/master
Nick Downing [Sun, 12 Aug 2018 00:33:55 +0000 (10:33 +1000)]
Translate more C constructs, categorize identifiers and add (self|yy). prefixes to some of them, indent the containing flex source as well as the Python source

6 years agoImplement basic Python translation, mainly indenting/spacing, handle some expressions...
Nick Downing [Sun, 5 Aug 2018 12:01:12 +0000 (22:01 +1000)]
Implement basic Python translation, mainly indenting/spacing, handle some expressions and statements specially, in particular add logic for do/while loops etc

6 years agoMake it invoke the C preprocessor only once with all the actions, and correctly subst...
Nick Downing [Sun, 5 Aug 2018 01:57:56 +0000 (11:57 +1000)]
Make it invoke the C preprocessor only once with all the actions, and correctly substitute macros, deleting the preprocessed results of includes before parsing

6 years agoFirst cut at l_to_python.py translator which reads a lex specification (in XML format...
Nick Downing [Sun, 5 Aug 2018 00:59:05 +0000 (10:59 +1000)]
First cut at l_to_python.py translator which reads a lex specification (in XML format for now), and then passes each action through c_to_python.py to translate