You are here: PSPad forum > Developer forum - new builds > Re: PSPad unicode 4.5.2 (2223) English
Goto Page: Previous1 2 3 4 5 6 7 8
Posted by: dr_midas | Date: 2006-10-17 06:21 | IP: IP Logged
pspad:I don't know all programming languages.
You don't know all languages? What a shame!!!
pspad:If you want to expand it, send me source sample and explanation what should be added.
Sure. Here is a sample file
and here a text file of how the code explorer window could look like:
To double check with other files, here are some other samples:
One has to note that this type of VHDL is used for FPGA programming (so-called "synthesis"), where only a subset of the full VHDL is used. Furthermore, the processes defined in VHDL have a relatively fixed syntax, as shown in the examples.
Other independent examples are here:
esd.cs.ucr.edu
esd.cs.ucr.edu
esd.cs.ucr.edu
Thanks a lot for your help,
Stefan
Posted by: MrSpock | Date: 2006-10-17 10:31 | IP: IP Logged
Stefan, can't you make a trivial example file that does (almost) nothing but contains mostly syntax explanations, e.g.
//a function declaration:
function doNothing()
{
return;
}
and similar? This will make it much easier for Jan. Imagine you would have to dig through several example files, written in a language you don't know and don't want to know, just to understand the syntax, while what you really want is make a good editor even better.
Posted by: dr_midas | Date: 2006-10-17 11:21 | IP: IP Logged
-- a library include
use <name>;
-- an entity with a port definition
entity <name> is
port (
<name> : <type>;
);
end <name>;
-- the main architecture
architecture <name>
-- a component with a port definition
component <name>
port (
<name> : <type>;
);
end component;
-- a signal definition
signal <name> : <type>;
-- a constant definition
constant <name>: <type> := <value>;
-- a type defiition
type <name> is <typedefinition>;
-- a subtype definition
subtype <name> is <typedefinition>;
-- main body
begin
-- an instance of a component defined above
<name> : <component-name>
port map (
<name1> => <name2>,
);
-- a process with signals (=parameters)
<process_name>: process(<signals>)
begin
-- a if/elsif/end if condition
if (<condition>) then
elsif <condition> then
-- a case clause
case (<signal>) is
when <value> =>
when <value> =>
when others =>
end case;
end if;
end process;
end <name>;
Edited 1 time(s). Last edit at 2006-10-17 11:22 by dr_midas.
Posted by: pspad | Date: 2006-10-17 11:56 | IP: IP Logged
I need real source code, not syntax description
And please send is via mail as attachment to prevent mail clients to reformat code
Posted by: pspad | Date: 2006-10-17 15:23 | IP: IP Logged
Now I study your example.
Because I will do user customizable Code explorer, I am able to do only one level code parser. Sorry, But I will not copy whole code to Code explorer.
Code explorer should help you with orientation in source, not show whole code in structure.
Tell me, if you want to add another (missing) main node into existing code explorer.
Posted by: dr_midas | Date: 2006-10-17 17:33 | IP: IP Logged
pspad:Because I will do user customizable Code explorer, I am able to do only one level code parser. Sorry, But I will not copy whole code to Code explorer.
That's a pity. In VHDL, there is usually only one "architecture" main node, and then most code is in this main node. Like if in a C program all routines would be inside the main() function. So the one level code parser is almost useless for VHDL, that's why I started this discussion. If you check my examples, you will see that the code explorer only finds four or five items in total, not more. This will be the same even for large VHDL files with many thousand lines. Only if the "process" node inside the "architecture" node gets indexed, the code explorer will be somehow usable for VHDL.
Posted by: pspad | Date: 2006-10-17 18:08 | IP: IP Logged
There is no problem to have several other main nodes with content of the content you are interested of.
I can add e.g. nodes for
Signals
Constants
Types
Subtypes
...
I only need to know what you want.
I don't see any problem if this nodes wouldn't be under "architectre" node.
It's more clear ?
Posted by: dr_midas | Date: 2006-10-17 20:04 | IP: IP Logged
pspad:I only need to know what you want.
I don't see any problem if this nodes wouldn't be under "architectre" node.
It's more clear ?
Ok. So best would be:
Libraries
Entities
Architecture
plus:
Components
Signals
Constants
Types
Subtypes
Processes
Posted by: jackelmatador | Date: 2006-12-06 19:40 | IP: IP Logged
Great work any chance you could get the "process" part of code explorer implemented? The rest seems to be working great!
Thanks!
Just to note I am using version 2246.
Edited 1 time(s). Last edit at 2006-12-06 19:41 by jackelmatador.
Posted by: pspad | Date: 2006-12-06 20:08 | IP: IP Logged
Sorry, it was my fault, bad reular expression. Correction will be available in the next build.
Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR