projekt pk_os_go
This commit is contained in:
parent
5577560640
commit
decc8f3324
16 changed files with 70 additions and 126 deletions
|
|
@ -125,6 +125,22 @@ type format_F2_rr struct {
|
|||
r2 string
|
||||
}
|
||||
|
||||
type format_F3 struct {
|
||||
oznaka string
|
||||
opcode int
|
||||
format int
|
||||
velikost int
|
||||
}
|
||||
|
||||
type format_F3_m struct {
|
||||
oznaka string
|
||||
opcode int
|
||||
format int
|
||||
velikost int
|
||||
naslov string
|
||||
x bool
|
||||
}
|
||||
|
||||
func remove_comments_and_empty_lines(el string) bool {
|
||||
match_pure_comment, err := regexp.MatchString(`(?m)^[\t ]*\..*$\n`, el)
|
||||
if err != nil {
|
||||
|
|
@ -187,7 +203,7 @@ func check_F2_n(el string, AST *[]ukaz) bool {
|
|||
nov_ukaz.x = false
|
||||
nov_ukaz.n = temp
|
||||
}
|
||||
fmt.Println("F2_n ", el[:len(el) - 1], nov_ukaz)
|
||||
//fmt.Println("F2_n ", el[:len(el) - 1], nov_ukaz)
|
||||
*AST = append(*AST, nov_ukaz)
|
||||
return true
|
||||
}
|
||||
|
|
@ -248,7 +264,7 @@ func check_F2_rn(el string, AST *[]ukaz) bool {
|
|||
nov_ukaz.x = false
|
||||
nov_ukaz.n = temp
|
||||
}
|
||||
fmt.Println("F2_rn: ", el[:len(el) - 1], nov_ukaz)
|
||||
//fmt.Println("F2_rn: ", el[:len(el) - 1], nov_ukaz)
|
||||
*AST = append(*AST, nov_ukaz)
|
||||
return true
|
||||
}
|
||||
|
|
@ -305,6 +321,7 @@ func main() {
|
|||
if check_F1(el, &AST) {
|
||||
continue
|
||||
}
|
||||
// TODO !!! odstrani # in @ in x naslalvljaje od F2 formata, saj nima bitov, da to podpre
|
||||
if check_F2_n(el, &AST) {
|
||||
continue
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue