Commit Graph

173 Commits

Author SHA1 Message Date
Stephen Williams e172b4d9bc Add support for unary abs and not operators.
While I'm at it, do a little refactoring of the handling of binary
expressions to reduce code duplication.
2011-02-20 17:03:46 -08:00
Stephen Williams cbb213d79e Support for some arithmetic operators. 2011-02-19 17:47:30 -08:00
Stephen Williams c6ea2f3bf5 Stub support for "use" directives.
Implement the parser infrastructure for handling library use clauses,
and use that to handle specific packages of the ieee library. Make
the numeric types come from the numeric_* packages instead of being
built in.
2011-02-19 13:08:26 -08:00
Stephen Williams 8a5225e61f Stub support for library import.
This provides a stub implementation for library import. Use this
stub to make up a slightly more functional ieee library implementation.
2011-02-19 11:39:00 -08:00
Stephen Williams 7d552980a6 Elaborate array subtypes of ports.
There are internal types that are unbounded arrays. Allow subtype
syntax that creates bounded versions of these arrays, and elaborate
them as vectors at port boundaries. This makes some interesting types
work out.

Also start replacing vhdlint and vhdlreal with int64_t and double,
which are reasonable values for universal_integer and universal_real
from the VHDL standard. I need these cleaned up because the ints in
particular are used for the literal expressions in array index constraints.
2011-02-13 19:01:21 -08:00
Stephen Williams f32ede23b7 Do type mapping in the parser.
In VHDL, types are declared before they are used, so it is possible
to do type binding during parse. This makes the parser a little bit
cleaner.
2011-02-13 16:54:56 -08:00
Stephen Williams d8d56bc569 Architecture syntax allows for closing name. 2011-02-13 16:48:52 -08:00
Stephen Williams 5914617727 Clean up entity interface. 2011-02-13 16:48:52 -08:00
Stephen Williams 769159d053 Add parse decorations for expressions.
Elaboration will need a parse tree for expressions. Create one for
the expression types that are currently supported. Also add rules
and the keywords for all the remaining binary logical operators.
2011-02-13 16:47:05 -08:00
Stephen Williams 3ca0a482cf Annotate the parse of simple concurrent statements. 2011-02-13 16:43:45 -08:00
Stephen Williams 30d689016a Create an Architecture class and bind them to their entities. 2011-02-13 16:43:04 -08:00
Pawel Szostek 77a346ffb1 Added full number, based number (both int and float), string and character literals handling 2011-02-10 18:34:38 -08:00
Pawel Szostek 0395eadbc8 Introductory changes for numbers handling 2011-02-10 18:34:13 -08:00
Pawel Szostek 75203dc121 Minor changes to VHDL lexor 2011-02-10 18:33:53 -08:00
Pawel Szostek d747859a85 New compound VHDL symbols 2011-02-10 18:33:34 -08:00
Pawel Szostek ac28743eb0 New keywords to lexer added and typos corrected 2011-02-10 18:33:07 -08:00
Stephen Williams 9229256f6f Fix identation style. 2011-01-26 17:44:58 -08:00
Pawel Szostek 7eddaaf5bf Entity parsing changed 2011-01-26 17:43:26 -08:00
Stephen Williams ab8f623cea Add file/line information to entities and ports
Include the compiler infrastructure to vhdlpp for collecting the
file and line information and attaching it to entities and ports.
Make the parser store the file name during parse.

Create a libmisc library where I can put source files that are
used by multiple programs within the source tree.
2011-01-18 17:03:51 -08:00
Stephen Williams d72f7ea249 Save the type name if an InterfacePort object. 2011-01-18 17:03:51 -08:00
Stephen Williams 02820c9e34 Parse create entities with ports
Create entity objects from entity declarations in the source,
and populate them with ports.
2011-01-18 17:03:51 -08:00
Stephen Williams 04b239a5fb Flesh out VHDL parser engine.
Add enough rules to parse a simple VHDL program:
  Parse library and use clauses,
  Parse entity declarations, and
  Parse architecture bodies.

Add some parser infrastructure:
  Handle syntax errors with useful error messages,
  Include file name and line numbers in parse errors,
  Add some parser debug aids.
2011-01-18 17:03:51 -08:00
Stephen Williams 8cf1fd1820 Introduce shell of vhdlpp program.
Create the makefiles and configuration scripts to hold together
the vhdlpp front-end program. Create a shell main.
2011-01-18 17:03:51 -08:00