pitree.git
4 months agoAdd location tracking, syntax error and invalid character reporting master
Nick Downing [Mon, 25 Dec 2023 07:37:20 +0000 (18:37 +1100)]
Add location tracking, syntax error and invalid character reporting

4 months agoMake the concatenate() routine in the element.py installed by pitree --install-elemen...
Nick Downing [Wed, 6 Dec 2023 01:37:26 +0000 (12:37 +1100)]
Make the concatenate() routine in the element.py installed by pitree --install-element not construct the element until after the text and children are known

4 months agoAdd MPFR type, including default value and serialization/deserialization
Nick Downing [Tue, 5 Dec 2023 01:29:35 +0000 (12:29 +1100)]
Add MPFR type, including default value and serialization/deserialization

4 months agoFix a bug which meant the user had to explictly specify the default value (rather...
Nick Downing [Tue, 5 Dec 2023 00:55:04 +0000 (11:55 +1100)]
Fix a bug which meant the user had to explictly specify the default value (rather than relying on the built-in null value of each type) if the type was mutable

5 months agoModify text_to_python() to handle stray whitespace on otherwise blank line
Nick Downing [Sat, 18 Nov 2023 23:08:11 +0000 (10:08 +1100)]
Modify text_to_python() to handle stray whitespace on otherwise blank line

5 months agoFixes for TypeDict: a reference to AST.TypeString should have been AST.TypeStr, fix...
Nick Downing [Fri, 17 Nov 2023 10:52:36 +0000 (21:52 +1100)]
Fixes for TypeDict: a reference to AST.TypeString should have been AST.TypeStr, fix several bugs in the generate_serialize() routine that had never been tested

5 months agoAdd /fix_bootstrap.sh and run it due to reserved ast and _ast in recent python3
Nick Downing [Mon, 13 Nov 2023 11:13:57 +0000 (22:13 +1100)]
Add /fix_bootstrap.sh and run it due to reserved ast and _ast in recent python3

23 months agoFix a bug in element.to_text()
Nick Downing [Mon, 16 May 2022 15:49:57 +0000 (01:49 +1000)]
Fix a bug in element.to_text()

23 months agoAdd float type and float constants
Nick Downing [Sat, 14 May 2022 23:44:47 +0000 (09:44 +1000)]
Add float type and float constants

23 months agoAdd a top level Makefile
Nick Downing [Sat, 14 May 2022 07:11:02 +0000 (17:11 +1000)]
Add a top level Makefile

2 years agoMinor change to imports
Nick Downing [Mon, 27 Dec 2021 06:39:51 +0000 (17:39 +1100)]
Minor change to imports

4 years agoMinor change to Makefile
Nick Downing [Sun, 15 Mar 2020 02:50:10 +0000 (13:50 +1100)]
Minor change to Makefile

4 years agoMake main() return error code and use it, since easy-install CLI wrapper script expec...
Nick Downing [Sun, 26 Jan 2020 22:30:59 +0000 (09:30 +1100)]
Make main() return error code and use it, since easy-install CLI wrapper script expects this

4 years agoRequire minimum Python version 3.5 in the setup.py installer, fix some minor bugs...
Nick Downing [Sat, 16 Nov 2019 16:29:22 +0000 (03:29 +1100)]
Require minimum Python version 3.5 in the setup.py installer, fix some minor bugs relating to default values, tidy up a bit, add lengthy tutorial to README.md

5 years agoMove everything into ndcode/pitree/, import from ndcode.pitree, add packaging
Nick Downing [Mon, 18 Feb 2019 14:12:06 +0000 (01:12 +1100)]
Move everything into ndcode/pitree/, import from ndcode.pitree, add packaging

5 years agoAdd forgotten skel_lex_yy.py
Nick Downing [Mon, 18 Feb 2019 10:44:38 +0000 (21:44 +1100)]
Add forgotten skel_lex_yy.py

5 years agoFreeze compiled pitree.git commit 71dd736 into bootstrap_pitree, convert usage
Nick Downing [Tue, 29 Jan 2019 10:22:01 +0000 (21:22 +1100)]
Freeze compiled pitree.git commit 71dd736 into bootstrap_pitree, convert usage

5 years agoRationalize constructor parameters, create mutable default in the constructor rather...
Nick Downing [Tue, 29 Jan 2019 09:49:03 +0000 (20:49 +1100)]
Rationalize constructor parameters, create mutable default in the constructor rather than using Python default argument, remove obsolete element.Element.copy()

5 years agoRemove element.(get|set)_text(), client to use element.Element.text[] directly
Nick Downing [Tue, 29 Jan 2019 05:09:11 +0000 (16:09 +1100)]
Remove element.(get|set)_text(), client to use element.Element.text[] directly

5 years agoRemove element.Element indexing ability, client to use element.Element.children
Nick Downing [Tue, 29 Jan 2019 04:21:47 +0000 (15:21 +1100)]
Remove element.Element indexing ability, client to use element.Element.children

5 years agoChange element.Element.text to be list, rather than str with per-element tail
Nick Downing [Tue, 29 Jan 2019 02:37:38 +0000 (13:37 +1100)]
Change element.Element.text to be list, rather than str with per-element tail

5 years agoRemove attribute and iterator capabilities from element.Element
Nick Downing [Tue, 29 Jan 2019 00:51:05 +0000 (11:51 +1100)]
Remove attribute and iterator capabilities from element.Element

5 years agoMake deserializer use a temporary tree of xml.etree.ElementTree.Element
Nick Downing [Tue, 29 Jan 2019 00:48:36 +0000 (11:48 +1100)]
Make deserializer use a temporary tree of xml.etree.ElementTree.Element

5 years agoMake serializer use a temporary tree of xml.etree.ElementTree.Element
Nick Downing [Mon, 28 Jan 2019 23:49:45 +0000 (10:49 +1100)]
Make serializer use a temporary tree of xml.etree.ElementTree.Element

5 years agoMake element.Element implement the xml.etree.ElementTree._Element_Py by itself
Nick Downing [Mon, 28 Jan 2019 11:52:32 +0000 (22:52 +1100)]
Make element.Element implement the xml.etree.ElementTree._Element_Py by itself

5 years agoMake default values not be serialized to XML
Nick Downing [Mon, 28 Jan 2019 10:05:43 +0000 (21:05 +1100)]
Make default values not be serialized to XML

5 years agoUse JSON encoding for attributes, to allow nested types such as list(list(int))
Nick Downing [Mon, 28 Jan 2019 07:56:21 +0000 (18:56 +1100)]
Use JSON encoding for attributes, to allow nested types such as list(list(int))

5 years agoAdd dict type, implement type checking in generate_expression()
Nick Downing [Mon, 28 Jan 2019 06:57:19 +0000 (17:57 +1100)]
Add dict type, implement type checking in generate_expression()

5 years agoFreeze compiled pilex.git commit 767c103, pitree.git commit 3daa8a6, piyacc.git commi...
Nick Downing [Sun, 27 Jan 2019 23:22:46 +0000 (10:22 +1100)]
Freeze compiled pilex.git commit 767c103, pitree.git commit 3daa8a6, piyacc.git commit bc19b4a, into bootstrap_*, use pitree.t and t_def.py instead of ast.py

5 years agoAdd or update license in every file, update tests to put license at start of *.t...
Nick Downing [Mon, 28 Jan 2019 02:15:01 +0000 (13:15 +1100)]
Add or update license in every file, update tests to put license at start of *.t source and expected output files, allow comments in section 1 of *.t file (may revisit as section 1 is line oriented), rename t_ast.py output file to t_def.py

5 years agoHonour specification of field default value, allow mandatory field (no default)
Nick Downing [Sun, 27 Jan 2019 23:10:04 +0000 (10:10 +1100)]
Honour specification of field default value, allow mandatory field (no default)

5 years agoRemove obsolete __repr__() and repr_serialize() on AST elements, change spacing
Nick Downing [Sun, 27 Jan 2019 23:00:23 +0000 (10:00 +1100)]
Remove obsolete __repr__() and repr_serialize() on AST elements, change spacing

5 years agoMake serialization nested with proper virtual functions to handle compound type
Nick Downing [Sun, 27 Jan 2019 11:31:13 +0000 (22:31 +1100)]
Make serialization nested with proper virtual functions to handle compound type

5 years agoPartially move generation of the serialize/deserialize routines into TypeXXX
Nick Downing [Sun, 27 Jan 2019 08:52:39 +0000 (19:52 +1100)]
Partially move generation of the serialize/deserialize routines into TypeXXX

5 years agoMove generation of the serialize/deserialize routines into the Type object
Nick Downing [Sun, 27 Jan 2019 00:22:20 +0000 (11:22 +1100)]
Move generation of the serialize/deserialize routines into the Type object

5 years agoRemove obsolete way of initializing AST elements with serialized (string) data
Nick Downing [Sat, 26 Jan 2019 23:35:22 +0000 (10:35 +1100)]
Remove obsolete way of initializing AST elements with serialized (string) data

5 years agoMake fields be a list of ref rather than a list of type, name pairs
Nick Downing [Sat, 26 Jan 2019 23:08:23 +0000 (10:08 +1100)]
Make fields be a list of ref rather than a list of type, name pairs

5 years agoSimplify handling of field list
Nick Downing [Sat, 26 Jan 2019 23:00:48 +0000 (10:00 +1100)]
Simplify handling of field list

5 years agoCorrect accidental editing of generate_ast.py introduced in commit 705f669
Nick Downing [Sat, 26 Jan 2019 22:56:00 +0000 (09:56 +1100)]
Correct accidental editing of generate_ast.py introduced in commit 705f669

5 years agoAdd ./o.sh test procedure which compiles pitree with itself to test with ./n.sh
Nick Downing [Sat, 26 Jan 2019 13:22:19 +0000 (00:22 +1100)]
Add ./o.sh test procedure which compiles pitree with itself to test with ./n.sh

5 years agoFirst cut at pitree.py converter, hacky conversion of generate_ast.py to ast.py
Nick Downing [Sat, 26 Jan 2019 13:03:10 +0000 (00:03 +1100)]
First cut at pitree.py converter, hacky conversion of generate_ast.py to ast.py

5 years agoAdd scanner and parser that can recognize and mark up the test inputs
Nick Downing [Sat, 26 Jan 2019 10:50:17 +0000 (21:50 +1100)]
Add scanner and parser that can recognize and mark up the test inputs

5 years agoPut non-element classes, and unrecognized code other than imports, in section 3
Nick Downing [Thu, 24 Jan 2019 12:22:23 +0000 (23:22 +1100)]
Put non-element classes, and unrecognized code other than imports, in section 3

5 years agoGenerate test input file and expected output file from existing ast.py projects
Nick Downing [Tue, 22 Jan 2019 03:34:41 +0000 (14:34 +1100)]
Generate test input file and expected output file from existing ast.py projects