From c002c5588a0cbfb11c7d28d7e619508ceb89a4aa Mon Sep 17 00:00:00 2001 From: Boris Shingarov Date: Mon, 8 Jul 2024 23:32:41 -0400 Subject: [PATCH] Move Luke's ISACaller stuff to ISA repo --- .../MdwnParserTest.class.st | 25 ------ src/ArchC-LibreSOC-Tests/package.st | 1 - src/ArchC-LibreSOC/ExpectBlank.class.st | 32 ------- src/ArchC-LibreSOC/ExpectDesc.class.st | 19 ----- src/ArchC-LibreSOC/ExpectForm.class.st | 11 --- src/ArchC-LibreSOC/ExpectOpcode.class.st | 13 --- src/ArchC-LibreSOC/ExpectPseudoLine.class.st | 13 --- .../ExpectPseudocodeHeader.class.st | 11 --- .../ExpectSpecialHeader.class.st | 11 --- .../ExpectSpecialRegister.class.st | 13 --- src/ArchC-LibreSOC/MdwnInstruction.class.st | 65 -------------- src/ArchC-LibreSOC/MdwnParser.class.st | 84 ------------------- src/ArchC-LibreSOC/ParsingDone.class.st | 15 ---- src/ArchC-LibreSOC/ParsingState.class.st | 35 -------- src/ArchC-LibreSOC/package.st | 1 - 15 files changed, 349 deletions(-) delete mode 100644 src/ArchC-LibreSOC-Tests/MdwnParserTest.class.st delete mode 100644 src/ArchC-LibreSOC-Tests/package.st delete mode 100644 src/ArchC-LibreSOC/ExpectBlank.class.st delete mode 100644 src/ArchC-LibreSOC/ExpectDesc.class.st delete mode 100644 src/ArchC-LibreSOC/ExpectForm.class.st delete mode 100644 src/ArchC-LibreSOC/ExpectOpcode.class.st delete mode 100644 src/ArchC-LibreSOC/ExpectPseudoLine.class.st delete mode 100644 src/ArchC-LibreSOC/ExpectPseudocodeHeader.class.st delete mode 100644 src/ArchC-LibreSOC/ExpectSpecialHeader.class.st delete mode 100644 src/ArchC-LibreSOC/ExpectSpecialRegister.class.st delete mode 100644 src/ArchC-LibreSOC/MdwnInstruction.class.st delete mode 100644 src/ArchC-LibreSOC/MdwnParser.class.st delete mode 100644 src/ArchC-LibreSOC/ParsingDone.class.st delete mode 100644 src/ArchC-LibreSOC/ParsingState.class.st delete mode 100644 src/ArchC-LibreSOC/package.st diff --git a/src/ArchC-LibreSOC-Tests/MdwnParserTest.class.st b/src/ArchC-LibreSOC-Tests/MdwnParserTest.class.st deleted file mode 100644 index 81f0cab..0000000 --- a/src/ArchC-LibreSOC-Tests/MdwnParserTest.class.st +++ /dev/null @@ -1,25 +0,0 @@ -Class { - #name : #MdwnParserTest, - #superclass : #TestCase, - #category : #'ArchC-LibreSOC-Tests' -} - -{ #category : #tests } -MdwnParserTest >> testParseBranch [ - | page branch | - page := MdwnParser parse: 'branch'. "Array with 5 Mdwninstructions" - self assert: page size equals: 5. - branch := page detect: [ :op | op desc = 'Branch' ]. - self assert: branch opcodes size equals: 4. "b, ba, bl, bla" - -] - -{ #category : #tests } -MdwnParserTest >> testParseFixedArith [ - | page branch | - page := MdwnParser parse: 'fixedarith'. "Array with 41 Mdwninstructions" - self assert: page size equals: 41. - branch := page detect: [ :op | op desc = 'Subtract From' ]. - self assert: branch opcodes size equals: 4. "subf, subf., subfo, subfo. " - -] diff --git a/src/ArchC-LibreSOC-Tests/package.st b/src/ArchC-LibreSOC-Tests/package.st deleted file mode 100644 index a36b84c..0000000 --- a/src/ArchC-LibreSOC-Tests/package.st +++ /dev/null @@ -1 +0,0 @@ -Package { #name : #'ArchC-LibreSOC-Tests' } diff --git a/src/ArchC-LibreSOC/ExpectBlank.class.st b/src/ArchC-LibreSOC/ExpectBlank.class.st deleted file mode 100644 index c329df3..0000000 --- a/src/ArchC-LibreSOC/ExpectBlank.class.st +++ /dev/null @@ -1,32 +0,0 @@ -Class { - #name : #ExpectBlank, - #superclass : #ParsingState, - #instVars : [ - 'nextState' - ], - #category : #'ArchC-LibreSOC' -} - -{ #category : #'as yet unclassified' } -ExpectBlank class >> op: op next: aParserStateSubclass [ - ^super new - op: op; - nextState: aParserStateSubclass; - yourself -] - -{ #category : #accessing } -ExpectBlank >> nextState [ - ^ nextState -] - -{ #category : #accessing } -ExpectBlank >> nextState: anObject [ - nextState := anObject -] - -{ #category : #logic } -ExpectBlank >> transition: l [ - l isEmpty ifFalse: [ self error ]. - ^nextState new: op -] diff --git a/src/ArchC-LibreSOC/ExpectDesc.class.st b/src/ArchC-LibreSOC/ExpectDesc.class.st deleted file mode 100644 index 859186c..0000000 --- a/src/ArchC-LibreSOC/ExpectDesc.class.st +++ /dev/null @@ -1,19 +0,0 @@ -Class { - #name : #ExpectDesc, - #superclass : #ParsingState, - #category : #'ArchC-LibreSOC' -} - -{ #category : #'as yet unclassified' } -ExpectDesc class >> initial [ - ^self new: MdwnInstruction new -] - -{ #category : #logic } -ExpectDesc >> transition: l [ - l isEmpty ifTrue: [ ^self ]. - (l beginsWith: '