MegaProcessor

Check-in [6073558536]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Moved the test within the loop, to catch comment-only lines that start in columns other than the first as well.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:6073558536282a717c85e9f4d7dbd191cf6ecaa4
User & Date: jos 2015-07-12 16:47:35
Context
2015-07-13
23:13
The set of reg-exps in function Process_line now seem to be able to parse the majority of possible source lines into a plausible set of fields. (label, instruction or directive, destination, source ). check-in: dc67697206 user: jos tags: trunk
2015-07-12
16:47
Moved the test within the loop, to catch comment-only lines that start in columns other than the first as well. check-in: 6073558536 user: jos tags: trunk
2015-07-11
23:23
second take at assembler. check-in: fa79f0ce8c user: jos tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to asm.lua.

19
20
21
22
23
24
25
26
27
28

29
30
31
32
33
34
35
    for l in inFile:lines() do
        ProcessLine( l );
    end
end

function Fields( line )
    local t = {};
    if( line:sub(1,2) == "//" ) then return 0; end;

    for x in line:gmatch("(%S+)") do

        table.insert(t,x)
    end
    return #t, table.unpack(t) ;
end

LineNr = 1;
function ProcessLine( l )







<


>







19
20
21
22
23
24
25

26
27
28
29
30
31
32
33
34
35
    for l in inFile:lines() do
        ProcessLine( l );
    end
end

function Fields( line )
    local t = {};


    for x in line:gmatch("(%S+)") do
        if( x:sub(1,2) == "//" ) then return 0; end;
        table.insert(t,x)
    end
    return #t, table.unpack(t) ;
end

LineNr = 1;
function ProcessLine( l )